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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidhandleReturnValueInternal(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 booleansupportsRequestPayloadParameter(org.springframework.core.MethodParameter parameter) Indicates whether the given method parameter, annotated withRequestPayload, is supported by this resolver.protected booleansupportsResponsePayloadReturnType(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, unmarshalFromRequestPayloadMethods inherited from class org.springframework.ws.server.endpoint.adapter.method.AbstractPayloadMethodProcessor
convertToByteArrayInputStream, supportsParameter, supportsReturnTypeMethods 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:AbstractPayloadMethodProcessorIndicates whether the given method parameter, annotated withRequestPayload, is supported by this resolver.- Specified by:
supportsRequestPayloadParameterin classAbstractPayloadMethodProcessor- Parameters:
parameter- the method parameter to check- Returns:
trueif this resolver supports the supplied parameter;falseotherwise
-
resolveArgument
public Object resolveArgument(MessageContext messageContext, org.springframework.core.MethodParameter parameter) throws jakarta.xml.bind.JAXBException Description copied from interface:MethodArgumentResolverResolves 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:AbstractPayloadMethodProcessorIndicates whether the given method return type, annotated withResponsePayload, is supported.- Specified by:
supportsResponsePayloadReturnTypein classAbstractPayloadMethodProcessor- Parameters:
returnType- the method parameter to check- Returns:
trueif this resolver supports the supplied return type;falseotherwise
-
handleReturnValueInternal
protected void handleReturnValueInternal(MessageContext messageContext, org.springframework.core.MethodParameter returnType, Object returnValue) throws jakarta.xml.bind.JAXBException - Specified by:
handleReturnValueInternalin classAbstractJaxb2PayloadMethodProcessor- Throws:
jakarta.xml.bind.JAXBException
-