[java-opensaml COMMIT] /trunk/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/HttpSOAPClient.java
noreply at shibboleth.net
noreply at shibboleth.net
Wed Mar 19 18:08:19 EDT 2014
Author: tzeller
Date: Wed Mar 19 18:08:19 2014
New Revision: 3715
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3715&view=rev
Log:
FIx probable HttpClient upgrade issue. Process the response as an HttpResponse rather than HttpPost.
Modified:
trunk/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/HttpSOAPClient.java
Modified: trunk/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/HttpSOAPClient.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/HttpSOAPClient.java?rev=3715&r1=3714&r2=3715&view=diff
==============================================================================
--- trunk/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/HttpSOAPClient.java (original)
+++ trunk/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/HttpSOAPClient.java Wed Mar 19 18:08:19 2014
@@ -178,9 +178,9 @@
log.debug("Received HTTP status code of {} when POSTing SOAP message to {}", code, endpoint);
if (code == HttpStatus.SC_OK) {
- processSuccessfulResponse(post, context);
+ processSuccessfulResponse(result, context);
} else if (code == HttpStatus.SC_INTERNAL_SERVER_ERROR) {
- processFaultResponse(post, context);
+ processFaultResponse(result, context);
} else {
throw new SOAPClientException("Received " + code + " HTTP response status code from HTTP request to "
+ endpoint);
@@ -249,18 +249,18 @@
/**
* Processes a successful, as determined by an HTTP 200 status code, response.
*
- * @param httpMethod the HTTP method used to send the request and receive the response
+ * @param httpResponse the HTTP response
* @param context current operation context
*
* @throws SOAPClientException thrown if there is a problem reading the response from the {@link HttpPost}
*/
- protected void processSuccessfulResponse(HttpPost httpMethod, InOutOperationContext context)
+ protected void processSuccessfulResponse(HttpResponse httpResponse, InOutOperationContext context)
throws SOAPClientException {
try {
- if (httpMethod.getEntity() == null) {
+ if (httpResponse.getEntity() == null) {
throw new SOAPClientException("No response body from server");
}
- Envelope response = unmarshallResponse(httpMethod.getEntity().getContent());
+ Envelope response = unmarshallResponse(httpResponse.getEntity().getContent());
context.setInboundMessageContext(new MessageContext());
context.getInboundMessageContext().getSubcontext(SOAP11Context.class, true).setEnvelope(response);
//TODO: goes away?
@@ -273,19 +273,19 @@
/**
* Processes a SOAP fault, as determined by an HTTP 500 status code, response.
*
- * @param httpMethod the HTTP method used to send the request and receive the response
+ * @param httpResponse the HTTP response
* @param context current operation context
*
* @throws SOAPClientException thrown if the response can not be read from the {@link HttpPost}
* @throws SOAPFaultException an exception containing the SOAP fault
*/
- protected void processFaultResponse(HttpPost httpMethod, InOutOperationContext context)
+ protected void processFaultResponse(HttpResponse httpResponse, InOutOperationContext context)
throws SOAPClientException, SOAPFaultException {
try {
- if (httpMethod.getEntity() == null) {
+ if (httpResponse.getEntity() == null) {
throw new SOAPClientException("No response body from server");
}
- Envelope response = unmarshallResponse(httpMethod.getEntity().getContent());
+ Envelope response = unmarshallResponse(httpResponse.getEntity().getContent());
context.setInboundMessageContext(new MessageContext());
context.getInboundMessageContext().getSubcontext(SOAP11Context.class, true).setEnvelope(response);
More information about the commits
mailing list