Latest web development tutorials

SOAP HTTP Binding

HTTP protocol

HTTP to communicate over TCP / IP. HTTP client uses a TCP connection to the HTTP server. After the connection is established, 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 the request and sends an HTTP response to the client. This response contains the status of the request may indicate the status codes:

200 OK
Content-Type: text/plain
Content-Length: 200

In the above example, the server returns a status code of 200. This is a standard HTTP success code.

If the server can not decode the request, it may return a message similar to this:

400 Bad Request
Content-Length: 0


SOAP HTTP Binding

SOAP method refers to the compliance with the SOAP encoding rules HTTP request / response.

HTTP + XML = SOAP

SOAP request could be an HTTP POST or HTTP GET request.

HTTP POST request specifies at least two HTTP headers: Content-Type and Content-Length.


Content-Type

MIME type of a SOAP request and response Content-Type header to define the message and the character encoding for XML body of the request or response (optional).

grammar

Content-Type: MIMEType; charset=character-encoding

Examples

POST /item HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8


Content-Length

Content-Length header for a SOAP request and respond to requests or the number of bytes of the body.

grammar

Content-Length: bytes

Examples

POST /item HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 250