Class AnnotationActionEndpointMapping
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.AbstractActionMethodEndpointMapping
org.springframework.ws.soap.addressing.server.AnnotationActionEndpointMapping
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.beans.factory.SmartInitializingSingleton,org.springframework.context.ApplicationContextAware,org.springframework.core.Ordered,EndpointMapping,SoapEndpointMapping
public class AnnotationActionEndpointMapping
extends AbstractActionMethodEndpointMapping
implements org.springframework.beans.factory.SmartInitializingSingleton
Implementation of the
EndpointMapping interface
that uses the @Action annotation to map methods to a WS-Addressing
Action header.
Endpoints typically have the following form:
@Endpoint
@Address("mailto:[email protected]")
public class MyEndpoint{
@Action("http://fabrikam123.example/mail/Delete")
public Source doSomethingWithRequest() {
...
}
}
If set, the @Address annotation on the endpoint class should be equal
to the
destination property of the incoming message.
-
Field Summary
Fields inherited from class org.springframework.ws.soap.addressing.server.AbstractActionEndpointMapping
DEFAULT_FAULT_ACTION_SUFFIX, DEFAULT_OUTPUT_ACTION_SUFFIXFields inherited from class org.springframework.xml.transform.TransformerObjectSupport
loggerFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected URIgetActionForMethod(Method method) Returns the action value for the specified method.protected URIgetEndpointAddress(Object endpoint) Returns the address property of the givenMethodEndpoint, by looking for theAddressannotation.protected Class<? extends Annotation>Returns the 'endpoint' annotation type.protected URIgetFaultAction(Object endpoint, MessageAddressingProperties map) Provides the WS-Addressing Action for response fault messages, given the endpoint, and request Message Addressing Properties.protected URIgetResponseAction(Object endpoint, MessageAddressingProperties map) Provides the WS-Addressing Action for response messages, given the endpoint, and request Message Addressing Properties.Methods inherited from class org.springframework.ws.soap.addressing.server.AbstractActionMethodEndpointMapping
getEndpointClass, registerMethodsMethods inherited from class org.springframework.ws.soap.addressing.server.AbstractActionEndpointMapping
getEndpointInternal, getFaultActionSuffix, getOutputActionSuffix, lookupEndpoint, registerEndpoint, setFaultActionSuffix, setOutputActionSuffixMethods inherited from class org.springframework.ws.soap.addressing.server.AbstractAddressingEndpointMapping
afterPropertiesSet, getApplicationContext, getEndpoint, getMessageIdStrategy, getMessageIdStrategy, getMessageSenders, getMessageSenders, getOrder, initDefaultStrategies, setActorOrRole, setActorsOrRoles, setApplicationContext, setMessageIdStrategy, setMessageSender, setMessageSenders, setOrder, setPostInterceptors, setPreInterceptors, setUltimateReceiver, setVersionsMethods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
-
Constructor Details
-
AnnotationActionEndpointMapping
public AnnotationActionEndpointMapping()
-
-
Method Details
-
getEndpointAnnotationType
Returns the 'endpoint' annotation type. Default isEndpoint. -
getActionForMethod
Returns the action value for the specified method. Default implementation looks for theActionannotation value.- Specified by:
getActionForMethodin classAbstractActionMethodEndpointMapping
-
getEndpointAddress
Returns the address property of the givenMethodEndpoint, by looking for theAddressannotation. The value of this property should match thedestinationof incoming messages. Returnsnullif the anotation is not present, thus ignoring the destination property.- Specified by:
getEndpointAddressin classAbstractActionEndpointMapping- Parameters:
endpoint- the method endpoint to return the address for- Returns:
- the endpoint address; or
nullto ignore the destination property
-
getResponseAction
Description copied from class:AbstractAddressingEndpointMappingProvides the WS-Addressing Action for response messages, given the endpoint, and request Message Addressing Properties.- Overrides:
getResponseActionin classAbstractActionEndpointMapping- Parameters:
endpoint- the mapped endpointmap- the MAP for the request- Returns:
- the response Action
-
getFaultAction
Description copied from class:AbstractAddressingEndpointMappingProvides the WS-Addressing Action for response fault messages, given the endpoint, and request Message Addressing Properties.- Overrides:
getFaultActionin classAbstractActionEndpointMapping- Parameters:
endpoint- the mapped endpointmap- the MAP for the request- Returns:
- the response Action
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiatedin interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-