SOAP via HTTP
SOAP is not tied to any one transport protocol. In fact, SOAP can be transported via SMTP, FTP, IBM’s MQSeries, or Microsoft Message Queuing (MSMQ). However, the SOAP specification includes details on HTTP only, and HTTP remains the most popular SOAP transport protocol.
Quite logically, SOAP requests are sent via an HTTP request and SOAP
responses are returned within the content of the HTTP response. While
SOAP requests can be sent via an HTTP GET, the specification includes
details on HTTP POST only. (HTTP POST is preferred because most
servers place a character limit on GET requests.) Additionally, both
HTTP requests and responses are required to set their content type to
text/xml
.
As an
additional requirement, clients must specify a
SOAPAction
header. The
SOAPAction
header is a server-specific URI used to
indicate the intent of the request. This makes it possible to quickly
determine the nature of the SOAP request, without actually examining
the SOAP message payload. In practice, the header is frequently used
by firewalls as a mechanism for blocking out SOAP requests or for
quickly dispatching SOAP messages to specific SOAP
servers.
The SOAP specification mandates that the client must provide a
SOAPAction
header, but the actual value of the
SOAPAction
header is dependent on the SOAP server
implementation. For example, to access the AltaVista BabelFish
Translation service, hosted by XMethods, you must specify the
urn:xmethodsBabelFish#BabelFish
as the
SOAPAction ...
Get Web Services Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.