Web Services – part 3

Introduction to Web Services

As discussed earlier in article : Web Services Basics – part 2 , we can generally use a web service to expose our application’s functionality over the internet and also can make specific methods in our service consumable to other applications provided , the consuming application must have the understanding of contract of inputs and outputs provided by the publisher application.

Another benefit of Web Services is that it makes possible for re-use the service as many times we need. Once a web Service is exposed to the outside world, All the consumer applications can start accessing the same service as many times they want.

We will be discussing here two popular Web Services approach ( though we have many) which are vendor neutral standards for commonly  accessing the Web Services.

a) Simple Object Access Protocol (SOAP)  :

SOAP is a W3C-recommended vendor neutral -platform independent and XML based specification for sending and receiving messages between applications over the web.

Since XML doesn’t confirm to a structure and disparate applications are not sure of an agreeable format , SOAP follows a well defined XML structure format in which request and response messages can be exchanged between sender and receiver applications.

Standard  SOAP Structure  looks like below :

A sample SOAP request message ( if you take our Fictious use case tourism App ) shown below :

<?xml version=”1.0″ encoding=”utf-8″?>
<soap:Envelope xmlns:xsi=””
<flightRequest  xmlns=””  flow=”search” >

Above SOAP XML request message sample has “Envelope” root node and Body element has the details for our search criteria.

The resulting data is returned again in SOAP ML Format as per SOAP Specification.

sample SOAP Response :

<?xml version=”1.0″ encoding=”utf-8″?>
<soap:Envelope xmlns:xsi=”” xmlns:xsd=””
<flightresponse xmlns=” flow=”search”>

A Typical SOAP Request/Response Scenario over HTTP Protocol :

SOAP request/response over HTTP.




















It can use any transport mechanism to send and receive the messages. For Example :  HTTP or TCP. ( even over JMS too). SOAP most often uses the HTTP transport protocol to take advantage of passing through firewalls as they pass on common port 80.

Written by Ramesh Metta

Leave a Reply

Your email address will not be published. Required fields are marked *