public class DomPoxMessage extends Object implements PoxMessage
PoxMessage
interface that is based on a DOM Document.Document
Constructor and Description |
---|
DomPoxMessage(Document document,
Transformer transformer,
String contentType)
Constructs a new instance of the
DomPoxMessage with the given document. |
Modifier and Type | Method and Description |
---|---|
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.
|
public DomPoxMessage(Document document, Transformer transformer, String contentType)
DomPoxMessage
with the given document.document
- the document to base the message onpublic Document getDocument()
public Result getPayloadResult()
WebServiceMessage
Result
.
Calling this method removes the current payload.
Implementations that are read-only will throw an UnsupportedOperationException
.
getPayloadResult
in interface WebServiceMessage
public Source getPayloadSource()
WebServiceMessage
Source
.
Depending on the implementation, this can be retrieved multiple times, or just a single time.
getPayloadSource
in interface WebServiceMessage
public boolean hasFault()
public String getFaultReason()
public void writeTo(OutputStream outputStream) throws IOException
WebServiceMessage
If the given stream is an instance of TransportOutputStream
, the corresponding headers will be written as well.
writeTo
in interface WebServiceMessage
outputStream
- the stream to write toIOException
- if an I/O exception occursCopyright © 2020 Pivotal Software. All rights reserved.