Spring Web Services Framework

org.springframework.ws.server.endpoint.mapping.jaxb
Class XmlRootElementEndpointMapping

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping
          extended by org.springframework.ws.server.endpoint.mapping.AbstractMethodEndpointMapping<T>
              extended by org.springframework.ws.server.endpoint.mapping.AbstractAnnotationMethodEndpointMapping<QName>
                  extended by org.springframework.ws.server.endpoint.mapping.jaxb.XmlRootElementEndpointMapping
All Implemented Interfaces:
Aware, ApplicationContextAware, Ordered, EndpointMapping

public class XmlRootElementEndpointMapping
extends AbstractAnnotationMethodEndpointMapping<QName>

Implementation of the EndpointMapping interface that uses the JAXB2 XmlRootElement annotation to map methods to request payload root elements.

Endpoints typically have the following form:

 @Endpoint
 public class MyEndpoint{
    public void doSomethingWithRequest(@RequestBody MyRootElement rootElement) {
       ...
    }
 }
 
where MyRootElement is annotated with @XmlRootElement:
 @XmlRootElement(name = "myRoot", namespace = "http://springframework.org/spring-ws")
 public class MyRootElement {
   ...
 }
 

Since:
2.0
Author:
Arjen Poutsma

Field Summary
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
XmlRootElementEndpointMapping()
           
 
Method Summary
protected  QName getLookupKeyForMessage(MessageContext messageContext)
          Returns the the endpoint keys for the given message context.
protected  QName getLookupKeyForMethod(Method method)
          Returns the the endpoint keys for the given method.
 void setTransformerHelper(TransformerHelper transformerHelper)
           
 
Methods inherited from class org.springframework.ws.server.endpoint.mapping.AbstractAnnotationMethodEndpointMapping
getEndpointAnnotationType, initApplicationContext, setDetectEndpointsInAncestorContexts
 
Methods inherited from class org.springframework.ws.server.endpoint.mapping.AbstractMethodEndpointMapping
getEndpointClass, getEndpointInternal, lookupEndpoint, registerEndpoint, registerMethods, registerMethods
 
Methods inherited from class org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping
createEndpointInvocationChain, getDefaultEndpoint, getEndpoint, getInterceptors, getOrder, initInterceptors, resolveStringEndpoint, setDefaultEndpoint, setInterceptors, setOrder
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, isContextRequired, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRootElementEndpointMapping

public XmlRootElementEndpointMapping()
Method Detail

setTransformerHelper

public void setTransformerHelper(TransformerHelper transformerHelper)

getLookupKeyForMethod

protected QName getLookupKeyForMethod(Method method)
Description copied from class: AbstractMethodEndpointMapping
Returns the the endpoint keys for the given method. Returns null if the method is not to be registered, which is the default.

Overrides:
getLookupKeyForMethod in class AbstractMethodEndpointMapping<QName>
Parameters:
method - the method
Returns:
a registration key, or null if the method is not to be registered

getLookupKeyForMessage

protected QName getLookupKeyForMessage(MessageContext messageContext)
                                throws Exception
Description copied from class: AbstractMethodEndpointMapping
Returns the the endpoint keys for the given message context.

Specified by:
getLookupKeyForMessage in class AbstractMethodEndpointMapping<QName>
Returns:
the registration keys
Throws:
Exception

Spring Web Services Framework

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