Class XmlRootElementPayloadMethodProcessor
java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.server.endpoint.adapter.method.AbstractPayloadMethodProcessor
org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor
org.springframework.ws.server.endpoint.adapter.method.jaxb.XmlRootElementPayloadMethodProcessor
- All Implemented Interfaces:
MethodArgumentResolver
,MethodReturnValueHandler
Implementation of
MethodArgumentResolver
and MethodReturnValueHandler
that supports parameters annotated with @XmlRootElement
or
@XmlType
, and return values annotated with @XmlRootElement
.- Since:
- 2.0
- Author:
- Arjen Poutsma
-
Field Summary
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
handleReturnValueInternal
(MessageContext messageContext, org.springframework.core.MethodParameter returnType, Object returnValue) 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 withRequestPayload
, is supported by this resolver.protected boolean
supportsResponsePayloadReturnType
(org.springframework.core.MethodParameter returnType) Indicates whether the given method return type, annotated withResponsePayload
, is supported.Methods inherited from class org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor
createMarshaller, createUnmarshaller, handleReturnValue, marshalToResponsePayload, unmarshalElementFromRequestPayload, unmarshalFromRequestPayload
Methods inherited from class org.springframework.ws.server.endpoint.adapter.method.AbstractPayloadMethodProcessor
convertToByteArrayInputStream, supportsParameter, supportsReturnType
Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
-
Constructor Details
-
XmlRootElementPayloadMethodProcessor
public XmlRootElementPayloadMethodProcessor()
-
-
Method Details
-
supportsRequestPayloadParameter
protected boolean supportsRequestPayloadParameter(org.springframework.core.MethodParameter parameter) Description copied from class:AbstractPayloadMethodProcessor
Indicates whether the given method parameter, annotated withRequestPayload
, is supported by this resolver.- Specified by:
supportsRequestPayloadParameter
in classAbstractPayloadMethodProcessor
- Parameters:
parameter
- the method parameter to check- Returns:
true
if this resolver supports the supplied parameter;false
otherwise
-
resolveArgument
public Object resolveArgument(MessageContext messageContext, org.springframework.core.MethodParameter parameter) throws jakarta.xml.bind.JAXBException Description copied from interface:MethodArgumentResolver
Resolves the given parameter into a method argument.- Parameters:
messageContext
- the current message contextparameter
- the parameter to resolve to an argument. This parameter must have previously been passed to theMethodArgumentResolver.supportsParameter(MethodParameter)
method of this interface, which must have returnedtrue
.- Returns:
- the resolved argument. May be
null
. - Throws:
jakarta.xml.bind.JAXBException
-
supportsResponsePayloadReturnType
protected boolean supportsResponsePayloadReturnType(org.springframework.core.MethodParameter returnType) Description copied from class:AbstractPayloadMethodProcessor
Indicates whether the given method return type, annotated withResponsePayload
, is supported.- Specified by:
supportsResponsePayloadReturnType
in classAbstractPayloadMethodProcessor
- Parameters:
returnType
- the method parameter to check- Returns:
true
if this resolver supports the supplied return type;false
otherwise
-
handleReturnValueInternal
protected void handleReturnValueInternal(MessageContext messageContext, org.springframework.core.MethodParameter returnType, Object returnValue) throws jakarta.xml.bind.JAXBException - Specified by:
handleReturnValueInternal
in classAbstractJaxb2PayloadMethodProcessor
- Throws:
jakarta.xml.bind.JAXBException
-