Spring Web Services Framework

org.springframework.ws.client.core
Interface WebServiceOperations

All Known Implementing Classes:
WebServiceTemplate

public interface WebServiceOperations

Specifies a basic set of Web service operations. Implemented by 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:
WebServiceTemplate

Method Summary
 Object marshalSendAndReceive(Object requestPayload)
          Sends a web service message that contains the given payload, marshalled by the configured Marshaller.
 Object marshalSendAndReceive(Object requestPayload, WebServiceMessageCallback requestCallback)
          Sends a web service message that contains the given payload, marshalled by the configured Marshaller.
 Object marshalSendAndReceive(String uri, Object requestPayload)
          Sends a web service message that contains the given payload, marshalled by the configured Marshaller.
 Object marshalSendAndReceive(String uri, Object requestPayload, WebServiceMessageCallback requestCallback)
          Sends a web service message that contains the given payload, marshalled by the configured Marshaller.
 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.
 Object sendAndReceive(String uri, WebServiceMessageCallback requestCallback, WebServiceMessageExtractor responseExtractor)
          Sends a web service message that can be manipulated with the given callback, reading the result with a WebServiceMessageExtractor.
 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.
 Object sendAndReceive(WebServiceMessageCallback requestCallback, WebServiceMessageExtractor responseExtractor)
          Sends a web service message that can be manipulated with the given callback, reading the result with a WebServiceMessageExtractor.
 Object sendSourceAndReceive(Source requestPayload, SourceExtractor responseExtractor)
          Sends a web service message that contains the given payload, reading the result with a SourceExtractor.
 Object sendSourceAndReceive(Source requestPayload, WebServiceMessageCallback requestCallback, SourceExtractor responseExtractor)
          Sends a web service message that contains the given payload, reading the result with a SourceExtractor.
 Object sendSourceAndReceive(String uri, Source requestPayload, SourceExtractor responseExtractor)
          Sends a web service message that contains the given payload, reading the result with a SourceExtractor.
 Object sendSourceAndReceive(String uri, Source requestPayload, WebServiceMessageCallback requestCallback, SourceExtractor responseExtractor)
          Sends a web service message that contains the given payload, reading the result with a SourceExtractor.
 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.
 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.
 

Method Detail

sendAndReceive

Object sendAndReceive(WebServiceMessageCallback requestCallback,
                      WebServiceMessageExtractor responseExtractor)
                      throws WebServiceClientException
Sends a web service message that can be manipulated with the given callback, reading the result with a WebServiceMessageExtractor.

This will only work with a default uri specified!

Parameters:
requestCallback - the requestCallback to be used for manipulating the request message
responseExtractor - 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

Object sendAndReceive(String uri,
                      WebServiceMessageCallback requestCallback,
                      WebServiceMessageExtractor responseExtractor)
                      throws WebServiceClientException
Sends a web service message that can be manipulated with the given callback, reading the result with a WebServiceMessageExtractor.

Parameters:
uri - the URI to send the message to
requestCallback - the requestCallback to be used for manipulating the request message
responseExtractor - 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 message
responseCallback - 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 to
requestCallback - the callback to be used for manipulating the request message
responseCallback - 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 XmlMappingException,
                                    WebServiceClientException
Sends a web service message that contains the given payload, marshalled by the configured Marshaller. Returns the unmarshalled payload of the response message, if any.

This will only work with a default 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:
XmlMappingException - if there is a problem marshalling or unmarshalling
WebServiceClientException - if there is a problem sending or receiving the message
See Also:
WebServiceTemplate.setMarshaller(org.springframework.oxm.Marshaller), WebServiceTemplate.setUnmarshaller(org.springframework.oxm.Unmarshaller)

marshalSendAndReceive

Object marshalSendAndReceive(String uri,
                             Object requestPayload)
                             throws XmlMappingException,
                                    WebServiceClientException
