Class SoapActionEndpointMapping
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping
org.springframework.ws.server.endpoint.mapping.AbstractMapBasedEndpointMapping
org.springframework.ws.soap.server.endpoint.mapping.SoapActionEndpointMapping
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.core.Ordered,EndpointMapping,SoapEndpointMapping
public class SoapActionEndpointMapping
extends AbstractMapBasedEndpointMapping
implements SoapEndpointMapping
Implementation of the
EndpointMapping interface to map from SOAPAction headers to endpoint beans.
Supports both mapping to bean instances and mapping to bean names: the latter is required for prototype handlers.
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=getFlightsEndpointThe syntax is SOAP_ACTION=ENDPOINT_BEAN_NAME.
This endpoint mapping does not read from the request message, and therefore is more suitable for message factories
which directly read from the transport request (such as the SaajSoapMessageFactory with the
payloadCaching disabled).
- Since:
- 1.0.0
- Author:
- Arjen Poutsma
-
Field Summary
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
loggerFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final EndpointInvocationChaincreateEndpointInvocationChain(MessageContext messageContext, Object endpoint, EndpointInterceptor[] interceptors) Creates a newSoapEndpointInvocationChainbased on the given endpoint, and the set interceptors, and actors/roles.protected StringgetLookupKeyForMessage(MessageContext messageContext) Returns the endpoint key for the given message context.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.final voidsetUltimateReceiver(boolean ultimateReceiver) Indicates whether this the endpoint fulfills the SOAP 1.2 Ultimate Receiver role.protected booleanvalidateLookupKey(String key) Validates the given endpoint key.Methods inherited from class org.springframework.ws.server.endpoint.mapping.AbstractMapBasedEndpointMapping
getEndpointInternal, initApplicationContext, lookupEndpoint, registerEndpoint, setEndpointMap, setLazyInitEndpoints, setMappings, setRegisterBeanNamesMethods inherited from class org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping
getDefaultEndpoint, getEndpoint, getInterceptors, getOrder, initInterceptors, resolveStringEndpoint, setDefaultEndpoint, setInterceptors, setOrderMethods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, isContextRequired, obtainApplicationContext, requiredContextClass, setApplicationContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ws.server.EndpointMapping
getEndpoint
-
Constructor Details
-
SoapActionEndpointMapping
public SoapActionEndpointMapping()
-
-
Method Details
-
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
-
createEndpointInvocationChain
protected final EndpointInvocationChain createEndpointInvocationChain(MessageContext messageContext, Object endpoint, EndpointInterceptor[] interceptors) Creates a newSoapEndpointInvocationChainbased on the given endpoint, and the set interceptors, and actors/roles.- Overrides:
createEndpointInvocationChainin classAbstractEndpointMapping- Parameters:
endpoint- the endpointinterceptors- the endpoint interceptors- Returns:
- the created invocation chain
- See Also:
-
getLookupKeyForMessage
Description copied from class:AbstractMapBasedEndpointMappingReturns the endpoint key for the given message context. Returnsnullif a key cannot be found.- Specified by:
getLookupKeyForMessagein classAbstractMapBasedEndpointMapping- Returns:
- the registration key; or
null - Throws:
Exception
-
validateLookupKey
Description copied from class:AbstractMapBasedEndpointMappingValidates the given endpoint key. Should returntrueis the given string is valid.- Specified by:
validateLookupKeyin classAbstractMapBasedEndpointMapping
-