Spring Web Services Framework

org.springframework.ws.soap
Interface SoapMessage

All Superinterfaces:
FaultAwareWebServiceMessage, MimeMessage, WebServiceMessage
All Known Implementing Classes:
AbstractSoapMessage, AxiomSoapMessage, SaajSoapMessage

public interface SoapMessage
extends MimeMessage, FaultAwareWebServiceMessage

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:
WebServiceMessage.getPayloadSource(), WebServiceMessage.getPayloadResult(), getEnvelope()

Method Summary
 Document getDocument()
          Returns this message as a Document.
 SoapEnvelope getEnvelope()
          Returns the SoapEnvelope associated with this SoapMessage.
 String getSoapAction()
          Get the SOAP Action for this message, or null if not present.
 SoapBody getSoapBody()
          Returns the SoapBody associated with this SoapMessage.
 SoapHeader getSoapHeader()
          Returns the SoapHeader associated with this SoapMessage.
 SoapVersion getVersion()
          Returns the SOAP version of this message.
 void setDocument(Document document)
          Sets the contents of the message to the given Document.
 void setSoapAction(String soapAction)
          Sets the SOAP Action for this message.
 
Methods inherited from interface org.springframework.ws.mime.MimeMessage
addAttachment, addAttachment, addAttachment, convertToXopPackage, getAttachment, getAttachments, isXopPackage
 
Methods inherited from interface org.springframework.ws.FaultAwareWebServiceMessage
getFaultReason, hasFault
 
Methods inherited from interface org.springframework.ws.WebServiceMessage
getPayloadResult, getPayloadSource, writeTo
 

Method Detail

getEnvelope

SoapEnvelope getEnvelope()
                         throws SoapEnvelopeException
Returns the SoapEnvelope associated with this SoapMessage.

Throws:
SoapEnvelopeException

getSoapAction

String getSoapAction()
Get the SOAP Action for this message, or null if not present.

Returns:
the SOAP Action.

setSoapAction

void setSoapAction(String soapAction)
Sets the SOAP Action for this message.

Parameters:
soapAction - the SOAP Action.

getSoapBody

SoapBody getSoapBody()
                     throws SoapBodyException
Returns the SoapBody associated with this SoapMessage. This is a convenience method for getEnvelope().getBody().

Throws:
SoapBodyException
See Also:
SoapEnvelope.getBody()

getSoapHeader

SoapHeader getSoapHeader()
                         throws SoapHeaderException
Returns the SoapHeader associated with this SoapMessage. This is a convenience method for getEnvelope().getHeader().

Throws:
SoapHeaderException
See Also:
SoapEnvelope.getHeader()

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:
SoapVersion.SOAP_11, SoapVersion.SOAP_12

getDocument

Document getDocument()
Returns this message as a Document. Depending on the underlying implementation, this Document may be 'live' or not.

Returns:
this soap message as a DOM document

setDocument

void setDocument(Document document)
Sets the contents of the message to the given Document.

Parameters:
document - the soap message as a DOM document

Spring Web Services Framework

Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.