DEV Community

Cover image for Let's Learn - Week 1 - SOAP

Let's Learn - Week 1 - SOAP

Updated on ・1 min read

Introduction to SOAP Web Services

SOAP is an acronym for Simple Object Access Protocol.
SOAP defines specific way of building web services.
We use XML as request and response exchange format.

Any request that contains XML as request and response is not SOAP.
SOAP defines specific XML request and response structure.


We need to create SOAP envelope that contains header and body.
The header contains meta information like authentication , authorization etc.
SOAP body is where we put real content of request and response.

The service definition is managed by WSDL – Web Service Description Language

Examples of SOAP Request , Response & WSDL

SOAP Request

<?xml version="1.0"?>

<soap:Body xmlns:m="">

SOAP Response

<?xml version="1.0"?>


<soap:Body xmlns:m="">



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

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

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

Now that we have an idea about SOAP based web services , let's move to Restful Web Services

Discussion (0)