Search content within the blog

Monday, April 20, 2009

Basic building blocks of web services


SOAP is a simple XML-based protocol to let applications exchange information over HTTP.
Or more simply: SOAP is a protocol for accessing a Web Service.

It is important for application development to allow Internet communication between programs.

Today's applications communicate using Remote Procedure Calls (RPC) between objects like DCOM and CORBA, but HTTP was not designed for this. RPC represents a compatibility and security problem; firewalls and proxy servers will normally block this kind of traffic.

A better way to communicate between applications is over HTTP, because HTTP is supported by all Internet browsers and servers. SOAP was created to accomplish this.

SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.

Discovery File
Web Service discovery is the process of locating and interrogating Web Service descriptions, which is a preliminary step for accessing a Web Service. It is through the discovery process that Web Service clients learn that a Web Service exists, what its capabilities are, and how to properly interact with it. Discovery file is a XML document with a .DISCO extension. It is not compulsory to create a discovery file for each Web Service. Here is a sample discovery file for our securities Web Service.

<?xml version="1.0" ?>
<disco:discovery xmlns:disco="">
<scl:contractRef ref="http://localhost/work/aspx/SampleService.asmx?SDL"/>

We can name this file "somename.disco" and save it to the same directory as the Web Service. If we are creating any other Web Services under the same directory, it is wise to enable "dynamic discovery." Dynamic discovery will scan for all the *.DISCO files in all the subdirectories of "/work/aspx" automatically.

<?xml version="1.0" ?>
<dynamicDiscovery xmlns="urn:schemas-dynamicdiscovery:disco.2000-03-17">

By analyzing the discovery file we can find where the Web Services reside in the system. Unfortunately these methods require you to know the exact URL of the discovery file. If we cannot find the discovery file, we will not be able to locate the Web Services.

Universal Description, Discovery, and Integration (UDDI) describe mechanisms to advertise existing Web Services. UDDI is an open, Internet-based specification designed to be the building block that will enable businesses to quickly, easily, and dynamically find and transact business with one another using their preferred applications. A reference site for UDDI is

To Deploy
the Web service:
Deploying a web service Is just like web application deployment. In order to deploy a web service You need to copy the ASMX file and .DISCO file in particular folders.

No comments:

Post a Comment