Web Services Simplified

This article will give you a compact explanation of web services. I explained the things in a compact manner because nobody want to read paragraphs of explanation 😀

Let’s start the discussion with a real world example, we all know the role of the web applications. We also know the shopping cart apps. But the question is, if we really want to create a shopping cart for a company (let’s say M-entertainment online music store) we build our web site with high security concerns. We take the credit card number of the customer, then what ? Is it finished with that ? No.

The real work yet to be started. You take the credit card number then you have to validate that. Contact the specific bank or financial institute and make sure the availability of the account. Then you have to make sure whether the customer has enough credit limit. Then the company has to authenticate itself to the bank (it may be another bank). Then the system has to deduct the amount from the customer account and add it to it’s account. (If there are commissions to the bank it has to be allocated).

OOPS..There’s whole lot of things have to be done. :(. Just think we are a company and we build our website, we have a own database server (or hired one) and we have direct access to it. (we have the authentication). But to check whether the credit is there in customer’s account we have to connect to the bank’s database. Will they provide you the access to their database ? Definitely not.

So what is the solution ? To make your application work perfectly in a real world scenario you need the above functionality. And all the available web applications have the above functionality. So how this is possible ? The answer is web service. The bank gives an interface to interact with their data, this is a simple example for the web services. So web services are interfaces which can be used to interact with third party web applications.

Most commonly web services are implemented with XML and its derivatives. The main reason for this is, XML and XML based standards are platform independent and they are open standards recognized by the industry.

When it comes to interoperability and communication XML is not only the way to do that, but it is a well known and a leading way of describing data. So mostly the communication with the web services happen in the format of XML and derivatives. The derivatives in the sense it includes the other protocols like SOAP,WSDL and much more…

So as explained in the above example if you want to check the available balance of the customer, you have to communicate with the service provided by the bank. You pass the relevant detail of the customer as a parameter (credit card number or account number) to the web service and request the balance and you will get a web service response for your request in an XML format.

Again XML is not only the way to create the web services but it is commonly used because of its open standard and industry wide recognition. The XML based web services are called XML web services but when it is normally referred to as web services it means the XML web services.

Advertisement