Web Services: Part 1

Introduction

A Web Service is an application that is designed to interact with another application over the internet. Generally, these interactions are being done to exchange data.

We can say it is a medium by which objects are interacting with each other over the internet for exchanging data.

A Web Service is language independent.

One can easily consume the Web Service in his/her application and can invoke method calls on remote objects by making use of SOAP and HTTP protocols.

It makes use of a standardized XML messaging system.

The basic platform of the Web Service is XML and HTTP.

  • Advantages of using Web Services

We can benefit from the use of Web Services in numerous ways. I am explaining a few of them one by one.

  1. Interoperability: Interoperability means the Web Service allows two applications to be connected, as it is language independent.

    For example a Web Service made in .NET can communicate with a Java application and vice-versa.
     
  2. Allows functionalities to be available on the internet: It allows us to make our existing code to be available on the internet.
  3. Low cost of communication.
  4. Standardized protocol.
  5. Discoverable by a simple mechanism: As we know, XML is a standard way of communication between two otherwise incompatible systems. And the Web Services messages are formatted as XML and are sent by HTTP so that it is easy from any machine on the internet without being blocked by a firewall.

History of Web Service

As I have discussed, a Web Service is nothing but a medium by which objects interact with each other over the internet.

Here I have tried to provide a view of the history of Web Services pictorially:

Web-Service.jpg

Explanation

  • First of all, obect oriented languages allowed us to interact with two objects within the same application.
  • Then the Component Object Model (COM) was created that allows two objects to communicate on the same computer but in different applications.
  • Then comes DCOM that allows two objects to interact between computers, but within the same local network.
  • And finally Web Services were created that allows two objects to interact on the internet, even from a different local network and this is what I wanted to explain.

Example of Web Services

  1. Weather Reporting: Suppose we want to display the weather information in our website then we can do that using a weather reporting Web Service.
  2. Stock Quote: We can display the latest update of the shares market with a stock quote on our web-site.
  3. News-Headline: If we want to display the latest news updates in our web-site then we can do this using a News-headline Web Service.
  4. Currency conversion: By consuming a live currency conversion Web Service, we can convert various currency rates in our application.

Web Service Communication

Two objects interact with each other on the internet using a standard web protocol and data format, these are:

  • HTTP
  • XML
  • SOAP

Terms associated with a Web Service

The following terms are related to Web Services.

1. SOAP

It stands for Simple Object Access Protocol.

SOAP is the medium by which method calls are translated into XML format and sent via HTTP.

SOAP is remote function calls that invoke methods and execute them on the remote machine and translate the object communication into XML format.

2. WSDL

It stands for Web Service Description Language.

As the name suggests, it is a language that describes a particular Web Service.

It is a standard by which a Web Service tells a client what message it will accept and which result it will return.

It contains all the details regarding the use of a Web Service that includes:

  • Methods and properties that a Web Service provides.
  • URLs from which these methods can be accessed by consuming the Web Service.
  • What data type has been used in the Web Service.
  • The communication protocol used.

3. UDDI

It enables the creation of searchable Web Services registries.

This enables us to find the Web Service by connecting to a directory.

4. Discovery file or .Disco file

Discovery files are used to group common services on the web-server.

This is XML based file that contain link in the form of URLs to resources that provide discovery information for a Web Service.

Disco file(static): It is an XML document that contains links to other resources that describe Web Service.

VsDisco file(dynamic): Dynamic discovery files are dynamic documents that are automatically generated by VS.NET during the development process of the Web Service.

Conclusion

I have discussed the basics of Web Services including their introduction, history, examples, use and the important terms related to them.

I have just explained an overview of Web Services that will help beginners to understand what Web Services actually are.

I hope it will be helpful for the beginners.

In my next article I will explain the process of creating a simple Web Service and consuming it in our application.
 


Similar Articles