Class WebServiceAccessor
java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.client.support.WebServiceAccessor
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
WebServiceTemplate
public abstract class WebServiceAccessor
extends TransformerObjectSupport
implements org.springframework.beans.factory.InitializingBean
Base class for
WebServiceTemplate
and other WS-accessing helpers. Defines
common properties like the WebServiceMessageFactory
and
WebServiceMessageSender
.
Not intended to be used directly. See
WebServiceTemplate
.
- Since:
- 1.0.0
- See Also:
-
Field Summary
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected WebServiceConnection
createConnection
(URI uri) Creates a connection to the given URI, or throws an exception when it cannot be resolved.Returns the message factory used for creating messages.Return themessage senders
to consider for sending messages.void
setMessageFactory
(WebServiceMessageFactory messageFactory) Sets the message factory used for creating messages.void
setMessageSender
(WebServiceMessageSender messageSender) Set the message sender to use.void
setMessageSenders
(WebServiceMessageSender[] messageSenders) Set the message senders to use.Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
-
Constructor Details
-
WebServiceAccessor
public WebServiceAccessor()
-
-
Method Details
-
getMessageFactory
Returns the message factory used for creating messages. -
setMessageFactory
Sets the message factory used for creating messages. -
getMessageSenders
Return themessage senders
to consider for sending messages. -
setMessageSender
Set the message sender to use.- See Also:
-
setMessageSenders
Set the message senders to use. The first instance that supports a given URI is used. This allows for using a singe instance with various transport implementations.WebServiceConnection
.- See Also:
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
createConnection
Creates a connection to the given URI, or throws an exception when it cannot be resolved.Default implementation iterates over all configured
WebServiceMessageSender
objects, and callsWebServiceMessageSender.supports(URI)
for each of them. If the sender supports the parameter URI, it creates a connection usingWebServiceMessageSender.createConnection(URI)
.- Parameters:
uri
- the URI to open a connection to- Returns:
- the created connection
- Throws:
IllegalArgumentException
- when the uri cannot be resolvedIOException
- when an I/O error occurs
-