Package org.springframework.ws
Interface WebServiceMessage
- All Known Subinterfaces:
FaultAwareWebServiceMessage
,MimeMessage
,PoxMessage
,SoapMessage
,StreamingWebServiceMessage
- All Known Implementing Classes:
AbstractMimeMessage
,AbstractSoapMessage
,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:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the contents of the message as aResult
.Returns the contents of the message as aSource
.void
writeTo
(OutputStream outputStream) Writes the entire message to the given output stream.
-
Method Details
-
getPayloadSource
Source getPayloadSource()Returns the contents of the message as aSource
.Depending on the implementation, this can be retrieved multiple times, or just a single time.
- Returns:
- the message contents
-
getPayloadResult
Result getPayloadResult()Returns the contents of the message as aResult
.Calling this method removes the current payload.
Implementations that are read-only will throw an
UnsupportedOperationException
.- Returns:
- the message contents
- Throws:
UnsupportedOperationException
- if the message is read-only
-
writeTo
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:
IOException
- if an I/O exception occurs
-