public class XmlRootElementPayloadMethodProcessor extends AbstractJaxb2PayloadMethodProcessor
MethodArgumentResolver
and MethodReturnValueHandler
that supports parameters annotated with @XmlRootElement
or @XmlType
, and return values annotated with @XmlRootElement
.logger
Constructor and Description |
---|
XmlRootElementPayloadMethodProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
handleReturnValue(MessageContext messageContext,
org.springframework.core.MethodParameter returnType,
Object returnValue)
Handles the given return value.
|
Object |
resolveArgument(MessageContext messageContext,
org.springframework.core.MethodParameter parameter)
Resolves the given parameter into a method argument.
|
protected boolean |
supportsRequestPayloadParameter(org.springframework.core.MethodParameter parameter)
Indicates whether the given method parameter, annotated with
RequestPayload ,
is supported by this resolver. |
protected boolean |
supportsResponsePayloadReturnType(org.springframework.core.MethodParameter returnType)
Indicates whether the given method return type, annotated with
ResponsePayload , is supported. |
createMarshaller, createUnmarshaller, marshalToResponsePayload, unmarshalElementFromRequestPayload, unmarshalFromRequestPayload
convertToByteArrayInputStream, supportsParameter, supportsReturnType
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
public XmlRootElementPayloadMethodProcessor()
protected boolean supportsRequestPayloadParameter(org.springframework.core.MethodParameter parameter)
AbstractPayloadMethodProcessor
RequestPayload
,
is supported by this resolver.supportsRequestPayloadParameter
in class AbstractPayloadMethodProcessor
parameter
- the method parameter to checktrue
if this resolver supports the supplied parameter; false
otherwisepublic Object resolveArgument(MessageContext messageContext, org.springframework.core.MethodParameter parameter) throws JAXBException
MethodArgumentResolver
messageContext
- the current message contextparameter
- the parameter to resolve to an argument. This parameter must have previously been passed to
the MethodArgumentResolver.supportsParameter(MethodParameter)
method of this interface, which must
have returned true
.null
.JAXBException
protected boolean supportsResponsePayloadReturnType(org.springframework.core.MethodParameter returnType)
AbstractPayloadMethodProcessor
ResponsePayload
, is supported.supportsResponsePayloadReturnType
in class AbstractPayloadMethodProcessor
returnType
- the method parameter to checktrue
if this resolver supports the supplied return type; false
otherwisepublic void handleReturnValue(MessageContext messageContext, org.springframework.core.MethodParameter returnType, Object returnValue) throws JAXBException
MethodReturnValueHandler
messageContext
- the current message contextreturnType
- the return type to handle. This type must have previously been passed to the MethodReturnValueHandler.supportsReturnType(MethodParameter)
method of this interface, which must have returned
true
.returnValue
- the return value to handleJAXBException
Copyright © 2005–2015 The Spring Web Services Framework. All rights reserved.