public abstract class AbstractAddressingEndpointMapping extends TransformerObjectSupport implements SoapEndpointMapping, ApplicationContextAware, InitializingBean, Ordered
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.
logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Modifier | Constructor and Description |
---|---|
protected |
AbstractAddressingEndpointMapping()
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
ApplicationContext |
getApplicationContext() |
EndpointInvocationChain |
getEndpoint(MessageContext messageContext)
Returns an endpoint and any interceptors for this message context.
|
protected abstract Object |
getEndpointInternal(MessageAddressingProperties map)
Lookup an endpoint for the given
MessageAddressingProperties , returning null 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.
|
MessageIdStrategy |
getMessageIdStrategy()
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.
|
WebServiceMessageSender[] |
getMessageSenders()
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.
|
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 |
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)
Sets a single SOAP actor/actorOrRole to apply to all endpoints mapped by the delegate endpoint mapping.
|
void |
setActorsOrRoles(String[] actorsOrRoles)
Sets the array of SOAP actors/actorsOrRoles to apply to all endpoints mapped by the delegate endpoint mapping.
|
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setMessageIdStrategy(MessageIdStrategy messageIdStrategy)
Sets the message id strategy used for creating WS-Addressing MessageIds.
|
void |
setMessageSender(WebServiceMessageSender messageSender)
Sets a single message senders, which is used to send out-of-band reply messages.
|
void |
setMessageSenders(WebServiceMessageSender[] messageSenders)
Sets the message senders, which are used to send out-of-band reply messages.
|
void |
setOrder(int order)
Specify the order value for this mapping.
|
void |
setPostInterceptors(EndpointInterceptor[] postInterceptors)
Set additional interceptors to be applied after the implicit WS-Addressing interceptor, e.g.
|
void |
setPreInterceptors(EndpointInterceptor[] preInterceptors)
Set additional interceptors to be applied before the implicit WS-Addressing interceptor, e.g.
|
void |
setUltimateReceiver(boolean ultimateReceiver)
Indicates whether this the endpoint fulfills the SOAP 1.2 Ultimate Receiver role.
|
void |
setVersions(AddressingVersion[] versions)
Sets the WS-Addressing versions to be supported by this mapping.
|
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
protected AbstractAddressingEndpointMapping()
protected void initDefaultStrategies()
Addressing200408
and Addressing10
versions of the specification, and the UuidMessageIdStrategy
.public final void setActorOrRole(String actorOrRole)
SoapEndpointMapping
setActorOrRole
in interface SoapEndpointMapping
public final void setActorsOrRoles(String[] actorsOrRoles)
SoapEndpointMapping
setActorsOrRoles
in interface SoapEndpointMapping
public final void setUltimateReceiver(boolean ultimateReceiver)
SoapEndpointMapping
setUltimateReceiver
in interface SoapEndpointMapping
public ApplicationContext getApplicationContext()
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public final void setOrder(int order)
Default value is Integer.MAX_VALUE
, meaning that it's non-ordered.
Ordered.getOrder()
public final void setPreInterceptors(EndpointInterceptor[] preInterceptors)
XwsSecurityInterceptor
.public final void setPostInterceptors(EndpointInterceptor[] postInterceptors)
PayloadLoggingInterceptor
.public final void setMessageIdStrategy(MessageIdStrategy messageIdStrategy)
By default, the UuidMessageIdStrategy
is used.
public MessageIdStrategy getMessageIdStrategy()
public final void setMessageSender(WebServiceMessageSender messageSender)
messageSender
- the message senderpublic final void setMessageSenders(WebServiceMessageSender[] messageSenders)
messageSenders
- the message senderspublic final WebServiceMessageSender[] getMessageSenders()
public final void setVersions(AddressingVersion[] versions)
By default, this array is set to support the August 2004
and the May 2006
versions of
the specification.
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public final EndpointInvocationChain getEndpoint(MessageContext messageContext) throws TransformerException
EndpointMapping
The returned EndpointExecutionChain
contains an endpoint Object, rather than even a tag interface,
so that endpoints are not constrained in any way. For example, a EndpointAdapter
could be written to
allow another framework's endpoint objects to be used.
Returns null
if no match was found. This is by design. The MessageDispatcher
will query
all registered EndpointMapping
beans to find a match, and only decide there is an error if none can
find an endpoint.
getEndpoint
in interface EndpointMapping
null
if
no mapping is foundTransformerException
protected WebServiceMessageSender[] getMessageSenders(Object endpoint)
getMessageSenders()
endpoint
- the endpointprotected MessageIdStrategy getMessageIdStrategy(Object endpoint)
getMessageIdStrategy()
endpoint
- the endpointprotected abstract Object getEndpointInternal(MessageAddressingProperties map)
MessageAddressingProperties
, returning null
if no specific
one is found. This template method is called by getEndpoint(MessageContext)
.map
- the message addressing propertiesnull
protected abstract URI getResponseAction(Object endpoint, MessageAddressingProperties requestMap)
endpoint
- the mapped endpointrequestMap
- the MAP for the requestprotected abstract URI getFaultAction(Object endpoint, MessageAddressingProperties requestMap)
endpoint
- the mapped endpointrequestMap
- the MAP for the request