Class AbstractAddressingEndpointMapping
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
,org.springframework.core.Ordered
,EndpointMapping
,SoapEndpointMapping
- Direct Known Subclasses:
AbstractActionEndpointMapping
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, Nate Stoddard
-
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
ModifierConstructorDescriptionprotected
Protected constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
org.springframework.context.ApplicationContext
final EndpointInvocationChain
getEndpoint
(MessageContext messageContext) Returns an endpoint and any interceptors for this message context.protected abstract Object
Lookup an endpoint for the givenMessageAddressingProperties
, returningnull
if no specific one is found.protected abstract URI
getFaultAction
(Object endpoint, MessageAddressingProperties requestMap) Provides the WS-Addressing Action for response fault messages, given the endpoint, and request Message Addressing Properties.Returns the message id strategy used for creating WS-Addressing MessageIds.protected MessageIdStrategy
getMessageIdStrategy
(Object endpoint) Returns the message ID strategy for the given endpoint.final WebServiceMessageSender[]
Returns the message senders, which are used to send out-of-band reply messages.protected WebServiceMessageSender[]
getMessageSenders
(Object endpoint) Returns the message senders for the given endpoint.final int
getOrder()
protected abstract URI
getResponseAction
(Object endpoint, MessageAddressingProperties requestMap) Provides the WS-Addressing Action for response messages, given the endpoint, and request Message Addressing Properties.protected void
Initializes the default implementation for this mapping's strategies: theAddressing200408
andAddressing10
versions of the specification, and theUuidMessageIdStrategy
.final void
setActorOrRole
(String actorOrRole) Sets a single SOAP actor/actorOrRole to apply to all endpoints mapped by the delegate endpoint mapping.final void
setActorsOrRoles
(String[] actorsOrRoles) Sets the array of SOAP actors/actorsOrRoles to apply to all endpoints mapped by the delegate endpoint mapping.void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) final void
setMessageIdStrategy
(MessageIdStrategy messageIdStrategy) Sets the message id strategy used for creating WS-Addressing MessageIds.final void
setMessageSender
(WebServiceMessageSender messageSender) Sets a single message senders, which is used to send out-of-band reply messages.final void
setMessageSenders
(WebServiceMessageSender[] messageSenders) Sets the message senders, which are used to send out-of-band reply messages.final void
setOrder
(int order) Specify the order value for this mapping.final void
setPostInterceptors
(EndpointInterceptor[] postInterceptors) Set additional interceptors to be applied after the implicit WS-Addressing interceptor, e.g.final void
setPreInterceptors
(EndpointInterceptor[] preInterceptors) Set additional interceptors to be applied before the implicit WS-Addressing interceptor, e.g.final void
setUltimateReceiver
(boolean ultimateReceiver) Indicates whether this the endpoint fulfills the SOAP 1.2 Ultimate Receiver role.final void
setVersions
(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
-
Constructor Details
-
AbstractAddressingEndpointMapping
protected AbstractAddressingEndpointMapping()Protected constructor. Initializes the default settings.
-
-
Method Details
-
initDefaultStrategies
protected void initDefaultStrategies()Initializes the default implementation for this mapping's strategies: theAddressing200408
andAddressing10
versions of the specification, and theUuidMessageIdStrategy
. -
setActorOrRole
Description copied from interface:SoapEndpointMapping
Sets a single SOAP actor/actorOrRole to apply to all endpoints mapped by the delegate endpoint mapping.- Specified by:
setActorOrRole
in interfaceSoapEndpointMapping
-
setActorsOrRoles
Description copied from interface:SoapEndpointMapping
Sets the array of SOAP actors/actorsOrRoles to apply to all endpoints mapped by the delegate endpoint mapping.- Specified by:
setActorsOrRoles
in interfaceSoapEndpointMapping
-
setUltimateReceiver
public final void setUltimateReceiver(boolean ultimateReceiver) Description copied from interface:SoapEndpointMapping
Indicates whether this the endpoint fulfills the SOAP 1.2 Ultimate Receiver role.- Specified by:
setUltimateReceiver
in interfaceSoapEndpointMapping
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext() -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
getOrder
public final int getOrder()- Specified by:
getOrder
in interfaceorg.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
Set additional interceptors to be applied before the implicit WS-Addressing interceptor, e.g.XwsSecurityInterceptor
. -
setPostInterceptors
Set additional interceptors to be applied after the implicit WS-Addressing interceptor, e.g.PayloadLoggingInterceptor
. -
setMessageIdStrategy
Sets the message id strategy used for creating WS-Addressing MessageIds.By default, the
UuidMessageIdStrategy
is used. -
getMessageIdStrategy
Returns the message id strategy used for creating WS-Addressing MessageIds. -
setMessageSender
Sets a single message senders, which is used to send out-of-band reply messages. If a request messages defines a non-anonymous reply address, this senders will be used to send the message.- Parameters:
messageSender
- the message sender
-
setMessageSenders
Sets the message senders, which 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.- Parameters:
messageSenders
- the message senders
-
getMessageSenders
Returns the message senders, which are used to send out-of-band reply messages.- Returns:
- the message sender
-
setVersions
Sets the WS-Addressing versions to be supported by this mapping.By default, this array is set to support
the August 2004
and theMay 2006
versions of the specification. -
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
getEndpoint
public final EndpointInvocationChain getEndpoint(MessageContext messageContext) throws TransformerException Description copied from interface:EndpointMapping
Returns an endpoint and any interceptors for this message context. The choice may be made on message contents, transport request url, a routing table, or any factor the implementing class chooses.The returned
EndpointExecutionChain
contains an endpoint Object, rather than even a tag interface, so that endpoints are not constrained in any way. For example, aEndpointAdapter
could be written to allow another framework's endpoint objects to be used.Returns
null
if no match was found. This is by design. TheMessageDispatcher
will query all registeredEndpointMapping
beans to find a match, and only decide there is an error if none can find an endpoint.- Specified by:
getEndpoint
in interfaceEndpointMapping
- Returns:
- a HandlerExecutionChain instance containing endpoint object and any interceptors, or
null
if no mapping is found - Throws:
TransformerException
-
getMessageSenders
Returns the message senders for the given endpoint. Default implementation returnsgetMessageSenders()
- Parameters:
endpoint
- the endpoint- Returns:
- the message senders for the given endpoint
-
getMessageIdStrategy
Returns the message ID strategy for the given endpoint. Default implementation returnsgetMessageIdStrategy()
- Parameters:
endpoint
- the endpoint- Returns:
- the message ID strategy for the given endpoint
-
getEndpointInternal
Lookup an endpoint for the givenMessageAddressingProperties
, returningnull
if no specific one is found. This template method is called bygetEndpoint(MessageContext)
.- Parameters:
map
- the message addressing properties- Returns:
- the endpoint, or
null
-
getResponseAction
Provides the WS-Addressing Action for response messages, given the endpoint, and request Message Addressing Properties.- Parameters:
endpoint
- the mapped endpointrequestMap
- the MAP for the request- Returns:
- the response Action
-
getFaultAction
Provides the WS-Addressing Action for response fault messages, given the endpoint, and request Message Addressing Properties.- Parameters:
endpoint
- the mapped endpointrequestMap
- the MAP for the request- Returns:
- the response Action
-