Basics of SOAP - Simple Object Access Protocol - GeeksforGeeks

27 Sep, 2019
Introduction:Simple Object Access Protocol(SOAP) is a network protocol for exchanging structured data between nodes. It uses XML format to transfer messages. It works on top of application layer protocols like HTML and SMTP for notations and transmission. SOAP allows processes to communicate throughout platforms, languages and operating systems, since protocols like HTTP are already installed on all platforms.SOAP was designed by Bob Atkinson, Don Box, Dave Winer, and Mohsen Al-Ghosein at Microsoft in 1998. SOAP was maintained by the XML Protocol Working Group of the World Wide Web Consortium until 2009.
Message Format:
Information about message structure and instructions on processing it.
Encoding instructions for application defined data types.
Information about Remote Procedure Calls and their responses.
The message in XML format contains three partsEnvelope:It specifies that the XML message is a SOAP message. A SOAP message can be defined as an XML document containing header and body encapsulated in the envelope. The fault is within the body of the message.Header:This part is not mandatory. But when it is present it can provide crucial information about the applications.Body:It contains the actual message that is being transmitted. Fault is contained within the body tags.Fault:This section contains the status of the application and also contains errors in the application. This section is also optional. It should not appear more than once in a SOAP message.
Envelope:It specifies that the XML message is a SOAP message. A SOAP message can be defined as an XML document containing header and body encapsulated in the envelope. The fault is within the body of the message.
Header:This part is not mandatory. But when it is present it can provide crucial information about the applications.
Body:It contains the actual message that is being transmitted. Fault is contained within the body tags.
Fault:This section contains the status of the application and also contains errors in the application. This section is also optional. It should not appear more than once in a SOAP message.
Sample Message:
Content-Type: application/soap+xml<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">    <env:Header>        <m:GetLastTradePrice xmlns:m="Some-URI" />    </env:Header>    <env:Body>        <symbol xmlns:p="Some-URI" >DIS</symbol>    </env:Body></env:Envelope>
Source: https://tools.ietf.org/html/rfc4227
Advantages of SOAPSOAP is a light weight data interchange protocol because it is based on XML.SOAP was designed to be OS and Platform independent.It is built on top of HTTP which is installed in most systems.It is suggested by W3 consortium which is like a governing body for the Web.SOAP is mainly used for Web Services and Application Programming Interfaces (APIs).
SOAP is a light weight data interchange protocol because it is based on XML.
SOAP was designed to be OS and Platform independent.
It is built on top of HTTP which is installed in most systems.
It is suggested by W3 consortium which is like a governing body for the Web.
SOAP is mainly used for Web Services and Application Programming Interfaces (APIs).
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.
HTML and XML
Web technologies-HTML and XML
Web Technologies
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Remove elements from a JavaScript Array
Convert a string to an integer in JavaScript
How to fetch data from an API in ReactJS ?
Difference between var, let and const keywords in JavaScript
How to create footer to stay at the bottom of a Web page?
Differences between Functional Components and Class Components in React
Node.js fs.readFileSync() Method
How to set the default value for an HTML <select> element ?
How to set input type date in dd-mm-yyyy format using HTML ?
How to apply style to parent if it has child with CSS?