Understanding the HTTP header
This header is a mandatory element that specifies items such as the HTTP version, the host machine and port, the content type, and character set. The elements of an HTTP header can vary from message to message. The following example shows a typical HTTP header:
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/2.0
Host: localhost:8080
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 1387
In the preceding example:
*POST routes the message to a servlet running on a web server, using HTTP version 1.0 or 1.1.
The message determines which HTTP version to use. Version 1.0 treats an attachment as a single block of data. Version 1.1 supports sending chunked attachments.
*Content-Type specifies the message’s media type. Set Content-Type to
text/xml when calling an Actuate service.
*The default character set is UTF-8. To use the UTF-8 character set, it is not necessary to include this element in the HTTP header.
*Accept indicates the acceptable types of media in the response:
*The application/soap+xml media type describes a SOAP message serialized as XML.
*The application/dime media type supports processing a message either using MIME or by reference to a uniform resource identifier (URI) that accesses a plug-in. A URI is a unique string that can be a uniform resource locator (URL), a uniform resource name (URN), or both. Using a URI ensures uniqueness.
*The multipart/related media type indicates a compound object containing several inter-related parts in the body of a message.
*The asterisk in text/* indicates the response can contain any type of text.
*User-Agent is the client that initiates the request.
*Host is the name of the host machine where the target BIRT iHub resides and, optionally, the port number.
*Cache-Control is a directive to any caching mechanism operating along the request-response transport layer. A no-cache directive keeps a cache from using the response to satisfy a subsequent request. This directive prevents the cache from returning a stale response to a client.
*Pragma is a directive to all recipients along the request-response transport layer. This no-cache directive requires the system to forward the original request to the target BIRT iHub even when a cached copy exists. Forwarding the original request prevents the transmission of a stale copy of a request.
*SOAPAction, a required element, tells the BIRT iHub that the message is a SOAP message. For an Actuate message, use a set of empty quotation marks for the SOAPAction value. The volume determines the action based on the message body. The SOAPAction attribute requires empty quotes because it has no default value.
*Content-Length is the number of characters in the message.