public abstract class WebServiceAccessor extends TransformerObjectSupport implements org.springframework.beans.factory.InitializingBean
WebServiceTemplate
and other WS-accessing helpers. Defines common properties like the
WebServiceMessageFactory
and WebServiceMessageSender
.
Not intended to be used directly. See WebServiceTemplate
.
WebServiceTemplate
logger
Constructor and Description |
---|
WebServiceAccessor() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected WebServiceConnection |
createConnection(URI uri)
Creates a connection to the given URI, or throws an exception when it cannot be resolved.
|
WebServiceMessageFactory |
getMessageFactory()
Returns the message factory used for creating messages.
|
WebServiceMessageSender[] |
getMessageSenders()
Returns the message senders used for sending messages.
|
void |
setMessageFactory(WebServiceMessageFactory messageFactory)
Sets the message factory used for creating messages.
|
void |
setMessageSender(WebServiceMessageSender messageSender)
Sets the single message sender used for sending messages.
|
void |
setMessageSenders(WebServiceMessageSender[] messageSenders)
Sets the message senders used for sending messages.
|
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
public WebServiceMessageFactory getMessageFactory()
public void setMessageFactory(WebServiceMessageFactory messageFactory)
public WebServiceMessageSender[] getMessageSenders()
public void setMessageSender(WebServiceMessageSender messageSender)
This message sender will be used to resolve an URI to a WebServiceConnection
.
createConnection(URI)
public void setMessageSenders(WebServiceMessageSender[] messageSenders)
These message senders will be used to resolve an URI to a WebServiceConnection
.
createConnection(URI)
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
protected WebServiceConnection createConnection(URI uri) throws IOException
Default implementation iterates over all configured WebServiceMessageSender
objects, and calls WebServiceMessageSender.supports(URI)
for each of them. If the sender supports the parameter URI, it creates a
connection using WebServiceMessageSender.createConnection(URI)
.
uri
- the URI to open a connection toIllegalArgumentException
- when the uri cannot be resolvedIOException
- when an I/O error occurs