A web service allows machine-to-machine communication over a network through a standardized interface described in WSDL and using SOAP messages over HTTP. SOAP defines an XML format for structured messaging to allow applications to communicate, making it platform and language independent. While SOAP enables interoperability, it can be slower than other APIs due to its extensive use of XML.
2. What is a web service?
"A Web service is a software system designed to support
interoperable machine-to-machine interaction over a network. It
has an interface described in a machine-processable format
(specifically WSDL). Other systems interact with the Web
service in a manner prescribed by its description using SOAP-
messages, typically conveyed using HTTP with an XML
serialization in conjunction with other Web-related standards."
The key elements are:
Machine-to-machine communication.
Machine-processable interface description (WSDL).
Communication through messages (SOAP) using HTTP as
transport protocol.
XML serialization
3. What is SOAP ?
• SOAP stands for Simple Object Access Protocol.
• SOAP is an application communication protocol.
• SOAP is a format for sending and receiving the
messages.
• SOAP is platform independent.
• SOAP is based on XML.
• SOAP is a W3C recommendation.
4. Why SOAP ?
• It is important for web applications to be able to
communicate over the Internet.
• The best way to communicate between applications is
over HTTP, because HTTP is supported by all Internet
browsers and servers. SOAP was created to accomplish
this.
• SOAP provides a way to communicate between
applications running on different operating systems, with
different technologies and programming languages.
5.
6. Syntax Rules
• A SOAP message MUST be encoded using XML
• A SOAP message MUST use the SOAP Envelope
namespace
• A SOAP message MUST use the SOAP Encoding
namespace
• A SOAP message must NOT contain a DTD reference
• A SOAP message must NOT contain XML Processing
Instructions
7. SOAP Building Block
• A SOAP message is an ordinary XML document
containing the following elements:
• An Envelope element that identifies the XML document as a
SOAP message
• A Header element that contains header information
• A Body element that contains call and response information
• A Fault element containing errors and status information
• All the elements above are declared in the default namespace
for the SOAP envelope:
• http://www.w3.org/2003/05/soap-envelope/
• and the default namespace for SOAP encoding and data types
is:
• http://www.w3.org/2003/05/soap-encoding
10. SOAP Binding
The SOAP specification defines the structure of the SOAP
messages, not how they are exchanged.
• This gap is filled by what is called "SOAP Bindings".
• SOAP bindings are mechanisms which allow SOAP
messages to be effectively exchanged using a transport
protocol.
13. Advantages of SOAP
• WS Security: SOAP defines its own
security known as WS Security.
• Language and Platform independent:
SOAP web services can be written in any
programming language and executed in
any platform.
14. Disadvantage of SOAP
• Slow: SOAP uses XML format that must
be parsed to be read. It defines many
standards that must be followed while
developing the SOAP applications. So it is
slow and consumes more bandwidth and
resource.
• WSDL dependent: SOAP uses WSDL
and doesn't have any other mechanism to
discover the service.