Spring Web Services Framework

org.springframework.ws.client.support
Class WebServiceAccessor

java.lang.Object
  extended by org.springframework.xml.transform.TransformerObjectSupport
      extended by org.springframework.ws.client.support.WebServiceAccessor
All Implemented Interfaces:
InitializingBean
Direct Known Subclasses:
WebServiceTemplate

public abstract class WebServiceAccessor
extends TransformerObjectSupport
implements 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
Author:
Arjen Poutsma
See Also:
WebServiceTemplate

Field Summary
 
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger
 
Constructor Summary
WebServiceAccessor()
           
 
Method Summary
 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.
 
Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebServiceAccessor

public WebServiceAccessor()
Method Detail

getMessageFactory

public WebServiceMessageFactory getMessageFactory()
Returns the message factory used for creating messages.


setMessageFactory

public void setMessageFactory(WebServiceMessageFactory messageFactory)
Sets the message factory used for creating messages.


getMessageSenders

public WebServiceMessageSender[] getMessageSenders()
Returns the message senders used for sending messages.


setMessageSender

public void setMessageSender(WebServiceMessageSender messageSender)
Sets the single message sender used for sending messages.

This message sender will be used to resolve an URI to a WebServiceConnection.

See Also:
createConnection(URI)

setMessageSenders

public void setMessageSenders(WebServiceMessageSender[] messageSenders)
Sets the message senders used for sending messages.

These message senders will be used to resolve an URI to a WebServiceConnection.

See Also:
createConnection(URI)

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface InitializingBean

createConnection

protected WebServiceConnection createConnection(URI uri)
                                         throws IOException
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 calls WebServiceMessageSender.supports(URI) for each of them. If the sender supports the parameter URI, it creates a connection using WebServiceMessageSender.createConnection(URI) .

Parameters:
uri - the URI to open a connection to
Returns:
the created connection
Throws:
IllegalArgumentException - when the uri cannot be resolved
IOException - when an I/O error occurs

Spring Web Services Framework

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