Interface WebServiceOperations
- All Known Implementing Classes:
WebServiceTemplate
WebServiceTemplate
. Not often used directly,
but a useful option to enhance testability, as it can easily be mocked or stubbed.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionmarshalSendAndReceive
(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 uri, 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.
-
Method Details
-
sendAndReceive
<T> T sendAndReceive(WebServiceMessageCallback requestCallback, WebServiceMessageExtractor<T> responseExtractor) throws WebServiceClientException 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!
- 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
- Throws:
WebServiceClientException
- if there is a problem sending or receiving the message
-
sendAndReceive
<T> T sendAndReceive(String uri, WebServiceMessageCallback requestCallback, WebServiceMessageExtractor<T> responseExtractor) throws WebServiceClientException Sends a web service message that can be manipulated with the given callback, reading the result with aWebServiceMessageExtractor
.- Parameters:
uri
- 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
- Throws:
WebServiceClientException
- if there is a problem sending or receiving the message
-
sendAndReceive
boolean sendAndReceive(WebServiceMessageCallback requestCallback, WebServiceMessageCallback responseCallback) throws WebServiceClientException 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!
- 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- Throws:
WebServiceClientException
- if there is a problem sending or receiving the message
-
sendAndReceive
boolean sendAndReceive(String uri, WebServiceMessageCallback requestCallback, WebServiceMessageCallback responseCallback) throws WebServiceClientException Sends a web service message that can be manipulated with the given request callback, handling the response with a response callback.- 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- Throws:
WebServiceClientException
- if there is a problem sending or receiving the message
-
marshalSendAndReceive
Object marshalSendAndReceive(Object requestPayload) throws org.springframework.oxm.XmlMappingException, WebServiceClientException 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!
- 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 - Throws:
org.springframework.oxm.XmlMappingException
- if there is a problem marshalling or unmarshallingWebServiceClientException
- if there is a problem sending or receiving the message- See Also:
-
marshalSendAndReceive
Object marshalSendAndReceive(String uri, Object requestPayload) throws org.springframework.oxm.XmlMappingException, WebServiceClientException Sends a web service message that contains the given payload, marshalled by the configuredMarshaller
. Returns the unmarshalled payload of the response message, if any.- 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 - Throws:
org.springframework.oxm.XmlMappingException
- if there is a problem marshalling or unmarshallingWebServiceClientException
- if there is a problem sending or receiving the message- See Also:
-
marshalSendAndReceive
Object marshalSendAndReceive(Object requestPayload, WebServiceMessageCallback requestCallback) throws org.springframework.oxm.XmlMappingException, WebServiceClientException 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!
- 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 - Throws:
org.springframework.oxm.XmlMappingException
- if there is a problem marshalling or unmarshallingWebServiceClientException
- if there is a problem sending or receiving the message- See Also:
-
marshalSendAndReceive
Object marshalSendAndReceive(String uri, Object requestPayload, WebServiceMessageCallback requestCallback) throws org.springframework.oxm.XmlMappingException, WebServiceClientException 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.- 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 - Throws:
org.springframework.oxm.XmlMappingException
- if there is a problem marshalling or unmarshallingWebServiceClientException
- if there is a problem sending or receiving the message- See Also:
-
sendSourceAndReceive
<T> T sendSourceAndReceive(Source requestPayload, SourceExtractor<T> responseExtractor) throws WebServiceClientException Sends a web service message that contains the given payload, reading the result with aSourceExtractor
.This will only work with a default uri specified!
- Parameters:
requestPayload
- the payload of the request messageresponseExtractor
- object that will extract results- Returns:
- an arbitrary result object, as returned by the
SourceExtractor
- Throws:
WebServiceClientException
- if there is a problem sending or receiving the message
-
sendSourceAndReceive
<T> T sendSourceAndReceive(String uri, Source requestPayload, SourceExtractor<T> responseExtractor) throws WebServiceClientException Sends a web service message that contains the given payload, reading the result with aSourceExtractor
.- 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
- Throws:
WebServiceClientException
- if there is a problem sending or receiving the message
-
sendSourceAndReceive
<T> T sendSourceAndReceive(Source requestPayload, WebServiceMessageCallback requestCallback, SourceExtractor<T> responseExtractor) throws WebServiceClientException 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!
- 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
- Throws:
WebServiceClientException
- if there is a problem sending or receiving the message
-
sendSourceAndReceive
<T> T sendSourceAndReceive(String uri, Source requestPayload, WebServiceMessageCallback requestCallback, SourceExtractor<T> responseExtractor) throws WebServiceClientException 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.
- 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
- Throws:
WebServiceClientException
- if there is a problem sending or receiving the message
-
sendSourceAndReceiveToResult
boolean sendSourceAndReceiveToResult(Source requestPayload, Result responseResult) throws WebServiceClientException 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!
- 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- Throws:
WebServiceClientException
- if there is a problem sending or receiving the message
-
sendSourceAndReceiveToResult
boolean sendSourceAndReceiveToResult(String uri, Source requestPayload, Result responseResult) throws WebServiceClientException Sends a web service message that contains the given payload. Writes the response, if any, to the givenResult
.- 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- Throws:
WebServiceClientException
- if there is a problem sending or receiving the message
-
sendSourceAndReceiveToResult
boolean sendSourceAndReceiveToResult(Source requestPayload, WebServiceMessageCallback requestCallback, Result responseResult) throws WebServiceClientException 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!
- 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- Throws:
WebServiceClientException
- if there is a problem sending or receiving the message
-
sendSourceAndReceiveToResult
boolean sendSourceAndReceiveToResult(String uri, Source requestPayload, WebServiceMessageCallback requestCallback, Result responseResult) throws WebServiceClientException 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.
- 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- Throws:
WebServiceClientException
- if there is a problem sending or receiving the message
-