org.springframework.ws.soap.addressing.server
Class AbstractAddressingEndpointMappingHacked

java.lang.Object
  extended by org.springframework.xml.transform.TransformerObjectSupport
      extended by org.springframework.ws.soap.addressing.server.AbstractAddressingEndpointMappingHacked
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered, org.springframework.ws.server.EndpointMapping, org.springframework.ws.soap.server.SoapEndpointMapping
Direct Known Subclasses:
WSACamelEndpointMapping

public abstract class AbstractAddressingEndpointMappingHacked
extends org.springframework.xml.transform.TransformerObjectSupport
implements org.springframework.ws.soap.server.SoapEndpointMapping, org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered

THIS CLASS WILL BE REMOVED, WHEN THE FOLLOWING ISSUE WILL BE SOLVED: https://jira.springsource.org/browse/SWS-817 Abstract base class for EndpointMapping implementations that handle WS-Addressing. Besides the normal SoapEndpointMapping properties, this mapping has a versions property, which defines the WS-Addressing specifications supported. By default, these are Addressing200408 and Addressing10.

The messageIdStrategy property defines the strategy to use for creating reply MessageIDs. By default, this is the UuidMessageIdStrategy.

The messageSenders are used to send out-of-band reply messages. If a request messages defines a non-anonymous reply address, these senders will be used to send the message.

This mapping (and all subclasses) uses an implicit WS-Addressing EndpointInterceptor, which is added in every EndpointInvocationChain produced. As such, this mapping does not have the standard interceptors property, but rather a preInterceptors and postInterceptors property, which are added before and after the implicit WS-Addressing interceptor, respectively.

Since:
1.5.0
Author:
Arjen Poutsma, Andrej Zachar

Field Summary
 
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
protected AbstractAddressingEndpointMappingHacked()
          Protected constructor.
 
Method Summary
 void afterPropertiesSet()
           
 org.springframework.ws.server.EndpointInvocationChain getEndpoint(org.springframework.ws.context.MessageContext messageContext)
           
protected abstract  Object getEndpointInternal(org.springframework.ws.soap.addressing.core.MessageAddressingProperties map)
          Lookup an endpoint for the given MessageAddressingProperties, returning null if no specific one is found.
protected abstract  URI getFaultAction(Object endpoint, org.springframework.ws.soap.addressing.core.MessageAddressingProperties requestMap)
          Provides the WS-Addressing Action for response fault messages, given the endpoint, and request Message Addressing Properties.
 org.springframework.ws.transport.WebServiceMessageSender[] getMessageSenders()
           
protected  org.springframework.ws.transport.WebServiceMessageSender[] getMessageSenders(Object endpoint)
          Default implementation
protected  org.springframework.ws.soap.addressing.messageid.MessageIdStrategy getMessageStrategy(Object endpoint)
          Default implementation
 int getOrder()
           
protected abstract  URI getResponseAction(Object endpoint, org.springframework.ws.soap.addressing.core.MessageAddressingProperties requestMap)
          Provides the WS-Addressing Action for response messages, given the endpoint, and request Message Addressing Properties.
protected  void initDefaultStrategies()
          Initializes the default implementation for this mapping's strategies: the Addressing200408 and Addressing10 versions of the specification, and the UuidMessageIdStrategy.
 void setActorOrRole(String actorOrRole)
           
 void setActorsOrRoles(String[] actorsOrRoles)
           
 void setMessageIdStrategy(org.springframework.ws.soap.addressing.messageid.MessageIdStrategy messageIdStrategy)
          Sets the message id strategy used for creating WS-Addressing MessageIds.
 void setMessageSender(org.springframework.ws.transport.WebServiceMessageSender messageSender)
          Sets the single message sender used for sending messages.
 void setMessageSenders(org.springframework.ws.transport.WebServiceMessageSender[] messageSenders)
           
 void setOrder(int order)
          Specify the order value for this mapping.
 void setPostInterceptors(org.springframework.ws.server.EndpointInterceptor[] postInterceptors)
          Set additional interceptors to be applied after the implicit WS-Addressing interceptor, e.g.
 void setPreInterceptors(org.springframework.ws.server.EndpointInterceptor[] preInterceptors)
          Set additional interceptors to be applied before the implicit WS-Addressing interceptor, e.g.
 void setUltimateReceiver(boolean ultimateReceiver)
           
 void setVersions(org.springframework.ws.soap.addressing.version.AddressingVersion[] versions)
          Sets the WS-Addressing versions to be supported by this mapping.
 
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