Sends a web service message that contains the given payload, marshalled by the configured Marshaller. Returns the unmarshalled payload of the response message, if any.

Parameters:
uri - the URI to send the message to
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:
XmlMappingException - if there is a problem marshalling or unmarshalling
WebServiceClientException - if there is a problem sending or receiving the message
See Also:
WebServiceTemplate.setMarshaller(org.springframework.oxm.Marshaller), WebServiceTemplate.setUnmarshaller(org.springframework.oxm.Unmarshaller)

marshalSendAndReceive

Object marshalSendAndReceive(Object requestPayload,
                             WebServiceMessageCallback requestCallback)
                             throws XmlMappingException,
                                    WebServiceClientException
Sends a web service message that contains the given payload, marshalled by the configured Marshaller. 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 specified!

Parameters:
requestPayload - the object to marshal into the request message payload
requestCallback - callback to change message, can be null
Returns:
the unmarshalled payload of the response message, or null if no response is given
Throws:
XmlMappingException - if there is a problem marshalling or unmarshalling
WebServiceClientException - if there is a problem sending or receiving the message
See Also:
WebServiceTemplate.setMarshaller(org.springframework.oxm.Marshaller), WebServiceTemplate.setUnmarshaller(org.springframework.oxm.Unmarshaller)

marshalSendAndReceive

Object marshalSendAndReceive(String uri,
                             Object requestPayload,
                             WebServiceMessageCallback requestCallback)
                             throws XmlMappingException,
                                    WebServiceClientException
Sends a web service message that contains the given payload, marshalled by the configured Marshaller. 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 to
requestPayload - the object to marshal into the request message payload
requestCallback - callback to change message, can be null
Returns:
the unmarshalled payload of the response message, or null if no response is given
Throws:
XmlMappingException - if there is a problem marshalling or unmarshalling
WebServiceClientException - if there is a problem sending or receiving the message
See Also:
WebServiceTemplate.setMarshaller(org.springframework.oxm.Marshaller), WebServiceTemplate.setUnmarshaller(org.springframework.oxm.Unmarshaller)

sendSourceAndReceive

Object sendSourceAndReceive(Source requestPayload,
                            SourceExtractor responseExtractor)
                            throws WebServiceClientException
Sends a web service message that contains the given payload, reading the result with a SourceExtractor.

This will only work with a default specified!

Parameters:
requestPayload - the payload of the request message
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

Object sendSourceAndReceive(String uri,
                            Source requestPayload,
                            SourceExtractor responseExtractor)
                            throws WebServiceClientException
Sends a web service message that contains the given payload, reading the result with a SourceExtractor.

Parameters:
uri - the URI to send the message to
requestPayload - the payload of the request message
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

Object sendSourceAndReceive(Source requestPayload,
                            WebServiceMessageCallback requestCallback,
                            SourceExtractor responseExtractor)
                            throws WebServiceClientException
Sends a web service message that contains the given payload, reading the result with a SourceExtractor.

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 message
requestCallback - callback to change message, can be null
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

Object sendSourceAndReceive(String uri,
                            Source requestPayload,
                            WebServiceMessageCallback requestCallback,
                            SourceExtractor responseExtractor)
                            throws WebServiceClientException
Sends a web service message that contains the given payload, reading the result with a SourceExtractor.

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 to
requestPayload - the payload of the request message
requestCallback - callback to change message, can be null
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 given Result.

This will only work with a default uri specified!

Parameters:
requestPayload - the payload of the request message
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,
                                     Result responseResult)
                                     throws WebServiceClientException
Sends a web service message that contains the given payload. Writes the response, if any, to the given Result.

Parameters:
uri - the URI to send the message to
requestPayload - the payload of the request message
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(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 given Result.

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 message
requestCallback - callback to change message, can be null
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 given Result.

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 to
requestPayload - the payload of the request message
requestCallback - callback to change message, can be null
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

Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.