"Web Service allows a program to interact with server/engine, instead of using browser to open a web page".
It means Web Service is a kind of application which is deployed on server and when user wants to access that service, they need to write the program in any supporting language. Web service does not provide any UI (user interface). Here the user written program would be the only medium to send input to the server and receive output from the server.
For Example: Google has provided many web services like Weather, Currency Converter etc.
Suppose if you want to show the weather information on your website, there is no need to rewrite the web service for weather, you can use that google already written weather web service by just procuring its license. By this way you just need to design and interactive program (may be in XML) to display the received response from that web service.
Web Services Types- Web services are divided into 2 categories:
1. SOAP (Simple Object Access Protocol)
2. REST (Representation State Transfer)
SOAP Services
Below are the features of SOAP services:
1. It stands for Simple Object Access Protocol.
2. It is used to exchange the message between service and application in XML format.
3. SOAP is itself a protocol which used HTTP protocol to transfer the data between application and web service.
4. SOAP is a wrapper over the HTTP protocol (this implies that in SOAP two protocols are used: SOAP and HTTP).
5. It is a Standard, Conventional and Heavy.
Why Heavy?
In SOAP, request and response both are in XML format and XML file have start and end tag for a single tag.
6. SOAP uses WSDL (Web Service Description Language) (About WSDL will learn in next post).
REST Services
Below are the features of REST services:
1. REST is a set of guidelines
that describes how a client should interact with the server.
2. The data and functionality which client can
access from the server are known as the resource.
3. REST services use HTTP or other similar
protocol which supports Get, Post, Put and Delete operations.
4. REST services use WADL (Web Application Description Language).
5. It is New and Light weighted approach.
6. In REST functionality can be accessed by
unique URI. In WADL each functionality has unique URI.
7. In REST services, response can be received
in different format like plain text, HTML, XML, JSON, PDF etc.
No comments:
Post a Comment