AbstractAddressingEndpointMappingHacked

protected AbstractAddressingEndpointMappingHacked()
Protected constructor. Initializes the default settings.

Method Detail

initDefaultStrategies

protected void initDefaultStrategies()
Initializes the default implementation for this mapping's strategies: the Addressing200408 and Addressing10 versions of the specification, and the UuidMessageIdStrategy.


setActorOrRole

public final void setActorOrRole(String actorOrRole)
Specified by:
setActorOrRole in interface org.springframework.ws.soap.server.SoapEndpointMapping

setActorsOrRoles

public final void setActorsOrRoles(String[] actorsOrRoles)
Specified by:
setActorsOrRoles in interface org.springframework.ws.soap.server.SoapEndpointMapping

setUltimateReceiver

public final void setUltimateReceiver(boolean ultimateReceiver)
Specified by:
setUltimateReceiver in interface org.springframework.ws.soap.server.SoapEndpointMapping

getOrder

public final int getOrder()
Specified by:
getOrder in interface org.springframework.core.Ordered

setOrder

public final void setOrder(int order)
Specify the order value for this mapping.

Default value is Integer.MAX_VALUE, meaning that it's non-ordered.

See Also:
Ordered.getOrder()

setPreInterceptors

public final void setPreInterceptors(org.springframework.ws.server.EndpointInterceptor[] preInterceptors)
Set additional interceptors to be applied before the implicit WS-Addressing interceptor, e.g. XwsSecurityInterceptor.


setPostInterceptors

public final void setPostInterceptors(org.springframework.ws.server.EndpointInterceptor[] postInterceptors)
Set additional interceptors to be applied after the implicit WS-Addressing interceptor, e.g. PayloadLoggingInterceptor.


setMessageIdStrategy

public final void setMessageIdStrategy(org.springframework.ws.soap.addressing.messageid.MessageIdStrategy messageIdStrategy)
Sets the message id strategy used for creating WS-Addressing MessageIds.

By default, the UuidMessageIdStrategy is used.


setMessageSender

public void setMessageSender(org.springframework.ws.transport.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 final void setMessageSenders(org.springframework.ws.transport.WebServiceMessageSender[] messageSenders)

getMessageSenders

public final org.springframework.ws.transport.WebServiceMessageSender[] getMessageSenders()

setVersions

public final void setVersions(org.springframework.ws.soap.addressing.version.AddressingVersion[] versions)
Sets the WS-Addressing versions to be supported by this mapping.

By default, this array is set to support the August 2004 and the May 2006 versions of the specification.


afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

getEndpoint

public final org.springframework.ws.server.EndpointInvocationChain getEndpoint(org.springframework.ws.context.MessageContext messageContext)
                                                                        throws TransformerException
Specified by:
getEndpoint in interface org.springframework.ws.server.EndpointMapping
Throws:
TransformerException

getMessageStrategy

protected org.springframework.ws.soap.addressing.messageid.MessageIdStrategy getMessageStrategy(Object endpoint)
Default implementation

Parameters:
endpoint - specific message strategy
Returns:

getMessageSenders

protected org.springframework.ws.transport.WebServiceMessageSender[] getMessageSenders(Object endpoint)
Default implementation

Parameters:
endpoint -
Returns:
endpoint specific message senders

getEndpointInternal

protected abstract Object getEndpointInternal(org.springframework.ws.soap.addressing.core.MessageAddressingProperties map)
Lookup an endpoint for the given MessageAddressingProperties, returning null if no specific one is found. This template method is called by getEndpoint(MessageContext).

Parameters:
map - the message addressing properties
Returns:
the endpoint, or null

getResponseAction

protected abstract URI getResponseAction(Object endpoint,
                                         org.springframework.ws.soap.addressing.core.MessageAddressingProperties requestMap)
Provides the WS-Addressing Action for response messages, given the endpoint, and request Message Addressing Properties.

Parameters:
endpoint - the mapped endpoint
requestMap - the MAP for the request
Returns:
the response Action

getFaultAction

protected abstract URI getFaultAction(Object endpoint,
                                      org.springframework.ws.soap.addressing.core.MessageAddressingProperties requestMap)
Provides the WS-Addressing Action for response fault messages, given the endpoint, and request Message Addressing Properties.

Parameters:
endpoint - the mapped endpoint
requestMap - the MAP for the request
Returns:
the response Action


Apache Camel