SoapUI Tutorial on SOAP Messages

a soap message is an ordinary xml document containing the following elements −

  • envelope − defines the start and the end of the message. it is a mandatory element.

  • header − contains any optional attributes of the message used in processing the message, either at an intermediary point or at the ultimate end-point. it is an optional element.

  • body − contains the xml data comprising the message being sent. it is a mandatory element.

  • fault − an optional fault element that provides information about errors that occur while processing the message.

all these elements are declared in the default namespace for the soap envelope −

https://www.w3.org/2001/12/soap-envelope

the default namespace for soap encoding and data types is −

https://www.w3.org/2001/12/soap-encoding

note − all these specifications are subject to change. thus, keep updating yourself with the latest specifications available on the w3 website.

soap - message structure

the following block depicts the general structure of a soap message −

<?xml version = "1.0"?> 
<soap-env:envelope 
xmlns:soap-env = "http://www.w3.org/2001/12/soap-envelope" 
soap-env:encodingstyle = "http://www.w3.org/2001/12/soap-encoding">  
   <soap-env:header> 
      ... 
      ... 
   </soap-env:header>  
   <soap-env:body> 
      ... 
      ... 
      <soap-env:fault> 
         ... 
         ... 
      </soap-env:fault>  
   </soap-env:body>  
</soap_env:envelope>