Spring Web Services Framework

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

java.lang.Object
  extended by org.springframework.xml.transform.TransformerObjectSupport
      extended by org.springframework.ws.soap.addressing.server.AbstractAddressingEndpointMapping
          extended by org.springframework.ws.soap.addressing.server.AbstractActionEndpointMapping
All Implemented Interfaces:
Aware, InitializingBean, ApplicationContextAware, Ordered, EndpointMapping, SoapEndpointMapping
Direct Known Subclasses:
AbstractActionMethodEndpointMapping, SimpleActionEndpointMapping

public abstract class AbstractActionEndpointMapping
extends AbstractAddressingEndpointMapping
implements ApplicationContextAware

Abstract base class for WS-Addressing Action-mapped EndpointMapping implementations. Provides infrastructure for mapping endpoints to actions.

By default, this mapping creates a Action for reply messages based on the request message, plus the extra suffix, and a * By default, this mapping creates a Action for reply messages based on the request message, plus the extra suffix.

Since:
1.5.0
Author:
Arjen Poutsma

Field Summary
static String DEFAULT_FAULT_ACTION_SUFFIX
          The defaults suffix to add to response Action for reply messages.
static String DEFAULT_OUTPUT_ACTION_SUFFIX
          The defaults suffix to add to the request Action for reply messages.
 
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
AbstractActionEndpointMapping()
           
 
Method Summary
protected abstract  URI getEndpointAddress(Object endpoint)
          Returns the address property of the given endpoint.
protected  Object getEndpointInternal(MessageAddressingProperties map)
          Lookup an endpoint for the given MessageAddressingProperties, returning null if no specific one is found.
protected  URI getFaultAction(Object endpoint, MessageAddressingProperties requestMap)
          Provides the WS-Addressing Action for response fault messages, given the endpoint, and request Message Addressing Properties.
 String getFaultActionSuffix()
          Returns the suffix to add to request Actions for reply fault messages.
 String getOutputActionSuffix()
          Returns the suffix to add to request Actions for reply messages.
protected  URI getResponseAction(Object endpoint, MessageAddressingProperties requestMap)
          Provides the WS-Addressing Action for response messages, given the endpoint, and request Message Addressing Properties.
protected  Object lookupEndpoint(URI action)
          Looks up an endpoint instance for the given action.
protected  void registerEndpoint(URI action, Object endpoint)
          Register the specified endpoint for the given action URI.
 void setApplicationContext(ApplicationContext applicationContext)
           
 void setFaultActionSuffix(String faultActionSuffix)
          Sets the suffix to add to request Actions for reply fault messages.
 void setOutputActionSuffix(String outputActionSuffix)
          Sets the suffix to add to request Actions for reply messages.
 
Methods inherited from class org.springframework.ws.soap.addressing.server.AbstractAddressingEndpointMapping
afterPropertiesSet, getEndpoint, getMessageIdStrategy, getMessageIdStrategy, getMessageSenders, getMessageSenders, getOrder, initDefaultStrategies, setActorOrRole, setActorsOrRoles, setMessageIdStrategy, setMessageSender, setMessageSenders, setOrder, setPostInterceptors, setPreInterceptors, setUltimateReceiver, setVersions
 
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
 

Field Detail

DEFAULT_OUTPUT_ACTION_SUFFIX

public static final String DEFAULT_OUTPUT_ACTION_SUFFIX
The defaults suffix to add to the request Action for reply messages.

See Also:
Constant Field Values

DEFAULT_FAULT_ACTION_SUFFIX

public static final String DEFAULT_FAULT_ACTION_SUFFIX
The defaults suffix to add to response Action for reply messages.

See Also:
Constant Field Values
Constructor Detail

AbstractActionEndpointMapping

public AbstractActionEndpointMapping()
Method Detail

getOutputActionSuffix

public String getOutputActionSuffix()
Returns the suffix to add to request Actions for reply messages.


setOutputActionSuffix

public void setOutputActionSuffix(String outputActionSuffix)
Sets the suffix to add to request Actions for reply messages.

See Also:
DEFAULT_OUTPUT_ACTION_SUFFIX

getFaultActionSuffix

public String getFaultActionSuffix()
Returns the suffix to add to request Actions for reply fault messages.


setFaultActionSuffix

public void setFaultActionSuffix(String faultActionSuffix)
Sets the suffix to add to request Actions for reply fault messages.

See Also:
DEFAULT_FAULT_ACTION_SUFFIX

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)
                           throws BeansException
Specified by:
setApplicationContext in interface ApplicationContextAware
Throws:
BeansException

getEndpointInternal

protected final Object getEndpointInternal(MessageAddressingProperties map)
Description copied from class: AbstractAddressingEndpointMapping
Lookup an endpoint for the given MessageAddressingProperties, returning null if no specific one is found. This template method is called by AbstractAddressingEndpointMapping.getEndpoint(MessageContext).

Specified by:
getEndpointInternal in class AbstractAddressingEndpointMapping
Parameters:
map - the message addressing properties
Returns:
the endpoint, or null

getEndpointAddress

protected abstract URI getEndpointAddress(Object endpoint)
Returns the address property of the given endpoint. The value of this property should match the destination of incoming messages. May return null to ignore the destination.

Parameters:
endpoint - the endpoint to return the address for
Returns:
the endpoint address; or null to ignore the destination property

lookupEndpoint

protected Object lookupEndpoint(URI action)
Looks up an endpoint instance for the given action. All keys are tried in order.

Parameters:
action - the action URI
Returns:
the associated endpoint instance, or null if not found

registerEndpoint

protected void registerEndpoint(URI action,
                                Object endpoint)
                         throws BeansException,
                                IllegalStateException
Register the specified endpoint for the given action URI.

Parameters:
action - the action the bean should be mapped to
endpoint - the endpoint instance or endpoint bean name String (a bean name will automatically be resolved into the corresponding endpoint bean)
Throws:
BeansException - if the endpoint couldn't be registered
IllegalStateException - if there is a conflicting endpoint registered

getResponseAction

protected URI getResponseAction(Object endpoint,
                                MessageAddressingProperties requestMap)
Description copied from class: AbstractAddressingEndpointMapping
Provides the WS-Addressing Action for response messages, given the endpoint, and request Message Addressing Properties.

Specified by:
getResponseAction in class AbstractAddressingEndpointMapping
Parameters:
endpoint - the mapped endpoint
requestMap - the MAP for the request
Returns:
the response Action

getFaultAction

protected URI getFaultAction(Object endpoint,
                             MessageAddressingProperties requestMap)
Description copied from class: AbstractAddressingEndpointMapping
Provides the WS-Addressing Action for response fault messages, given the endpoint, and request Message Addressing Properties.

Specified by:
getFaultAction in class AbstractAddressingEndpointMapping
Parameters:
endpoint - the mapped endpoint
requestMap - the MAP for the request
Returns:
the response Action

Spring Web Services Framework

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