×
☰ See All Chapters

SOAP Tutorial

When two applications are communicating, communication message should be organized and classified. Classification to separate processing information, authentication information, Business information so on.  To achieve this we follow some rules, rules means protocols, and the protocol is a SOAP protocol, Simple Object Access Protocol.  SOAP specification defines envelope structure, encoding rules, and a convention for representing remote procedure calls and responses. These calls and responses are transmitted as SOAP messages over HTTP.

SOPA is a protocol to develop web servies. If you have missed reading our previous tutorial of understanding what is web services and  adavantages of web service we suggest you to read and understand what is web service berfore continue reding this tutorial.

In this tutorial you will learn about how two applications communicate over SOAP architecture. By completing the reading of this SOAP tutorial you will be in a position of having complete understanding of SOAP protocol.  Lets start the learning step by step on how consumer and provider communicates using SOAP protocol.

  • If two applications need to communicate, one application is sending the message, and other will be receiving the message. The one who is providing the service is a provider and one who consumes the service is a consumer. 

soap-tutorial-0
 

Both the applications should be connected (network).

Both application needs to communicate by following some rules(protocols)

    1. HTTP 

    2. FTP 

    3. SMTP ... etc. 

  • To communicate, language required is a Neutral language. Language which is understandable by any application irrespective of its environment. Application might have been developed using JAVA, Microsoft, PHP, Python, but all the applications can understand neutral language like XML. 

soap-tutorial-1
 
  • In the internet world we prefer to use HTTP protocol, and we have so many technologies which supports HTTP protocol.  

  • Let’s assume that we are sending student information from "Consumer" to "Provider" in the XML format as follows.soap-tutorial-2 
  • Provider may interpret that studentId and password fields as authentication data instead of id and password fields. So, classification of the information is missing.  So, unorganized raw XML document cannot be used between consumer and provider. 

  • We need classification of the request data like 

    1. Processing information/Authentication information 

    2. Business information. 

  • To achieve this we follow some rules, rules means protocols, and the protocol is a SOAP protocol, Simple Object Access Protocol.  SOAP specification defines envelope structure, encoding rules, and a convention for representing remote procedure calls and responses. These calls and responses are transmitted as SOAP messages over HTTP. 

  • SOAP is a classification protocol, SOAP is a binding protocol(processing data + business data) 

soap-tutorial-3
 
  • Provider should explain consumer about the services he is providing. To know the services of "Provider", "Consumer" cannot look into the code of  "Provider". So "Consumer" needs the information like what are the services provided, what they will take as input, and what the output they will return, what url has to call to get services ... etc. 

  • "Provider' will explain all these information in one document called "WSDL". "WSDL" stands for Web Service Description Language. "WSDL" is an XML document, because it should be language independent, so that any type of client can understand the services of the "Provider". 

soap-tutorial-4
 
  • "WSDL" is the document which explains the services information. But how can "Consumer" get that WSDL document, from where "Consumer" get?.  So “WSDL” documents have to be placed in some location from where "Consumer" can access them, that location is nothing but "UDDI". UDDI stands for Universal Description Discovery and Integration UDDI is the Registry where all the WSDL documents are registered. UDDI should be interoperable, so it is also developed in XML. UDDI registry also called XML registry. 

soap-tutorial-5
 

All Chapters
Author