org.springframework.ws
Interface WebServiceMessage

All Known Subinterfaces:
FaultAwareWebServiceMessage, MimeMessage, PoxMessage, SoapMessage
All Known Implementing Classes:
AbstractMimeMessage, AbstractSoapMessage, AxiomSoapMessage, DomPoxMessage, SaajSoapMessage

public interface WebServiceMessage

Represents a protocol-agnostic XML message.

Contains methods that provide access to the payload of the message.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
SoapMessage, WebServiceMessageFactory

Method Summary
 javax.xml.transform.Result getPayloadResult()
          Returns the contents of the message as a Result.
 javax.xml.transform.Source getPayloadSource()
          Returns the contents of the message as a Source.
 void writeTo(java.io.OutputStream outputStream)
          Writes the entire message to the given output stream.
 

Method Detail

getPayloadSource

javax.xml.transform.Source getPayloadSource()
Returns the contents of the message as a Source.

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

Returns:
the message contents

getPayloadResult

javax.xml.transform.Result getPayloadResult()
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.

Returns:
the message contents
Throws:
java.lang.UnsupportedOperationException - if the message is read-only

writeTo

void writeTo(java.io.OutputStream outputStream)
             throws java.io.IOException
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.

Parameters:
outputStream - the stream to write to
Throws:
java.io.IOException - if an I/O exception occurs


Copyright � 2005-2008 The Spring Web Services Framework. All Rights Reserved.