Class WebServiceTemplate
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,WebServiceOperations
WebServiceMessage
instances.
Code using this class need only implement callback interfaces, provide Source
objects to read data from, or
use the pluggable Marshaller
support. For invoking the marshalling methods
,
the marshaller
and unmarshaller
properties
must be set.
This template uses a SoapFaultMessageResolver
to handle fault response messages. Another
FaultMessageResolver
can be defined with with faultMessageResolver
property. If this property is set to null
, no fault resolving is performed.
This template uses the following algorithm for sending and receiving.
- Call
createConnection()
. - Call
createWebServiceMessage()
on the registered message factory to create a request message. - Invoke
doWithMessage()
on the request callback, if any. This step stores content in the request message, based onSource
, marshalling, etc. - Invoke
handleRequest()
on the registeredinterceptors
. Interceptors are executed in order. If any of the interceptors creates a response message in the message context, skip to step 7. - Call
send()
on the connection. - Call
hasError()
to check if the connection has an error. For an HTTP transport, a status code other than2xx
indicates an error. However, since a status code of 500 can also indicate a SOAP fault, the template verifies whether the error is not a fault. - If the connection has an error, call the
handleError()
method, which by default throws aWebServiceTransportException
. - If the connection has no error, continue with the next step.
- Invoke
receive
on the connection to read the response message, if any. - If no response was received, return
null
orfalse
- Call
hasFault()
to determine whether the response has a fault. If it has, callClientInterceptor.handleFault(MessageContext)
and thehandleFault()
method. - Otherwise, invoke
ClientInterceptor.handleResponse(MessageContext)
andextractData()
on the response extractor, ordoWithMessage
on the response callback. - Call to
close
on the connection.
- Since:
- 1.0.0
- Author:
- Arjen Poutsma
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Log category to use for message tracing.protected static final org.apache.commons.logging.Log
Additional logger to use for received message tracing.protected static final org.apache.commons.logging.Log
Additional logger to use for sent message tracing.Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger
-
Constructor Summary
ConstructorDescriptionCreates a newWebServiceTemplate
using default settings.WebServiceTemplate
(org.springframework.oxm.Marshaller marshaller) Creates a newWebServiceTemplate
with the given marshaller.WebServiceTemplate
(org.springframework.oxm.Marshaller marshaller, org.springframework.oxm.Unmarshaller unmarshaller) Creates a newMarshallingMethodEndpointAdapter
with the given marshaller and unmarshaller.WebServiceTemplate
(WebServiceMessageFactory messageFactory) Creates a newWebServiceTemplate
based on the given message factory. -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> T
doSendAndReceive
(MessageContext messageContext, WebServiceConnection connection, WebServiceMessageCallback requestCallback, WebServiceMessageExtractor<T> responseExtractor) Sends and receives aMessageContext
.Returns the default URI to be used on operations that do not have a URI parameter.Returns the destination provider used on operations that do not have a URI parameter.Returns the fault message resolver for this template.Returns the client interceptors to apply to all web service invocations made by this template.org.springframework.oxm.Marshaller
Returns the marshaller for this template.org.springframework.oxm.Unmarshaller
Returns the unmarshaller for this template.protected Object
handleError
(WebServiceConnection connection, WebServiceMessage request) Handles an error on the given connection.protected Object
handleFault
(WebServiceConnection connection, MessageContext messageContext) Handles an fault in the given response message.protected boolean
hasError
(WebServiceConnection connection, WebServiceMessage request) Determines whether the given connection or message context has an error.protected boolean
hasFault
(WebServiceConnection connection, WebServiceMessage response) Determines whether the given connection or message has a fault.protected void
Initialize the default implementations for the template's strategies:SoapFaultMessageResolver
,SaajSoapMessageFactory
, andHttpUrlConnectionMessageSender
.marshalSendAndReceive
(Object requestPayload) Sends a web service message that contains the given payload, marshalled by the configuredMarshaller
.marshalSendAndReceive
(Object requestPayload, WebServiceMessageCallback requestCallback) Sends a web service message that contains the given payload, marshalled by the configuredMarshaller
.marshalSendAndReceive
(String uri, Object requestPayload) Sends a web service message that contains the given payload, marshalled by the configuredMarshaller
.marshalSendAndReceive
(String uri, Object requestPayload, WebServiceMessageCallback requestCallback) Sends a web service message that contains the given payload, marshalled by the configuredMarshaller
.boolean
sendAndReceive
(String uri, WebServiceMessageCallback requestCallback, WebServiceMessageCallback responseCallback) Sends a web service message that can be manipulated with the given request callback, handling the response with a response callback.<T> T
sendAndReceive
(String uriString, WebServiceMessageCallback requestCallback, WebServiceMessageExtractor<T> responseExtractor) Sends a web service message that can be manipulated with the given callback, reading the result with aWebServiceMessageExtractor
.boolean
sendAndReceive
(WebServiceMessageCallback requestCallback, WebServiceMessageCallback responseCallback) Sends a web service message that can be manipulated with the given request callback, handling the response with a response callback.<T> T
sendAndReceive
(WebServiceMessageCallback requestCallback, WebServiceMessageExtractor<T> responseExtractor) Sends a web service message that can be manipulated with the given callback, reading the result with aWebServiceMessageExtractor
.<T> T
sendSourceAndReceive
(String uri, Source requestPayload, SourceExtractor<T> responseExtractor) Sends a web service message that contains the given payload, reading the result with aSourceExtractor
.<T> T
sendSourceAndReceive
(String uri, Source requestPayload, WebServiceMessageCallback requestCallback, SourceExtractor<T> responseExtractor) Sends a web service message that contains the given payload, reading the result with aSourceExtractor
.<T> T
sendSourceAndReceive
(Source requestPayload, SourceExtractor<T> responseExtractor) Sends a web service message that contains the given payload, reading the result with aSourceExtractor
.<T> T
sendSourceAndReceive
(Source requestPayload, WebServiceMessageCallback requestCallback, SourceExtractor<T> responseExtractor) Sends a web service message that contains the given payload, reading the result with aSourceExtractor
.boolean
sendSourceAndReceiveToResult
(String uri, Source requestPayload, Result responseResult) Sends a web service message that contains the given payload.boolean
sendSourceAndReceiveToResult
(String uri, Source requestPayload, WebServiceMessageCallback requestCallback, Result responseResult) Sends a web service message that contains the given payload.boolean
sendSourceAndReceiveToResult
(Source requestPayload, Result responseResult) Sends a web service message that contains the given payload.boolean
sendSourceAndReceiveToResult
(Source requestPayload, WebServiceMessageCallback requestCallback, Result responseResult) Sends a web service message that contains the given payload.void
setCheckConnectionForError
(boolean checkConnectionForError) Indicates whether the connection should be checked for error indicators (true
), or whether these should be ignored (false
).void
setCheckConnectionForFault
(boolean checkConnectionForFault) Indicates whether the connection should be checked for fault indicators (true
), or whether we should rely on themessage
only (false
).void
setDefaultUri
(String uri) Set the default URI to be used on operations that do not have a URI parameter.void
setDestinationProvider
(DestinationProvider destinationProvider) Set the destination provider URI to be used on operations that do not have a URI parameter.void
setFaultMessageResolver
(FaultMessageResolver faultMessageResolver) Sets the fault resolver for this template.final void
setInterceptors
(ClientInterceptor[] interceptors) Sets the client interceptors to apply to all web service invocations made by this template.void
setMarshaller
(org.springframework.oxm.Marshaller marshaller) Sets the marshaller for this template.void
setUnmarshaller
(org.springframework.oxm.Unmarshaller unmarshaller) Sets the unmarshaller for this template.Methods inherited from class org.springframework.ws.client.support.WebServiceAccessor
afterPropertiesSet, createConnection, getMessageFactory, getMessageSenders, setMessageFactory, setMessageSender, setMessageSenders
Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
-
Field Details
-
MESSAGE_TRACING_LOG_CATEGORY
Log category to use for message tracing.- See Also:
-
sentMessageTracingLogger
protected static final org.apache.commons.logging.Log sentMessageTracingLoggerAdditional logger to use for sent message tracing. -
receivedMessageTracingLogger
protected static final org.apache.commons.logging.Log receivedMessageTracingLoggerAdditional logger to use for received message tracing.
-
-
Constructor Details
-
WebServiceTemplate
public WebServiceTemplate()Creates a newWebServiceTemplate
using default settings. -
WebServiceTemplate
Creates a newWebServiceTemplate
based on the given message factory.- Parameters:
messageFactory
- the message factory to use
-
WebServiceTemplate
public WebServiceTemplate(org.springframework.oxm.Marshaller marshaller) Creates a newWebServiceTemplate
with the given marshaller. If the givenMarshaller
also implements theUnmarshaller
interface, it is used for both marshalling and unmarshalling. Otherwise, an exception is thrown.Note that all
Marshaller
implementations in Spring also implement theUnmarshaller
interface, so that you can safely use this constructor.- Parameters:
marshaller
- object used as marshaller and unmarshaller- Throws:
IllegalArgumentException
- whenmarshaller
does not implement theUnmarshaller
interface- Since:
- 2.0.3
-
WebServiceTemplate
public WebServiceTemplate(org.springframework.oxm.Marshaller marshaller, org.springframework.oxm.Unmarshaller unmarshaller) Creates a newMarshallingMethodEndpointAdapter
with the given marshaller and unmarshaller.- Parameters:
marshaller
- the marshaller to useunmarshaller
- the unmarshaller to use- Since:
- 2.0.3
-
-
Method Details
-
getDefaultUri
Returns the default URI to be used on operations that do not have a URI parameter. -
setDefaultUri
Set the default URI to be used on operations that do not have a URI parameter.Typically, either this property is set, or
setDestinationProvider(DestinationProvider)
, but not both.- See Also:
-
marshalSendAndReceive(Object)
marshalSendAndReceive(Object,WebServiceMessageCallback)
sendSourceAndReceiveToResult(Source,Result)
sendSourceAndReceiveToResult(Source,WebServiceMessageCallback,Result)
sendSourceAndReceive(Source,SourceExtractor)
sendSourceAndReceive(Source,WebServiceMessageCallback,SourceExtractor)
sendAndReceive(WebServiceMessageCallback,WebServiceMessageCallback)
-
getDestinationProvider
Returns the destination provider used on operations that do not have a URI parameter. -
setDestinationProvider
Set the destination provider URI to be used on operations that do not have a URI parameter.Typically, either this property is set, or
setDefaultUri(String)
, but not both.- See Also:
-
marshalSendAndReceive(Object)
marshalSendAndReceive(Object,WebServiceMessageCallback)
sendSourceAndReceiveToResult(Source,Result)
sendSourceAndReceiveToResult(Source,WebServiceMessageCallback,Result)
sendSourceAndReceive(Source,SourceExtractor)
sendSourceAndReceive(Source,WebServiceMessageCallback,SourceExtractor)
sendAndReceive(WebServiceMessageCallback,WebServiceMessageCallback)
-
getMarshaller
public org.springframework.oxm.Marshaller getMarshaller()Returns the marshaller for this template. -
setMarshaller
public void setMarshaller(org.springframework.oxm.Marshaller marshaller) Sets the marshaller for this template. -
getUnmarshaller
public org.springframework.oxm.Unmarshaller getUnmarshaller()Returns the unmarshaller for this template. -
setUnmarshaller
public void setUnmarshaller(org.springframework.oxm.Unmarshaller unmarshaller) Sets the unmarshaller for this template. -
getFaultMessageResolver
Returns the fault message resolver for this template. -
setFaultMessageResolver
Sets the fault resolver for this template. Default is theSoapFaultMessageResolver
, but may be set tonull
to disable fault handling. -
setCheckConnectionForError
public void setCheckConnectionForError(boolean checkConnectionForError) Indicates whether the connection should be checked for error indicators (true
), or whether these should be ignored (false
). The default istrue
.When using an HTTP transport, this property defines whether to check the HTTP response status code is in the 2xx Successful range. Both the SOAP specification and the WS-I Basic Profile define that a Web service must return a "200 OK" or "202 Accepted" HTTP status code for a normal response. Setting this property to
false
allows this template to deal with non-conforming services. -
setCheckConnectionForFault
public void setCheckConnectionForFault(boolean checkConnectionForFault) Indicates whether the connection should be checked for fault indicators (true
), or whether we should rely on themessage
only (false
). The default istrue
.When using an HTTP transport, this property defines whether to check the HTTP response status code for fault indicators. Both the SOAP specification and the WS-I Basic Profile define that a Web service must return a "500 Internal Server Error" HTTP status code if the response envelope is a Fault. Setting this property to
false
allows this template to deal with non-conforming services. -
getInterceptors
Returns the client interceptors to apply to all web service invocations made by this template.- Returns:
- array of endpoint interceptors, or
null
if none
-
setInterceptors
Sets the client interceptors to apply to all web service invocations made by this template.- Parameters:
interceptors
- array of endpoint interceptors, ornull
if none
-
initDefaultStrategies
protected void initDefaultStrategies()Initialize the default implementations for the template's strategies:SoapFaultMessageResolver
,SaajSoapMessageFactory
, andHttpUrlConnectionMessageSender
.- Throws:
org.springframework.beans.factory.BeanInitializationException
- in case of initalization errors- See Also:
-
marshalSendAndReceive
Description copied from interface:WebServiceOperations
Sends a web service message that contains the given payload, marshalled by the configuredMarshaller
. Returns the unmarshalled payload of the response message, if any.This will only work with a default uri specified!
- Specified by:
marshalSendAndReceive
in interfaceWebServiceOperations
- Parameters:
requestPayload
- the object to marshal into the request message payload- Returns:
- the unmarshalled payload of the response message, or
null
if no response is given - See Also:
-
marshalSendAndReceive
Description copied from interface:WebServiceOperations
Sends a web service message that contains the given payload, marshalled by the configuredMarshaller
. Returns the unmarshalled payload of the response message, if any.- Specified by:
marshalSendAndReceive
in interfaceWebServiceOperations
- Parameters:
uri
- the URI to send the message torequestPayload
- the object to marshal into the request message payload- Returns:
- the unmarshalled payload of the response message, or
null
if no response is given - See Also:
-
marshalSendAndReceive
public Object marshalSendAndReceive(Object requestPayload, WebServiceMessageCallback requestCallback) Description copied from interface:WebServiceOperations
Sends a web service message that contains the given payload, marshalled by the configuredMarshaller
. Returns the unmarshalled payload of the response message, if any. The given callback allows changing of the request message after the payload has been marshalled to it.This will only work with a default uri specified!
- Specified by:
marshalSendAndReceive
in interfaceWebServiceOperations
- Parameters:
requestPayload
- the object to marshal into the request message payloadrequestCallback
- callback to change message, can benull
- Returns:
- the unmarshalled payload of the response message, or
null
if no response is given - See Also:
-
marshalSendAndReceive
public Object marshalSendAndReceive(String uri, Object requestPayload, WebServiceMessageCallback requestCallback) Description copied from interface:WebServiceOperations
Sends a web service message that contains the given payload, marshalled by the configuredMarshaller
. Returns the unmarshalled payload of the response message, if any. The given callback allows changing of the request message after the payload has been marshalled to it.- Specified by:
marshalSendAndReceive
in interfaceWebServiceOperations
- Parameters:
uri
- the URI to send the message torequestPayload
- the object to marshal into the request message payloadrequestCallback
- callback to change message, can benull
- Returns:
- the unmarshalled payload of the response message, or
null
if no response is given - See Also:
-
sendSourceAndReceiveToResult
Description copied from interface:WebServiceOperations
Sends a web service message that contains the given payload. Writes the response, if any, to the givenResult
.This will only work with a default uri specified!
- Specified by:
sendSourceAndReceiveToResult
in interfaceWebServiceOperations
- Parameters:
requestPayload
- the payload of the request messageresponseResult
- the result to write the response payload to- Returns:
true
if a response was received;false
otherwise
-
sendSourceAndReceiveToResult
public boolean sendSourceAndReceiveToResult(String uri, Source requestPayload, Result responseResult) Description copied from interface:WebServiceOperations
Sends a web service message that contains the given payload. Writes the response, if any, to the givenResult
.- Specified by:
sendSourceAndReceiveToResult
in interfaceWebServiceOperations
- Parameters:
uri
- the URI to send the message torequestPayload
- the payload of the request messageresponseResult
- the result to write the response payload to- Returns:
true
if a response was received;false
otherwise
-
sendSourceAndReceiveToResult
public boolean sendSourceAndReceiveToResult(Source requestPayload, WebServiceMessageCallback requestCallback, Result responseResult) Description copied from interface:WebServiceOperations
Sends a web service message that contains the given payload. Writes the response, if any, to the givenResult
.The given callback allows changing of the request message after the payload has been written to it.
This will only work with a default uri specified!
- Specified by:
sendSourceAndReceiveToResult
in interfaceWebServiceOperations
- Parameters:
requestPayload
- the payload of the request messagerequestCallback
- callback to change message, can benull
responseResult
- the result to write the response payload to- Returns:
true
if a response was received;false
otherwise
-
sendSourceAndReceiveToResult
public boolean sendSourceAndReceiveToResult(String uri, Source requestPayload, WebServiceMessageCallback requestCallback, Result responseResult) Description copied from interface:WebServiceOperations
Sends a web service message that contains the given payload. Writes the response, if any, to the givenResult
.The given callback allows changing of the request message after the payload has been written to it.
- Specified by:
sendSourceAndReceiveToResult
in interfaceWebServiceOperations
- Parameters:
uri
- the URI to send the message torequestPayload
- the payload of the request messagerequestCallback
- callback to change message, can benull
responseResult
- the result to write the response payload to- Returns:
true
if a response was received;false
otherwise
-
sendSourceAndReceive
Description copied from interface:WebServiceOperations
Sends a web service message that contains the given payload, reading the result with aSourceExtractor
.This will only work with a default uri specified!
- Specified by:
sendSourceAndReceive
in interfaceWebServiceOperations
- Parameters:
requestPayload
- the payload of the request messageresponseExtractor
- object that will extract results- Returns:
- an arbitrary result object, as returned by the
SourceExtractor
-
sendSourceAndReceive
public <T> T sendSourceAndReceive(String uri, Source requestPayload, SourceExtractor<T> responseExtractor) Description copied from interface:WebServiceOperations
Sends a web service message that contains the given payload, reading the result with aSourceExtractor
.- Specified by:
sendSourceAndReceive
in interfaceWebServiceOperations
- Parameters:
uri
- the URI to send the message torequestPayload
- the payload of the request messageresponseExtractor
- object that will extract results- Returns:
- an arbitrary result object, as returned by the
SourceExtractor
-
sendSourceAndReceive
public <T> T sendSourceAndReceive(Source requestPayload, WebServiceMessageCallback requestCallback, SourceExtractor<T> responseExtractor) Description copied from interface:WebServiceOperations
Sends a web service message that contains the given payload, reading the result with aSourceExtractor
.The given callback allows changing of the request message after the payload has been written to it.
This will only work with a default uri specified!
- Specified by:
sendSourceAndReceive
in interfaceWebServiceOperations
- Parameters:
requestPayload
- the payload of the request messagerequestCallback
- callback to change message, can benull
responseExtractor
- object that will extract results- Returns:
- an arbitrary result object, as returned by the
SourceExtractor
-
sendSourceAndReceive
public <T> T sendSourceAndReceive(String uri, Source requestPayload, WebServiceMessageCallback requestCallback, SourceExtractor<T> responseExtractor) Description copied from interface:WebServiceOperations
Sends a web service message that contains the given payload, reading the result with aSourceExtractor
.The given callback allows changing of the request message after the payload has been written to it.
- Specified by:
sendSourceAndReceive
in interfaceWebServiceOperations
- Parameters:
uri
- the URI to send the message torequestPayload
- the payload of the request messagerequestCallback
- callback to change message, can benull
responseExtractor
- object that will extract results- Returns:
- an arbitrary result object, as returned by the
SourceExtractor
-
sendAndReceive
public boolean sendAndReceive(WebServiceMessageCallback requestCallback, WebServiceMessageCallback responseCallback) Description copied from interface:WebServiceOperations
Sends a web service message that can be manipulated with the given request callback, handling the response with a response callback.This will only work with a default uri specified!
- Specified by:
sendAndReceive
in interfaceWebServiceOperations
- Parameters:
requestCallback
- the callback to be used for manipulating the request messageresponseCallback
- the callback to be used for manipulating the response message- Returns:
true
if a response was received;false
otherwise
-
sendAndReceive
public boolean sendAndReceive(String uri, WebServiceMessageCallback requestCallback, WebServiceMessageCallback responseCallback) Description copied from interface:WebServiceOperations
Sends a web service message that can be manipulated with the given request callback, handling the response with a response callback.- Specified by:
sendAndReceive
in interfaceWebServiceOperations
- Parameters:
uri
- the URI to send the message torequestCallback
- the callback to be used for manipulating the request messageresponseCallback
- the callback to be used for manipulating the response message- Returns:
true
if a response was received;false
otherwise
-
sendAndReceive
public <T> T sendAndReceive(WebServiceMessageCallback requestCallback, WebServiceMessageExtractor<T> responseExtractor) Description copied from interface:WebServiceOperations
Sends a web service message that can be manipulated with the given callback, reading the result with aWebServiceMessageExtractor
.This will only work with a default uri specified!
- Specified by:
sendAndReceive
in interfaceWebServiceOperations
- Parameters:
requestCallback
- the requestCallback to be used for manipulating the request messageresponseExtractor
- object that will extract results- Returns:
- an arbitrary result object, as returned by the
WebServiceMessageExtractor
-
sendAndReceive
public <T> T sendAndReceive(String uriString, WebServiceMessageCallback requestCallback, WebServiceMessageExtractor<T> responseExtractor) Description copied from interface:WebServiceOperations
Sends a web service message that can be manipulated with the given callback, reading the result with aWebServiceMessageExtractor
.- Specified by:
sendAndReceive
in interfaceWebServiceOperations
- Parameters:
uriString
- the URI to send the message torequestCallback
- the requestCallback to be used for manipulating the request messageresponseExtractor
- object that will extract results- Returns:
- an arbitrary result object, as returned by the
WebServiceMessageExtractor
-
doSendAndReceive
protected <T> T doSendAndReceive(MessageContext messageContext, WebServiceConnection connection, WebServiceMessageCallback requestCallback, WebServiceMessageExtractor<T> responseExtractor) throws IOException Sends and receives aMessageContext
. Sends therequest message
, and received to therepsonse message
. Invocates the definedinterceptors
as part of the process.- Parameters:
messageContext
- the message contextconnection
- the connection to userequestCallback
- the requestCallback to be used for manipulating the request messageresponseExtractor
- object that will extract results- Returns:
- an arbitrary result object, as returned by the
WebServiceMessageExtractor
- Throws:
WebServiceClientException
- if there is a problem sending or receiving the messageIOException
- in case of I/O errors
-
hasError
protected boolean hasError(WebServiceConnection connection, WebServiceMessage request) throws IOException Determines whether the given connection or message context has an error.This implementation checks the
connection
first. If it indicates an error, it makes sure that it is not afault
.- Parameters:
connection
- the connection (possibly aFaultAwareWebServiceConnection
request
- the response message (possibly aFaultAwareWebServiceMessage
- Returns:
true
if the connection has an error;false
otherwise- Throws:
IOException
- in case of I/O errors
-
handleError
protected Object handleError(WebServiceConnection connection, WebServiceMessage request) throws IOException Handles an error on the given connection. The default implementation throws aWebServiceTransportException
.- Parameters:
connection
- the erroneous connectionrequest
- the corresponding request message- Returns:
- the object to be returned from
sendAndReceive(String,WebServiceMessageCallback, WebServiceMessageExtractor)
, if any - Throws:
IOException
-
hasFault
protected boolean hasFault(WebServiceConnection connection, WebServiceMessage response) throws IOException Determines whether the given connection or message has a fault.This implementation checks the
connection
if thecheckConnectionForFault
property is true, and defaults to themessage
otherwise.- Parameters:
connection
- the connection (possibly aFaultAwareWebServiceConnection
response
- the response message (possibly aFaultAwareWebServiceMessage
- Returns:
true
if either the connection or the message has a fault;false
otherwise- Throws:
IOException
- in case of I/O errors
-
handleFault
protected Object handleFault(WebServiceConnection connection, MessageContext messageContext) throws IOException Handles an fault in the given response message. The default implementation invokes thefault resolver
if registered, or invokeshandleError(WebServiceConnection, WebServiceMessage)
otherwise.- Parameters:
connection
- the faulty connectionmessageContext
- the message context- Returns:
- the object to be returned from
sendAndReceive(String,WebServiceMessageCallback, WebServiceMessageExtractor)
, if any - Throws:
IOException
-