Package org.springframework.ws.support
Class MarshallingUtils
java.lang.Object
org.springframework.ws.support.MarshallingUtils
Helper class for endpoints and endpoint mappings that use marshalling.
- Since:
- 1.0.0
- Author:
- Arjen Poutsma
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
marshal
(org.springframework.oxm.Marshaller marshaller, Object graph, WebServiceMessage message) Marshals the given object to the payload of the given message using the providedMarshaller
.static Object
unmarshal
(org.springframework.oxm.Unmarshaller unmarshaller, WebServiceMessage message) Unmarshals the payload of the given message using the providedUnmarshaller
.
-
Method Details
-
unmarshal
public static Object unmarshal(org.springframework.oxm.Unmarshaller unmarshaller, WebServiceMessage message) throws IOException Unmarshals the payload of the given message using the providedUnmarshaller
.If the request message has no payload (i.e.
WebServiceMessage.getPayloadSource()
returnsnull
), this method will returnnull
.- Parameters:
unmarshaller
- the unmarshallermessage
- the message of which the payload is to be unmarshalled- Returns:
- the unmarshalled object
- Throws:
IOException
- in case of I/O errors
-
marshal
public static void marshal(org.springframework.oxm.Marshaller marshaller, Object graph, WebServiceMessage message) throws IOException Marshals the given object to the payload of the given message using the providedMarshaller
.- Parameters:
marshaller
- the marshallergraph
- the root of the object graph to marshalmessage
- the message of which the payload is to be unmarshalled- Throws:
IOException
- in case of I/O errors
-