SOAP HTTP protocol


Release date:2023-12-20 Update date:2023-12-20 Editor:admin View counts:193

Label:

SOAP HTTP protocol

HTTP protocol

HTTP communicates over TCP/IP. The HTTP client connects to the HTTP server using TCP. After the connection is established, the client can send a 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 a 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 above example, the server returns a status code of 200. This is the standard success code for HTTP.

If the server cannot decode the request, it may return information like this:

400 Bad Request
Content-Length: 0

SOAP HTTP Binding

The SOAP method refers to a HTTP request / response that complies with the SOAP coding rules.

HTTP + XML = SOAP

The SOAP request may be a HTTP POST or HTTP GET request.

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

Content-Type

Request and response of SOAP Content-Type header can define the message’s MIME type, and for the request or response XML the character encoding of the body (optional).

Grammar

Content-Type: MIMEType; charset=character-encoding

Example

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

Content-Length

Request and response of SOAP Content-Length the header specifies the number of bytes for the request or response body.

Grammar

Content-Length: bytes

Example

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

Powered by TorCMS (https://github.com/bukun/TorCMS).