Introduction of SOAP Web Service

 Introduction of SOAP Web Service

  1. 1. SOAP stands for Simple Object Access Protocol
  2. 2. It is Xml(WSDL) Based Protocol for accessing web services
  3. 3. Soap is a platform independent as it use XML for communication (able to communicate different programing languages)
Advantages of Soap:
  1. 1. Soap has its own  Security know as WS security
  2. 2. Platform Independent 
Disadvantage of Soap:
  1. 1. Soap is xml Protocol Based which needs XML format that must be parsed to be read, which make slow
  2. 2. XML file WSDL dependent , no other way to discover the service
SOAP Request/Response Looks like given Below

Skeleton SOAP Message


<?xml version="1.0"?>

<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding"
>


<soap:Header>
...
</soap:Header>

<soap:Body>
...
  <soap:Fault>
  ...
  </soap:Fault>
</soap:Body>

</soap:Envelope>

WSDL Document:
<definitions>

<types>
  data type definitions........
</types>

<message>
  definition of the data being communicated....
</message>

<portType>
  set of operations......
</portType>

<binding>
  protocol and data format specification....
</binding>

</definitions>


WSDL: example

<message name="getTermRequest">
  <part name="term" type="xs:string"/>
</message>

<message name="getTermResponse">
  <part name="value" type="xs:string"/>
</message>

<portType name="glossaryTerms">
  <operation name="getTerm">
    <input message="getTermRequest"/>
    <output message="getTermResponse"/>
  </operation>
</portType>

SOAP

Format: 
  • Soap XMl Request
  • Soap XML Response
Transport:
  • SOAP Over MQ
  • SOAP Over HTTP
Service Definition:
  • WSDL

Comments

Popular posts from this blog

Introduction of RESTful Web Service

Learn JPA and Hibernate

Implementing Dynamic Filtering for Rest API