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
loggerFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.springframework.context.ApplicationContextfinal EndpointInvocationChaingetEndpoint(MessageContext messageContext) Returns an endpoint and any interceptors for this message context.protected abstract ObjectLookup an endpoint for the givenMessageAddressingProperties, returningnullif no specific one is found.protected abstract URIgetFaultAction(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 MessageIdStrategygetMessageIdStrategy(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 intgetOrder()protected abstract URIgetResponseAction(Object endpoint, MessageAddressingProperties requestMap) Provides the WS-Addressing Action for response messages, given the endpoint, and request Message Addressing Properties.protected voidInitializes the default implementation for this mapping's strategies: theAddressing200408andAddressing10versions of the specification, and theUuidMessageIdStrategy.final voidsetActorOrRole(String actorOrRole) Sets a single SOAP actor/actorOrRole to apply to all endpoints mapped by the delegate endpoint mapping.final voidsetActorsOrRoles(String[] actorsOrRoles) Sets the array of SOAP actors/actorsOrRoles to apply to all endpoints mapped by the delegate endpoint mapping.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) final voidsetMessageIdStrategy(MessageIdStrategy messageIdStrategy) Sets the message id strategy used for creating WS-Addressing MessageIds.final voidsetMessageSender(WebServiceMessageSender messageSender) Sets a single message senders, which is used to send out-of-band reply messages.final voidsetMessageSenders(WebServiceMessageSender[] messageSenders) Sets the message senders, which are used to send out-of-band reply messages.final voidsetOrder(int order) Specify the order value for this mapping.final voidsetPostInterceptors(EndpointInterceptor[] postInterceptors) Set additional interceptors to be applied after the implicit WS-Addressing interceptor, e.g.final voidsetPreInterceptors(EndpointInterceptor[] preInterceptors) Set additional interceptors to be applied before the implicit WS-Addressing interceptor, e.g.final voidsetUltimateReceiver(boolean ultimateReceiver) Indicates whether this the endpoint fulfills the SOAP 1.2 Ultimate Receiver role.final voidsetVersions(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: theAddressing200408andAddressing10versions of the specification, and theUuidMessageIdStrategy. -
setActorOrRole
Description copied from interface:SoapEndpointMappingSets a single SOAP actor/actorOrRole to apply to all endpoints mapped by the delegate endpoint mapping.- Specified by:
setActorOrRolein interfaceSoapEndpointMapping
-
setActorsOrRoles
Description copied from interface:SoapEndpointMappingSets the array of SOAP actors/actorsOrRoles to apply to all endpoints mapped by the delegate endpoint mapping.- Specified by:
setActorsOrRolesin interfaceSoapEndpointMapping
-
setUltimateReceiver
public final void setUltimateReceiver(boolean ultimateReceiver) Description copied from interface:SoapEndpointMappingIndicates whether this the endpoint fulfills the SOAP 1.2 Ultimate Receiver role.- Specified by:
setUltimateReceiverin interfaceSoapEndpointMapping
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext() -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getOrder
public final int getOrder()- Specified by:
getOrderin 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
UuidMessageIdStrategyis 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 2004and theMay 2006versions of the specification. -
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getEndpoint
public final EndpointInvocationChain getEndpoint(MessageContext messageContext) throws TransformerException Description copied from interface:EndpointMappingReturns 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
EndpointExecutionChaincontains an endpoint Object, rather than even a tag interface, so that endpoints are not constrained in any way. For example, aEndpointAdaptercould be written to allow another framework's endpoint objects to be used.Returns
nullif no match was found. This is by design. TheMessageDispatcherwill query all registeredEndpointMappingbeans to find a match, and only decide there is an error if none can find an endpoint.- Specified by:
getEndpointin interfaceEndpointMapping- Returns:
- a HandlerExecutionChain instance containing endpoint object and any interceptors, or
nullif 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, returningnullif 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
-