SOAP stands for Simple Object Access Protocol which is used for exchanging data in XML-based format over HTTP. SOAP is widely-used by web services for exchanging data. A simple SOAP message structure is given below:
<soap:Envelope xmlns:soap=”http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Body xmlns:m="http://www.mysite.com/books">
<m:Book>
<m:BookName>WCF and Web Services Interview Questions and Answers</m:BookName>
</m:Book>
</soap:Body>
</soap:Envelope>
A SOAP message has an optional header and a required body element. A SOAP message header can contain the application-specific information like authentication or authorization etc. Also, a SOAP message header must be the first child element of the SOAP Envelope element. The SOAP body element contains the actual SOAP message. Moreover, SOAP is a combination of HTTP protocol and XML i.e. SOAP = HTTP + XML