When a message
is received from a Web service client or Web server, the HTTPInput or HTTPRequest node that receives
that message must parse the HTTP headers to create elements in the
message tree. When an HTTPReply or HTTPRequest message sends a message
to a Web service client or Web server, 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.
- Input. An input message is received by the HTTPInput node from a Web service client. The HTTP headers in the
input message (data up to and including the CRLFCRLF) are parsed by
the HTTPInput parser and are included in the message tree under the
correlation name HTTPInput. The headers shown in the following table
are expected in an input message; others might also be present.
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) |
- Reply. A reply message is sent by the HTTPReply node to the Web service client that sent the corresponding
input message. The Web service headers
in the reply message are created in the message tree under the correlation
name HTTPReply, which is also the name of the parser used to parse
that part of the message tree to a bit stream. You can choose to create
your own HTTPReply header in a Compute node, or you can configure
the HTTPReply node to create
it using default values, or values taken from the HTTPReply or HTTPResponse
trees in the input message, or both. If the HTTPReply node creates a default
HTTPReply header, it contains the Web service 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=utf-8 |
- Request. A request message is sent to a
Web server by the HTTPRequest node.
The HTTP headers in this message must be created in the message tree
under the correlation name HTTPRequest, and are parsed by the HTTPRequest
parser when the message tree is parsed to a bit stream. You can choose
to create your own HTTPRequest header in a Compute node, or you can configure
the HTTPRequest node to
create it using default values, or values taken from the HTTPInput
or HTTPRequest trees in the input message, or both. If the HTTPRequest node creates a
default HTTPRequest header, it contains the Web
service headers and values shown in the following table.
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=utf-8 |
SOAPAction |
"" (empty string) |
- Response. A response message is received by the HTTPRequest node from the Web server to
which the corresponding request message was sent. The HTTP headers
in the response message (data up to and including the CRLFCRLF) are
parsed by the HTTPResponse parser and are included in the message
tree under the correlation name HTTPResponse. The header shown in
the following table is expected in a response message (though not
required); others might also be present.
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.