Simple Object Access Protocol(SOAP)


What is SOAP?

SOAP is an XML-based protocol for accessing web services over HTTP. It has some specification which could be used across all applications.

SOAP is known as the Simple Object Access Protocol, but in later times was just shortened to SOAP v1.2. SOAP is a protocol or in other words is a definition of how web services talk to each other or talk to client applications that invoke them.

SOAP was developed as an intermediate language so that applications built on various programming languages could talk easily to each other and avoid the extreme development effort.

How Does SOAP Work?

The SOAP specification describes a standard, XML-based way to encode requests and responses, including:

  • Requests to invoke a method on a service, including in parameters

  • Responses from a service method, including return value and out parameters

  • Errors from a service

SOAP describes the structure and data types of message payloads by using the emerging W3C XML Schema standard issued by the World Wide Web Consortium (W3C). SOAP is a transport-agnostic messaging system; SOAP requests and responses travel using HTTP, HTTPS, or some other transport mechanism.



Advantages of SOAP

SOAP is the protocol used for data interchange between applications. Below are some of the reasons as to why SOAP is used.

  1. When developing SOAP based Web services, you need to have some of language which can be used for web services to talk with client applications. SOAP is the perfect medium which was developed in order to achieve this purpose. This protocol is also recommended by the W3C consortium which is the governing body for all web standards.
  2. SOAP is a light-weight protocol that is used for data interchange between applications. Note the keyword 'light.' Since SOAP programming is based on the XML language, which itself is a light weight data interchange language, hence SOAP as a protocol that also falls in the same category.
  3. SOAP is designed to be platform independent and is also designed to be operating system independent. So the SOAP protocol can work any programming language based applications on both Windows and Linux platform.
  4. It works on the HTTP protocol –SOAP works on the HTTP protocol, which is the default protocol used by all web applications. Hence, there is no sort of customization which is required to run the web services built on the SOAP protocol to work on the World Wide Web.

    Disadvantages of SOAP

    Some of the disadvantages of SOAP protocol are:

  1. Only XML can be used, JSON and other lightweight formats are not supported.
  2. SOAP is based on the contract, so there is a tight coupling between client and server applications.
  3. SOAP is slow because payload is large for a simple string message, since it uses XML format.
  4. Anytime there is change in the server side contract, client stub classes need to be generated again.
  5. Can’t be tested easily in browser.

SOAP APIs


SOAP is a protocol that’s almost always used in the context of a Web Services/SOA framework.  As such, it’s application programming interface (API) is typically hidden by the higher-level interface for SOA. There are SOA API middleware tools available for nearly all modern programming languages, and Microsoft offers a variety of .NET SOAP/SOA tools.

Future of Simple Object Access Protocol


SOAP was the first widely used protocol for connecting web services in a Service Oriented Architecture (SOA). Today, nearly all modern development of distributed applications is based on RESTful principles. SOAP is almost always confined to legacy applications and projects, and over time its use is declining.


Comments

Popular posts from this blog

Distributed Computing

Getting Started with JavaFX