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
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

      @Deprecated(since="4.0.12", forRemoval=true) public boolean hasFault()
      Deprecated, for removal: This API element is subject to removal in a future version.
      as of 4.0.12 with no replacement as this class does not implement FaultAwareWebServiceMessage
      Does this message have a fault?
      Returns:
      true if the message has a fault
    • getFaultReason

      @Deprecated(since="4.0.12", forRemoval=true) public String getFaultReason()
      Deprecated, for removal: This API element is subject to removal in a future version.
      as of 4.0.12 with no replacement as this class does not implement FaultAwareWebServiceMessage
      Returns the fault reason message.
      Returns:
      the fault reason message, if any; returns null when no fault is present
    • 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