Here we are going to learn what are the SOAP web services are and what are the rules and guidelines to make a web service as a SOAP web service.
What are SOAP web services are?
Any web service that follows some guidelines which are related to SOAP web service specifically is called a SOAP web service. So there are some set of rules and standards. What are these specifications/standards? Who defines these standards?
There is an international party that develops open standards for the World Wide Web and it is called W3C or World Wide Web Consortium. Now we know there is a central body that defines these rules and standards.
The next question is What are these specifications/ standards?
So SOAP Web Services Specifications has two categories of specifications. One is the BASIC set and it includes SOAP, WSDL, and UDDI. So any web service that follows these specifications can be called a SOAP web service we have already seen about WSDL which is web service description language and UDDI in our last tutorial. The other set is the EXTENDED set. It includes WS-Security and WS-Policy. Whenever we create web services or enterprise we followed these guidelines as well. But in this session, we will focus on the Basic Specifications.
So we know any web service that follows SOAP specification we called it a SOAP web service. And these guidelines are defined by a central body called W3C. Ans there are 3 basic rules that a SOAP web service has to comply with to become a SOAP web service. Those are SOAP, WSDL, and UDDI.
What SOAP means?
SOAP is a protocol and it stands for Simple Object Access Protocol. It basically set of rules and definition on how to applications will talk to each other over the internet. Let us understand this.
We know the client-server concept. And we know there has to be a Service Provider and Service Consumer and they talk to each other with the help of the web services. Now SOAP protocol says that all the exchange of data, message or information between these two applications has to be in a format and that format has to be a common format and in case of SOAP it has to be XML.
The XML message also has to be a SOAP message. What are SOAP messages? The message should consist of some particular structure with Envelop, Header, and Body.
Let us see what is this SOAP message consists of. A SOAP message consists of Envelopes which is the root element. This is the basic unit of the XML document which contains units like Header and Body.
Inside envelop we can have a Header. The header is optional and it gets information about Authentication and complex types. The header element provides information about the message itself. So the actual request is not inside the Header but header can include authentication, complex types, and routing information
And then we have a Body. The Body contains the actual data of the request meant to be sent to the server.
Example of the SOAP message.