When an HTTPInput or HTTPRequest node receives a message, it parses the HTTP headers to create elements in the message tree. When an HTTPReply or HTTPRequest node sends a message, it parses the HTTP headers from the message tree into a bit stream.
The HTTP headers in a message depend on the type of message that is processed. There are four message types recognized in a message flow, and a parser is associated with each of these.
Header | Content | Example |
---|---|---|
Host | The host name to which the client issued the message. | localhost |
Content-Length | The length of the body of the input message in decimal (that follows the CRLFCRLF after the last header). | 520 |
Content-Type | The type of the body data. | text/xml; charset=utf-8 |
SOAPAction | "" (empty string) |
The headers in the following table might also be automatically generated by the HTTPInput node depending on the request.
Header | Content | Example |
---|---|---|
X-Original-HTTP-Command | An expanded version of the original inbound request | POST http://localhost:7800/Wss001/ |
X-Remote-Addr | The IP address of the client (or proxy if the client is connecting through a proxy) | 127.0.0.1 |
X-Remote-Host | The host name or address of the client (or proxy if the client is connecting through a proxy) | localhost |
X-Server-Name | The broker's machine name | localhost |
X-Server-Port | The broker's port | 7800 |
X-Query-String | The query string if present in the inbound URL (optional) | a=b&x=y |
X-Scheme | The scheme through which the client is connected, either http or https | http |
You can set the HTTPReply Status Code in the local environment; for more information, see the instructions for setting the HTTP Status Code for a reply in Working with HTTP flows.
If the HTTPReply node creates a default HTTPReply header, it contains the headers and values shown in the following table.
Header | Value |
---|---|
Content-Length (if present in the input message) | The calculated length of the reply message body in decimal. |
Content-Type | text/xml; charset=ccsid of the message body |
Header | Value |
---|---|
Host | Value set in the Default Web Service URL property. |
Content-Length | The calculated length of the request message body in decimal. |
Content-Type | text/xml; charset=ccsid of the message body |
SOAPAction | "" (empty string) |
Content-Encoding | "gzip" or "deflate" if the Use compression property is set to gzip, zlib (deflate), or deflate. |
Accept-Encoding | "gzip, deflate" if the Accept compressed responses by default property is selected. |
Header | Content | Example |
---|---|---|
Content-Length | The length of the response message body in decimal. | 1585 |
Web services example messages provides example messages that include these headers.