Package org.springframework.ws.soap
Interface SoapMessage
- All Superinterfaces:
FaultAwareWebServiceMessage
,MimeMessage
,WebServiceMessage
- All Known Implementing Classes:
AbstractSoapMessage
,SaajSoapMessage
Represents an abstraction for SOAP messages, providing access to a SOAP Envelope. The contents of the SOAP body can
be retrieved by
getPayloadSource()
and getPayloadResult()
on WebServiceMessage
, the
super-interface of this interface.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns this message as aDocument
.Returns theSoapEnvelope
associated with thisSoapMessage
.Get the SOAP Action for this message, ornull
if not present.Returns theSoapBody
associated with thisSoapMessage
.Returns theSoapHeader
associated with thisSoapMessage
.Returns the SOAP version of this message.void
setDocument
(Document document) Sets the contents of the message to the givenDocument
.void
setSoapAction
(String soapAction) Sets the SOAP Action for this message.Methods inherited from interface org.springframework.ws.FaultAwareWebServiceMessage
getFaultCode, getFaultReason, hasFault
Methods inherited from interface org.springframework.ws.mime.MimeMessage
addAttachment, addAttachment, addAttachment, convertToXopPackage, getAttachment, getAttachments, isXopPackage
Methods inherited from interface org.springframework.ws.WebServiceMessage
getPayloadResult, getPayloadSource, writeTo
-
Method Details
-
getEnvelope
Returns theSoapEnvelope
associated with thisSoapMessage
.- Throws:
SoapEnvelopeException
-
getSoapAction
String getSoapAction()Get the SOAP Action for this message, ornull
if not present.- Returns:
- the SOAP Action.
-
setSoapAction
Sets the SOAP Action for this message.- Parameters:
soapAction
- the SOAP Action.
-
getSoapBody
Returns theSoapBody
associated with thisSoapMessage
. This is a convenience method forgetEnvelope().getBody()
.- Throws:
SoapBodyException
- See Also:
-
getSoapHeader
Returns theSoapHeader
associated with thisSoapMessage
. This is a convenience method forgetEnvelope().getHeader()
.- Throws:
SoapHeaderException
- See Also:
-
getVersion
SoapVersion getVersion()Returns the SOAP version of this message. This can be either SOAP 1.1 or SOAP 1.2.- Returns:
- the SOAP version
- See Also:
-
getDocument
Document getDocument()Returns this message as aDocument
. Depending on the underlying implementation, this Document may be 'live' or not.- Returns:
- this soap message as a DOM document
-
setDocument
Sets the contents of the message to the givenDocument
.- Parameters:
document
- the soap message as a DOM document
-