Class MarshallingUtils

java.lang.Object
org.springframework.ws.support.MarshallingUtils

public abstract class MarshallingUtils extends Object
Helper class for endpoints and endpoint mappings that use marshalling.
Since:
1.0.0
Author:
Arjen Poutsma
  • 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 provided Unmarshaller.

      If the request message has no payload (i.e. WebServiceMessage.getPayloadSource() returns null), this method will return null.

      Parameters:
      unmarshaller - the unmarshaller
      message - 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 provided Marshaller.
      Parameters:
      marshaller - the marshaller
      graph - the root of the object graph to marshal
      message - the message of which the payload is to be unmarshalled
      Throws:
      IOException - in case of I/O errors