SOAP is an RPC protocol allowing transmission of messages (expressed in XML) between a client and server over a transport (usually HTTP). Work began in 1999.
- Extensibility of the protocol through namespaced tags.
- Neutrality of the underlying transport allows different use cases.
- Independence of language or platform allows services to be written in the most appropriate language.
- WSDL describes the format of messages.
- Senders send Messages to Receivers.
- Receivers receive Messages from Senders.
- Messages are passed between Senders and Receivers.
- Envelope element identifies the root of a SOAP message.
- Headers don't use HTTP headers; both request and response.
- Body element contains the data or Fault information.
- Service Provider
- Service Requester
- WSDL schema
- Types define rules around values in messages:
- Scalar types:
- Compound types:
- Complex types are entities that combine the above types.
- Literal XML
encodingStyleforgoes SOAP encoding, deferring schema to the XML schema.
- Scalar types:
WSDL is a machine-processable specification of a web service's interface used to generate stub implementations of clients and servers. It defines the message types and their component parts.
documentis geared toward returning representations of entities.
rpcis geared toward performing operations.
Messages can be exchanged through a number of patterns:
- One-way messaging allows a Sender to Message a Receiver without a response.
- Request/response messaging follows the traditional Sender Messages a Receiver, and the Receiver returns a response to the Sender.
- Notification messaging allows an asynchronous design where a Receiver sends a Message to a Sender.
- Solicit/response messages enable a Receiver to solicit a Message from a Sender by initiating a flow with a Message, reversing the request/response flow.
The abstract portion defines concepts, avoiding implementation detail.
wsdl:definitionlists XML namespaces (
xmlns:example) used to identify sources of schema objects.
wsdl:typesdeclares types used in messages.
xs:elementdefines named elements.
wsdl:messagedeclares request/response/error messages.
wsdl:partdescries a partial section of a message.
wsdl:portTypedeclare "ports" into the application from the outside, and can be bound to transports iun the concrete section.
wsdl:operationoutlines a mode of operation for a service, outlined by the presence and order of input, output and fault sections:
wsdl:inputdefines an inbound request Message.
wsdl:outputdefines an outbound response Message.
wsdl:faultdefines an outbound error Message.
The concrete part assigns transports to port types.
typepairs that reference ports for binding.
soap:bindingbind WSDL bindings to transports with a
- HTTP, using
- SMTP, using
In-reply-toheaders for message correlation.
Extensions define reusable implementations of behaviours that span services. They're usually implemented by middleware on the client and server side that is not tied to individual services.
Defines signing and encryption of SOAP messages to assure integrity and confidentiality respectively, and allows attachment of security tokens to identify Senders.
Allows brokering security realms from products like ADFS and SAML IdPs.
Declares a standardised way of attaching message routing data with SOAP headers.
WS-ReliableMessaging defines a protocol allowing for reliable delivery of SOAP messages between distributed systems in spite of failures in the network between them.
An Application Source sends a Message to a Reliable Messaging Source which transmits it to a Reliable Messaging Destination, which acknowledges receipt and transmits the Message to an Application Destination.
WS-RM defines a number of delivery assurances:
AtLeastOnce, but maybe more than once.
AtMostOnce, but may go undelivered.
ExactlyOncewith no duplicates and missed deliveries without errors in the RMS or RMD.
InOrderguarantees ordered delivery in addition to of any of the above assurances.
A specification providing coordination types used in the
- Atomic Transactions cover individual operations.
- Business Activities cover longer-running operations.
Provides coordination of distributed operations across systems.