SOAP HTTP Protocol
HTTP Protocol
HTTP communicates over TCP/IP. An HTTP client uses TCP to connect to an HTTP server. After establishing a connection, the client can send an HTTP request message to the server:
POST /item HTTP/1.1 Host: 189.123.255.239 Content-Type: text/plain Content-Length: 200
The server then processes this request and sends an HTTP response to the client. This response contains a status code that indicates the status of the request:
200 OK Content-Type: text/plain Content-Length: 200
In the example above, the server returned a 200 status code. This is the standard success code for HTTP.
If the server cannot decode the request, it may return information similar to this:
400 Bad Request Content-Length: 0
SOAP HTTP Binding
A SOAP method refers to an HTTP request/response that complies with SOAP encoding rules.
HTTP + XML = SOAP
A SOAP request can be an HTTP POST or an HTTP GET request.
An HTTP POST request specifies at least two HTTP headers: Content-Type and Content-Length.
Content-Type
The Content-Type header for SOAP requests and responses can define the MIME type of the message, as well as the optional character encoding used for the XML body of the request or response.
Syntax
Content-Type: MIMEType; charset=character-encoding
Example
POST /item HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8
Content-Length
The Content-Length header for SOAP requests and responses specifies the number of bytes in the body of the request or response.
Syntax
Content-Length: bytes
Example
POST /item HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8 Content-Length: 250Other Extensions