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
WebServiceMessage.getPayloadSource() and WebServiceMessage.getPayloadResult() on
WebServiceMessage, the super-interface of this interface.- Since:
- 1.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns this message as aDocument.Returns theSoapEnvelopeassociated with this message.Get the SOAP Action for this message, ornullif not present.Returns theSoapBodyassociated with this message.Returns theSoapHeaderassociated with this message.Returns the SOAP version of this message.voidsetDocument(Document document) Sets the contents of the message to the givenDocument.voidsetSoapAction(String soapAction) Sets the SOAP Action for this message.Methods inherited from interface org.springframework.ws.FaultAwareWebServiceMessage
getFaultCode, getFaultReason, hasFaultMethods inherited from interface org.springframework.ws.mime.MimeMessage
addAttachment, addAttachment, addAttachment, convertToXopPackage, getAttachment, getAttachments, isXopPackageMethods inherited from interface org.springframework.ws.WebServiceMessage
getPayloadResult, getPayloadSource, writeTo
-
Method Details
-
getEnvelope
Returns theSoapEnvelopeassociated with this message.- Throws:
SoapEnvelopeException
-
getSoapAction
String getSoapAction()Get the SOAP Action for this message, ornullif not present.- Returns:
- the SOAP Action.
-
setSoapAction
Sets the SOAP Action for this message.- Parameters:
soapAction- the SOAP Action.
-
getSoapBody
Returns theSoapBodyassociated with this message. This is a convenience method forgetEnvelope().getBody().- Throws:
SoapBodyException- See Also:
-
getSoapHeader
Returns theSoapHeaderassociated with this message. 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
-