Class DomPoxMessage

java.lang.Object
org.springframework.ws.pox.dom.DomPoxMessage
All Implemented Interfaces:
PoxMessage, WebServiceMessage

public class DomPoxMessage extends Object implements PoxMessage
Implementation of the PoxMessage interface that is based on a DOM Document.
Since:
1.0.0
Author:
Arjen Poutsma
See Also:
  • Constructor Details

    • DomPoxMessage

      public DomPoxMessage(Document document, Transformer transformer, String contentType)
      Constructs a new instance of the DomPoxMessage with the given document.
      Parameters:
      document - the document to base the message on
  • Method Details

    • getDocument

      public Document getDocument()
      Returns the document underlying this message.
    • getPayloadResult

      public Result getPayloadResult()
      Description copied from interface: WebServiceMessage
      Returns the contents of the message as a Result.

      Calling this method removes the current payload.

      Implementations that are read-only will throw an UnsupportedOperationException.

      Specified by:
      getPayloadResult in interface WebServiceMessage
      Returns:
      the message contents
    • getPayloadSource

      public Source getPayloadSource()
      Description copied from interface: WebServiceMessage
      Returns the contents of the message as a Source.

      Depending on the implementation, this can be retrieved multiple times, or just a single time.

      Specified by:
      getPayloadSource in interface WebServiceMessage
      Returns:
      the message contents
    • hasFault

      public boolean hasFault()
    • getFaultReason

      public String getFaultReason()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • writeTo

      public void writeTo(OutputStream outputStream) throws IOException
      Description copied from interface: WebServiceMessage
      Writes the entire message to the given output stream.

      If the given stream is an instance of TransportOutputStream, the corresponding headers will be written as well.

      Specified by:
      writeTo in interface WebServiceMessage
      Parameters:
      outputStream - the stream to write to
      Throws:
      IOException - if an I/O exception occurs