SOAP
Encyclopedia
SOAP, originally defined as Simple Object Access Protocol, is a protocol specification for exchanging structured information in the implementation of Web Service
s in computer network
s. It relies on Extensible Markup Language
(XML) for its message format, and usually relies on other Application Layer
protocols, most notably Hypertext Transfer Protocol
(HTTP) and Simple Mail Transfer Protocol
(SMTP), for message negotiation and transmission. SOAP can form the foundation layer of a web services protocol stack
, providing a basic messaging framework upon which web services can be built. This XML based protocol consists of three parts: an envelope, which defines what is in the message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing procedure calls and responses. SOAP has three major characteristics: Extensibility (security and WS-routing are among the extensions under development), Neutrality (SOAP can be used over any transport protocol such as HTTP, SMTP or even TCP
), and Independence (SOAP allows for any programming model).
As an example of how SOAP procedures can be used, a SOAP message could be sent to a web-service-enabled web site such as a real-estate price database, with the parameters needed for a search. The site would then return an XML-formatted document with the resulting data, e.g., prices, location, features. With the data being returned in a standardized machine-parseable format, it can then be integrated directly into a third-party web site or application.
The SOAP architecture consists of several layers of specifications: for message format, Message Exchange Pattern
s (MEP), underlying transport protocol bindings, message processing models, and protocol extensibility. SOAP is the successor of XML-RPC
, though it borrows its transport and interaction neutrality and the envelope/header/body from elsewhere (probably from WDDX
).
recommendation on June 24, 2003. The acronym is sometimes confused with SOA, which stands for Service-oriented architecture
. SOAP standards may be part of a SOA application, but the acronyms are unrelated.
SOAP was originally designed by Dave Winer
, Don Box
, Bob Atkinson, and Mohsen Al-Ghosein in 1998 in a project for Microsoft
(where Atkinson and Al-Ghosein were already working at the time), as an object-access protocol. The SOAP specification is currently maintained by the XML Protocol Working Group of the World Wide Web Consortium
.
After SOAP was first introduced, it became the underlying layer of a more complex set of Web Service
s, based on Web Services Description Language
(WSDL) and Universal Description Discovery and Integration
(UDDI). These services, especially UDDI, have proved to be of far less interest, but an appreciation of them gives a more complete understanding of the expected role of SOAP compared to how web services have actually evolved.
A SOAP node that transmits a SOAP message.
A SOAP node that accepts a SOAP message.
The set of SOAP nodes through which a single SOAP message passes.
The SOAP sender that originates a SOAP message at the starting point of a SOAP message path.
A SOAP intermediary is both a SOAP receiver and a SOAP sender and is targetable from within a SOAP message. It processes the SOAP header blocks targeted at it and acts to forward a SOAP message towards an ultimate SOAP receiver.
The SOAP receiver that is a final destination of a SOAP message. It is responsible for processing the contents of the SOAP body and any SOAP header blocks targeted at it. In some circumstances, a SOAP message might not reach an ultimate SOAP receiver, for example because of a problem at a SOAP intermediary. An ultimate SOAP receiver cannot also be a SOAP intermediary for the same SOAP message.
(which is the same protocol as HTTP at the application level, but uses an encrypted transport protocol
underneath) with either simple or mutual authentication; this is the advocated WS-I method to provide web service security as stated in the WS-I Basic Profile
1.1.
This is a major advantage over other distributed protocols like GIOP/IIOP or DCOM
which are normally filtered by firewalls. SOAP over AMQP is yet another possibility that some implementations support.
There is also the SOAP-over-UDP
OASIS standard.
was chosen as the standard message format because of its widespread use by major corporations and open source
development efforts. Additionally, a wide variety of freely available tools significantly eases the transition to a SOAP-based implementation. The somewhat lengthy syntax
of XML
can be both a benefit and a drawback. While it promotes readability for humans, facilitates error detection, and avoids interoperability problems such as byte-order (Endianness
), it can slow processing speed and can be cumbersome. For example, CORBA
, GIOP, ICE
, and DCOM
use much shorter, binary message formats. On the other hand, hardware appliances are available to accelerate processing of XML
messages. Binary XML
is also being explored as a means for streamlining the throughput requirements of XML.
Web service
A Web service is a method of communication between two electronic devices over the web.The W3C defines a "Web service" as "a software system designed to support interoperable machine-to-machine interaction over a network". It has an interface described in a machine-processable format...
s in computer network
Computer network
A computer network, often simply referred to as a network, is a collection of hardware components and computers interconnected by communication channels that allow sharing of resources and information....
s. It relies on Extensible Markup Language
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
(XML) for its message format, and usually relies on other Application Layer
Application layer
The Internet protocol suite and the Open Systems Interconnection model of computer networking each specify a group of protocols and methods identified by the name application layer....
protocols, most notably Hypertext Transfer Protocol
Hypertext Transfer Protocol
The Hypertext Transfer Protocol is a networking protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web....
(HTTP) and Simple Mail Transfer Protocol
Simple Mail Transfer Protocol
Simple Mail Transfer Protocol is an Internet standard for electronic mail transmission across Internet Protocol networks. SMTP was first defined by RFC 821 , and last updated by RFC 5321 which includes the extended SMTP additions, and is the protocol in widespread use today...
(SMTP), for message negotiation and transmission. SOAP can form the foundation layer of a web services protocol stack
Web Services Protocol Stack
A web service protocol stack is a protocol stack that is used to define, locate, implement, and make Web services interact with each other...
, providing a basic messaging framework upon which web services can be built. This XML based protocol consists of three parts: an envelope, which defines what is in the message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing procedure calls and responses. SOAP has three major characteristics: Extensibility (security and WS-routing are among the extensions under development), Neutrality (SOAP can be used over any transport protocol such as HTTP, SMTP or even TCP
Transmission Control Protocol
The Transmission Control Protocol is one of the core protocols of the Internet Protocol Suite. TCP is one of the two original components of the suite, complementing the Internet Protocol , and therefore the entire suite is commonly referred to as TCP/IP...
), and Independence (SOAP allows for any programming model).
As an example of how SOAP procedures can be used, a SOAP message could be sent to a web-service-enabled web site such as a real-estate price database, with the parameters needed for a search. The site would then return an XML-formatted document with the resulting data, e.g., prices, location, features. With the data being returned in a standardized machine-parseable format, it can then be integrated directly into a third-party web site or application.
The SOAP architecture consists of several layers of specifications: for message format, Message Exchange Pattern
Message Exchange Pattern
In software architecture, a messaging pattern is a network-oriented architectural pattern which describes how two different parts of a message passing system connect and communicate with each other....
s (MEP), underlying transport protocol bindings, message processing models, and protocol extensibility. SOAP is the successor of XML-RPC
XML-RPC
XML-RPC is a remote procedure call protocol which uses XML to encode its calls and HTTP as a transport mechanism. "XML-RPC" also refers generically to the use of XML for remote procedure call, independently of the specific protocol...
, though it borrows its transport and interaction neutrality and the envelope/header/body from elsewhere (probably from WDDX
WDDX
WDDX is a programming-language-, platform- and transport-neutral data interchange mechanism to pass data between different environments and different computers...
).
History
SOAP once stood for 'Simple Object Access Protocol' but this acronym was dropped with Version 1.2 of the standard. Version 1.2 became a W3CWorld Wide Web Consortium
The World Wide Web Consortium is the main international standards organization for the World Wide Web .Founded and headed by Tim Berners-Lee, the consortium is made up of member organizations which maintain full-time staff for the purpose of working together in the development of standards for the...
recommendation on June 24, 2003. The acronym is sometimes confused with SOA, which stands for Service-oriented architecture
Service-oriented architecture
In software engineering, a Service-Oriented Architecture is a set of principles and methodologies for designing and developing software in the form of interoperable services. These services are well-defined business functionalities that are built as software components that can be reused for...
. SOAP standards may be part of a SOA application, but the acronyms are unrelated.
SOAP was originally designed by Dave Winer
Dave Winer
Dave Winer is an American software developer, entrepreneur and writer in New York City. Winer is noted for his contributions to outliners, scripting, content management, and web services, as well as blogging and podcasting...
, Don Box
Don Box
Don Box is a Distinguished Engineer currently working at Microsoft.Along with Bob Atkinson, Mohsen Al-Ghosein, and Dave Winer, Don was one of the original four designers of SOAP, a basic messaging layer for web services....
, Bob Atkinson, and Mohsen Al-Ghosein in 1998 in a project for Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...
(where Atkinson and Al-Ghosein were already working at the time), as an object-access protocol. The SOAP specification is currently maintained by the XML Protocol Working Group of the World Wide Web Consortium
World Wide Web Consortium
The World Wide Web Consortium is the main international standards organization for the World Wide Web .Founded and headed by Tim Berners-Lee, the consortium is made up of member organizations which maintain full-time staff for the purpose of working together in the development of standards for the...
.
After SOAP was first introduced, it became the underlying layer of a more complex set of Web Service
Web service
A Web service is a method of communication between two electronic devices over the web.The W3C defines a "Web service" as "a software system designed to support interoperable machine-to-machine interaction over a network". It has an interface described in a machine-processable format...
s, based on Web Services Description Language
Web Services Description Language
The Web Services Description Language is an XML-based language that is used for describing the functionality offered by a Web service. A WSDL description of a web service provides a machine-readable description of how the service can be called, what parameters it expects and what data structures...
(WSDL) and Universal Description Discovery and Integration
Universal Description Discovery and Integration
Universal Description, Discovery and Integration is a platform-independent, Extensible Markup Language -based registry for businesses worldwide to list themselves on the Internet and a mechanism to register and locate web service applications...
(UDDI). These services, especially UDDI, have proved to be of far less interest, but an appreciation of them gives a more complete understanding of the expected role of SOAP compared to how web services have actually evolved.
Specification
The SOAP specification defines the messaging framework which consists of:- The SOAP processing model defining the rules for processing a SOAP message
- The SOAP extensibility model defining the concepts of SOAP features and SOAP modules
- The SOAP underlying protocol binding framework describing the rules for defining a binding to an underlying protocol that can be used for exchanging SOAP messages between SOAP nodes
- The SOAP message construct defining the structure of a SOAP message
Processing model
The SOAP processing model describes a distributed processing model, its participants, the SOAP nodes and how a SOAP receiver processes a SOAP message. The following SOAP nodes are defined:- SOAP sender
A SOAP node that transmits a SOAP message.
- SOAP receiver
A SOAP node that accepts a SOAP message.
- SOAP message path
The set of SOAP nodes through which a single SOAP message passes.
- Initial SOAP sender (Originator)
The SOAP sender that originates a SOAP message at the starting point of a SOAP message path.
- SOAP intermediary
A SOAP intermediary is both a SOAP receiver and a SOAP sender and is targetable from within a SOAP message. It processes the SOAP header blocks targeted at it and acts to forward a SOAP message towards an ultimate SOAP receiver.
- Ultimate SOAP receiver
The SOAP receiver that is a final destination of a SOAP message. It is responsible for processing the contents of the SOAP body and any SOAP header blocks targeted at it. In some circumstances, a SOAP message might not reach an ultimate SOAP receiver, for example because of a problem at a SOAP intermediary. An ultimate SOAP receiver cannot also be a SOAP intermediary for the same SOAP message.
Transport methods
Both SMTP and HTTP are valid application layer protocols used as Transport for SOAP, but HTTP has gained wider acceptance as it works well with today's Internet infrastructure; specifically, HTTP works well with network firewalls. SOAP may also be used over HTTPSHttps
Hypertext Transfer Protocol Secure is a combination of the Hypertext Transfer Protocol with SSL/TLS protocol to provide encrypted communication and secure identification of a network web server...
(which is the same protocol as HTTP at the application level, but uses an encrypted transport protocol
Transport Layer Security
Transport Layer Security and its predecessor, Secure Sockets Layer , are cryptographic protocols that provide communication security over the Internet...
underneath) with either simple or mutual authentication; this is the advocated WS-I method to provide web service security as stated in the WS-I Basic Profile
WS-I Basic Profile
The WS-I Basic Profile , a specification from the Web Services Interoperability industry consortium , provides interoperability guidance for core Web Services specifications such as SOAP, WSDL, and UDDI...
1.1.
This is a major advantage over other distributed protocols like GIOP/IIOP or DCOM
Distributed component object model
Distributed Component Object Model is a proprietary Microsoft technology for communication among software components distributed across networked computers. DCOM, which originally was called "Network OLE", extends Microsoft's COM, and provides the communication substrate under Microsoft's COM+...
which are normally filtered by firewalls. SOAP over AMQP is yet another possibility that some implementations support.
There is also the SOAP-over-UDP
SOAP-over-UDP
SOAP-over-UDP is an OASIS standard covering the publication of SOAP messages over UDP transport protocol,providing for One-Way and Request-Response message patterns.- References :...
OASIS standard.
Message format
XMLXML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
was chosen as the standard message format because of its widespread use by major corporations and open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
development efforts. Additionally, a wide variety of freely available tools significantly eases the transition to a SOAP-based implementation. The somewhat lengthy syntax
Syntax
In linguistics, syntax is the study of the principles and rules for constructing phrases and sentences in natural languages....
of XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
can be both a benefit and a drawback. While it promotes readability for humans, facilitates error detection, and avoids interoperability problems such as byte-order (Endianness
Endianness
In computing, the term endian or endianness refers to the ordering of individually addressable sub-components within the representation of a larger data item as stored in external memory . Each sub-component in the representation has a unique degree of significance, like the place value of digits...
), it can slow processing speed and can be cumbersome. For example, CORBA
Çorba
Chorba , ciorbă , shurpa , shorpo , or sorpa is one of various kinds of soup or stew found in national cuisines across Middle East...
, GIOP, ICE
Internet Communications Engine
The Internet Communications Engine, or Ice, is an object-oriented middleware that provides object-oriented Remote Procedure Call, grid computing and Publish/subscribe functionality developed by ZeroC and dual-licensed under the GNU GPL and a proprietary license...
, and DCOM
Distributed component object model
Distributed Component Object Model is a proprietary Microsoft technology for communication among software components distributed across networked computers. DCOM, which originally was called "Network OLE", extends Microsoft's COM, and provides the communication substrate under Microsoft's COM+...
use much shorter, binary message formats. On the other hand, hardware appliances are available to accelerate processing of XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
messages. Binary XML
Binary XML
Binary XML refers to any specification which defines the compact representation of XML in a binary format. While there are several competing formats, none has been widely adopted by a standards organization or accepted as a de facto standard...
is also being explored as a means for streamlining the throughput requirements of XML.
Example message
Advantages
- SOAP is versatile enough to allow for the use of different transport protocols. The standard stacks use HTTP as a transport protocol, but other protocols such as JMSJava Message ServiceThe Java Message Service API is a Java Message Oriented Middleware API for sending messages between two or more clients. JMS is a part of the Java Platform, Enterprise Edition, and is defined by a specification developed under the Java Community Process as JSR 914...
and SMTPSimple Mail Transfer ProtocolSimple Mail Transfer Protocol is an Internet standard for electronic mail transmission across Internet Protocol networks. SMTP was first defined by RFC 821 , and last updated by RFC 5321 which includes the extended SMTP additions, and is the protocol in widespread use today...
are also usable. - Since the SOAP model tunnels fine in the HTTP get/response model, it can tunnel easily over existing firewalls and proxies, without modifications to the SOAP protocol, and can use the existing infrastructure.
Disadvantages
- Because of the verbose XML format, SOAP can be considerably slower than competing middlewareMiddlewareMiddleware is computer software that connects software components or people and their applications. The software consists of a set of services that allows multiple processes running on one or more machines to interact...
technologies such as CORBAÇorbaChorba , ciorbă , shurpa , shorpo , or sorpa is one of various kinds of soup or stew found in national cuisines across Middle East...
. This may not be an issue when only small messages are sent. To improve performance for the special case of XML with embedded binary objects, the Message Transmission Optimization MechanismMTOMMTOM is the W3C Message Transmission Optimization Mechanism,a method of efficiently sending binary data to and from Web services.MTOM is usually used with XOP .-Status:MTOM is a W3C Recommendation....
was introduced. - When relying on HTTP as a transport protocol and not using WS-AddressingWS-AddressingWS-Addressing or Web Services Addressing is a specification of transport-neutral mechanisms that allow web services to communicate addressing information...
or an ESBEnterprise service busAn enterprise service bus is a software architecture model used for designing and implementing the interaction and communication between mutually interacting software applications in Service Oriented Architecture...
, the roles of the interacting parties are fixed. Only one party (the client) can use the services of the other. Developers must use pollingPolling (computer science)Polling, or polled operation, in computer science, refers to actively sampling the status of an external device by a client program as a synchronous activity. Polling is most often used in terms of input/output , and is also referred to as polled or software driven .Polling is sometimes used...
instead of notification in these common cases.
See also
- SOAP with AttachmentsSOAP with AttachmentsSOAP with Attachments or MIME for Web Services refers to the method of using Web Services to send and receive files using a combination of SOAP and MIME, primarily over HTTP....
- SOAP with Attachments API for Java
- List of web service protocols
- Extensible User Interface Protocol (XUP)Extensible User Interface ProtocolThe Extensible User Interface Protocol, or XUP, is a proposed web standard. XUP is a SOAP-based protocol for communicating events in a user interface, where the user interface is described by an XML document. The specification does not limit what format the XML document is in, or what event model...
– a SOAP based UI protocol - SOAPjrSOAPjrSOAPjr is a protocol specification for exchanging structured information in the implementation of Web services in computer networks. It is a hybrid of SOAP and JSON-RPC .-Introduction:...
– a hybrid of SOAP and JR (JSON-RPCJSON-RPCJSON-RPC is a remote procedure call protocol encoded in JSON. It is a very simple protocol , defining only a handful of data types and commands...
) - WebSocketsWebSocketsWebSocket is a technology providing for bi-directional, full-duplex communications channels, over a single Transmission Control Protocol socket. It is designed to be implemented in web browsers and web servers, but it can be used by any client or server application...
- Web Services SecurityWS-SecurityWS-Security is a flexible and feature-rich extension to SOAP to apply security to web services. It is a member of the WS-* family of web service specifications and was published by OASIS....