ADBMS Case Study
ADBMS Case Study
SOAP is an acronym for Simple Object Access Protocol. It is an XML-based messaging protocol for
exchanging information among computers. SOAP is an application of the XML specification. In other
words, it is a definition of how web services talk to each other or talk to client applications that invoke
them. It has some specification which could be used across all applications.
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.
Although SOAP can be used in a variety of messaging systems and can be delivered via a variety of
transport protocols, the initial focus of SOAP is remote procedure calls transported via HTTP.
Other frameworks including CORBA, DCOM, and Java RMI provide similar functionality to SOAP,
but SOAP messages are written entirely in XML and are therefore uniquely platform- and language-
independent.
Need of SOAP
In today's world, there is huge number of applications which are built on different programming
languages. For example, there could be a web application designed in Java, another in .Net and
another in PHP. Consequently, exchanging data between applications is crucial in today's networked
world. But the process of data exchange between these heterogeneous applications would be complex.
So will be the complexity of the code to accomplish this data exchange.
One of the methods used to combat this complexity is to use XML (Extensible Markup Language) as
the intermediate language for exchanging data between applications. Every programming language
can understand the XML markup language. Hence, XML was used as the underlying medium for data
exchange.
But still, there are no standard specifications on use of XML across all programming languages for
data exchange. That is where SOAP comes in. SOAP was designed to work with XML over HTTP
and have some sort of specification which could be used across all applications.
SOAP is the XML way of defining what information is sent and how.
SOAP enables client applications to easily connect to remote services and invoke remote
methods.
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.
When developing 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.
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.
The SOAP specification defines something known as a "SOAP message" which is what is sent to the
web service and the client application. Fig. 1. shows the various building blocks of a SOAP Message.
Fig. 1. Building blocks of a SOAP message
The SOAP message is nothing but a mere XML document which has the below components:
An Envelope element that identifies the XML document as a SOAP message – This is the
containing part of the SOAP message and is used to encapsulate all the details in the SOAP
message. This is the root element in the SOAP message. It is a mandatory element that
defines the start and end of a message.
A Header element that contains header information – The header element can contain
information such as authentication credentials which can be used by the calling application. It
contains any optional attributes of the message used in processing the message, either at an
intermediary point or at the ultimate end-point. It is an optional element. It can also contain
the definition of complex types which could be used in the SOAP message. By default, the
SOAP message can contain parameters which could be of simple types such as strings and
numbers, but can also be a complex object type.
A Body element that contains the XML data comprising the message being sent. It is a
mandatory element.
An optional Fault element that provides information about errors that occur while processing
the message.