SOAP HTTP Binding

This document describes a binding for SOAP to HTTP/1.1, as described by RFC2616. HTTP defines two types of messages capable of carrying SOAP envelopes; request and response.

Encapsulating SOAP Envelopes in HTTP Request Messages

If a SOAP envelope is to be conveyed in the HTTP request, it should be the complete content of the message body, as defined by RFC2616, section 5, and use the 'POST' method (section 9.5).

If a SOAP envelope is not to be conveyed in the HTTP request, the request method used should be 'GET' (section 9.3).

Encapsulating SOAP Envelopes in HTTP Response Messages

If a SOAP envelope is to be conveyed in the HTTP response, it should be the complete content of the message body, as defined by RFC2616, section 6, with a '200 OK' status code (section 10.2.1).

If a SOAP envelope is not to be conveyed in the HTTP response, the response status code generated should be '204 No Content' (section 10.2.5).

Constraints Imposed

HTTP has both a fixed connection model and message exchange pattern; the client identifies the server through a URI, connects to it, issues a HTTP request message, and receives a HTTP response message. SOAP envelopes may or may not be encapsulated in either or both messages, as outlined above.

Services Available

HTTP always makes the following services available to SOAP applications:

Additionally, implementations may make the following available:

Fault Destination

If a SOAP Fault message is generated by any node along the message path, it should be sent as the content of the HTTP response message body, by default.

Notes

HTTP implementations will time out if there is an unacceptable delay between the request and response messages; the exact timing is implementation-dependent. Additionally, HTTP intermediaries may transform messages as they pass through; use of the Cache-Control: no-transform (RFC2616, section 14.9.5) may or may not prevent them from doing so. Finally, some intermediary and server implementations may restrict the size of the request message; they should signal their unwillingness to handle a larger request entity through the 413 status code; see RFC2616 section 10.4.14.