What do you understand by web services? Explain with example?
web services • 1.3k  views

Web Services

  • Web service is a standardized medium to propagate communication between the client and server applications or electronic devices on the World Wide Web.
  • Web services are self-contained, modular, distributed, dynamic applications that can be described, published, located, or invoked over the network to create products, processes, and supply chains. These applications can be local, distributed, or web-based.
  • Web services are built on top of open standards such as TCP/IP, HTTP, Java, HTML, and XML.
  • A web service is any piece of software that makes it-self available over the internet and uses a standardized XML messaging system.
  • Web services are XML-based information exchange systems that use the Internet for direct application-to-application interaction. These systems can include programs, objects, messages, or documents.
  • As all communication is in XML, web services are not tied to any one operating system or programming language--Java can talk with Perl; Windows applications can talk with Unix applications.
  • A web service is a collection of open protocols and standards used for exchanging data between applications or systems.
  • Software applications written in various programming languages and running on various platforms can use web services to exchange data over computer networks like the Internet in a manner similar to inter-process communication on a single computer. This interoperability (e.g., between Java and Python, or Windows and Linux applications) is due to the use of open standards.

Components and Working of Web Services

A web service enables communication among various applications by using open standards such as HTML, XML, WSDL, UDDI and SOAP.

  • Extensible Markup Language (XML) is a way to label data so we can structure our information in meaningful ways.
  • Web Services Description Language (WSDL) works as a help desk, describing the details of the web service.
  • Universal Description, Discovery, and Integration (UDDI), also much like a help desk, is a means of publishing and finding information about web services.
  • Simple Object Access Protocol (SOAP) is like a courier or communicator during the transfer of data.

Characteristics of Web Services

  • They are XML-Based - Web Services uses XML to represent the data at the representation and data transportation layers. Using XML eliminates any networking, operating system, or platform sort of dependency since XML is the common language understood by all.
  • Loosely Coupled - Client and the web service are not bound to each other, which means that even if the web service changes over time, it should not change the way the client calls the web service. It makes software systems more manageable and allows simpler integration between different systems.
  • Synchronous or Asynchronous functionality - In synchronous operations, the client will actually wait for the web service to complete an operation. Asynchronous operations allow a client to invoke a service and then execute other functions in parallel.
  • Ability to support Remote Procedure Calls (RPCs) - Web services enable clients to invoke procedures, functions, and methods on remote objects using an XML-based protocol.
  • Supports Document Exchange - One of the key benefits of XML is its generic way of representing not only data but also complex documents.

Advantages of Web Services

  • Exposing Business Functionality on the network.
  • Interoperability amongst applications.
  • Uses Standardized Protocol which everybody understands.
  • Reduction in cost of communication.


  • Consider a simple account-management and order processing system. The accounting personnel use a client application built with Visual Basic or JSP to create new accounts and enter new customer orders.
  • The processing logic for this system is written in Java and resides on a Solaris machine, which also interacts with a database to store information.
  • The steps to perform this operation are as follows:
    • The client program bundles the account registration information into a SOAP message.
    • This SOAP message is sent to the web service as the body of an HTTP POST request.
    • The web service unpacks the SOAP request and converts it into a command that the application can understand.
    • The application processes the information as required and responds with a new unique account number for that customer.
    • Next, the web service packages the response into another SOAP message, which it sends back to the client program in response to its HTTP request.
    • The client program unpacks the SOAP message to obtain the results of the account registration process.
Please log in to add an answer.

Continue reading

Find answer to specific questions by searching them here. It's the best way to discover useful content.

Find more