org.springframework.ws.soap.addressing.server
Class SimpleActionEndpointMapping
java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.soap.addressing.server.AbstractAddressingEndpointMapping
org.springframework.ws.soap.addressing.server.AbstractActionEndpointMapping
org.springframework.ws.soap.addressing.server.SimpleActionEndpointMapping
All Implemented Interfaces: Aware , InitializingBean , ApplicationContextAware , Ordered , EndpointMapping , SoapEndpointMapping
public class SimpleActionEndpointMapping extends AbstractActionEndpointMapping
Implementation of the EndpointMapping
interface to map from WS-Addressing Action
Message
Addressing Property to endpoint beans. Supports both mapping to bean instances and mapping to bean names.
The endpointMap
property is suitable for populating the endpoint map with bean references, e.g. via the
map element in XML bean definitions.
Mappings to bean names can be set via the mappings
property, in a form accepted by the
java.util.Properties
class, like as follows:
http://www.springframework.org/spring-ws/samples/airline/BookFlight=bookFlightEndpoint
http://www.springframework.org/spring-ws/samples/airline/GetFlights=getFlightsEndpoint
The syntax is WS_ADDRESSING_ACTION=ENDPOINT_BEAN_NAME.
If set, the address
property should be equal to the destination
property of the
incominging message. As such, it can be used to create multiple Endpoint References, by defining multiple
SimpleActionEndpointMapping
bean definitions with different address
property values.
Since:
1.5.0
Author:
Arjen Poutsma
See Also: MessageAddressingProperties.getAction()
Methods inherited from class org.springframework.ws.soap.addressing.server.AbstractAddressingEndpointMapping
getEndpoint , getMessageIdStrategy , getMessageIdStrategy , getMessageSenders , getMessageSenders , getOrder , initDefaultStrategies , setActorOrRole , setActorsOrRoles , setMessageIdStrategy , setMessageSender , setMessageSenders , setOrder , setPostInterceptors , setPreInterceptors , setUltimateReceiver , setVersions
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
SimpleActionEndpointMapping
public SimpleActionEndpointMapping ()
setMappings
public void setMappings (Properties mappings)
throws URISyntaxException
Map action URIs to endpoint bean names. This is the typical way of configuring this EndpointMapping.
Parameters: mappings
- properties with URLs as keys and bean names as values
Throws:
URISyntaxException
See Also: setActionMap(java.util.Map)
setActionMap
public void setActionMap (Map <?,Object > actionMap)
throws URISyntaxException
Set a Map with action URIs as keys and handler beans (or handler bean names) as values. Convenient for population
with bean references.
Parameters: actionMap
- map with action URIs as keys and beans as values
Throws:
URISyntaxException
See Also: setMappings(java.util.Properties)
setAddress
public void setAddress (URI address)
Set the address property. If set, value of this property is compared to the destination
property of the
incominging message.
Parameters: address
- the address URI
afterPropertiesSet
public void afterPropertiesSet ()
throws Exception
Specified by: afterPropertiesSet
in interface InitializingBean
Overrides: afterPropertiesSet
in class AbstractAddressingEndpointMapping
Throws:
Exception
registerEndpoints
protected void registerEndpoints (Map <URI ,Object > actionMap)
throws BeansException
Register all endpoints specified in the action map.
Parameters: actionMap
- Map with action URIs as keys and endppint beans or bean names as values
Throws:
BeansException
- if an endpoint couldn't be registered
IllegalStateException
- if there is a conflicting endpoint registered
getEndpointAddress
protected URI getEndpointAddress (Object endpoint)
Description copied from class: AbstractActionEndpointMapping
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.
Specified by: getEndpointAddress
in class AbstractActionEndpointMapping
Parameters: endpoint
- the endpoint to return the address for
Returns: the endpoint address; or null
to ignore the destination property
Copyright © 2005-2013 The Spring Web Services Framework . All Rights Reserved.