What are Web Services and Why are they Used?
Web Services are the means by which devices communicate over the World Wide Web and uses the standardized XML messaging system. XML is used to encode all communications to a web service. For example, a client invokes a web service by sending an XML message, then waits for a corresponding XML response. As all communication is in XML, web services are not tied to any one operating system or programming language.
Components of Web Service:
The basic web service platform is XML plus HTTP. All the standard web services work using the following components:
- * SOAP (Simple Object Access Protocol)
- * UDDI (Universal Description, Discovery, and Integration)
- * WSDL (Web Service Description Language)
A web service enables communication among various applications by using open standards such as HTML, XML, WSDL, and SOAP. It takes the help of
- * XML to tag the data.
- * SOAP to transfer the message.
- * WSDL to describe the availability of the service.
Consider an Order processing system. The client uses the Frontend client application to send the request for the orders. The processing backend logic will be written in some programming language and resides in the server, which also interacts with the database system to store the data.
The steps performed are:
- 1. The client program bundles the order information into a SOAP message.
- 2. The POST message is sent to the Web Service as the body of an HTTP POST request.
- 3. Web Service unpacks the request and converts into a command that backend application can understand.
- 4. Then the application process the requests and create the unique confirmation number for the customer.
- 5. Next, web service packages the response into another SOAP message and sends back to the customer which in response to its HTTP request.
- 6. The client program unpacks the message to obtain the results.