Spring Web Services Framework

org.springframework.ws.pox.dom
Class DomPoxMessage

java.lang.Object
  extended by 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:
Document

Constructor Summary
DomPoxMessage(Document document, Transformer transformer, String contentType)
          Constructs a new instance of the DomPoxMessage with the given document.
 
Method Summary
 Document getDocument()
          Returns the document underlying this message.
 String getFaultReason()
           
 Result getPayloadResult()
          Returns the contents of the message as a Result.
 Source getPayloadSource()
          Returns the contents of the message as a Source.
 boolean hasFault()
           
 String toString()
           
 void writeTo(OutputStream outputStream)
          Writes the entire message to the given output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

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

Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.