HTTP Receiver is a process starter activity that starts the process based on the receipt of an HTTP request.
The General tab has the following fields.
|Field||Literal Value/Module Property/Process property?||Description|
|Name||None||The name to be displayed as the label for the activity in the process.|
HTTP Connector resource describes the characteristics of the connection used to receive incoming HTTP requests.
See HTTP Connector for more information about specifying shared resources.
|Yes||This is the prefix of a URL path that is used to select the contexts to which an incoming request is passed.
You can either specify both Context Path and Path Spec, any, or none of these elements. For example, the path displays as the http://hostname.com/contextPath/pathSpec format.
If the Context Path is not specified, the context path is referred to as the root context.
|Output Style||None||The type of output. It can be either String or Binary.|
|Parse Post Method Data||None||Specifies to parse the message body of the HTTP request into a schema for the output of the activity.
When this check box is selected, the parameters specified in the Parameters field are used to validate the incoming request and parse it into the output schema.
|Parameters||None||The parameters of the incoming HTTP request.
If you specify parameters in this table, the incoming request is parsed and represented as a schema in this output of the activity. For each parameter, you must provide a name, datatype, and whether the field is Optional, Required, or Repeating.
Note: Specifying parameters in this field parses the query string of the request into the output schema, regardless of whether the Parse Post Method Data check box is selected. Selecting the Parse Post Method Data check box and specifying parameters here is required to parse the message body along with the query string of the request.
|Expose Security Context||None||Places the information from the user’s security context (either authentication or SSL certificate information) into the Context or SecurityContext output element.
This is a fairly expensive operation and SSL certificates can consume memory resources. Hence, select this option only if you require information from the user’s security context for later use in your process.
|Default Encoding||Yes||Specifies the encoding to use if no charset is specified in the
Content-Type header of the message. This encoding is used for the message body and URL.
However, when URIEncoding is specified in the HTTP Connector shared resource, the Default Encoding parameter specified here applies to the contentType alone and not to the URIEncoding property.
The Advanced tab has the following fields.
|Field||Process Property/Module Property?||Description|
|Sequence Key||None||This field can contain an XPath expression that specifies which processes should run in sequence. Process instances with sequencing keys that evaluate to the same value are executed sequentially in the sequence the process instance was created.|
|Custom Job Id||None||This field can contain an XPath expression that specifies a custom ID for the process instance.|
Special Characters in HTTP Requests
Depending upon the content type of the data for the request, the request can contain URL-encoded data and the server is expected to decode the data. For example, an incoming request may have the following message body:
If the message body is not parsed (Parse Post Method Data check box is not selected on the General tab), the body of the message remains URL-encoded in the PostData output element. If the message body is parsed, the data is decoded before being placed in the PostData output element, and that element would display as follows:
name=John Smith&address=500 1/2 Main Street
The PostData output element can contain different data and be a different length depending upon whether the message body is parsed. Hence, ensure that you obtain data from the parameters output element when the message body is parsed.
The Output Editor tab describes the data structure for the headers of the HTTP request. You can use the default structure, or you can alter the structure, if the incoming request has a specific data structure for the header of the request.
The header structure is defined by the HTTP protocol. See the HTTP protocol specification for more information about the fields and content of the header of an HTTP request. You can obtain this specification at www.w3.org.
|Output Header Element||Datatype||Description|
|Accept||string|| This field specifies media types that are acceptable for response messages for the incoming request. For example,
text/*,text/html. Media types are described in the HTTP specification.
If no Accept-Header field is present, it is assumed that the client accepts all media types.
|Accept-Charset||string||This field specifies the character sets that are acceptable for response messages for the incoming request. For example, iso-8859-5, unicode-1-1. Character sets are described in the HTTP specification.
If no Accept-Charset header is present, it is assumed that the client accepts any character set.
|Accept-Encoding||string||This field specifies the content-coding values that are acceptable for response messages. For example, compress, gzip. See the HTTP specification for more information about this header field.|
|Content-Type||string||This field indicates the media type of the entity body sent to the receiver. For example, text/html; charset=ISO-8850-4. Media types are described in the HTTP specification.|
|Content-Length||string||This field indicates the size of the entity body (in decimal number of OCTETs) sent to the receiver.
This field takes into account the encoding of the message body. See Special Characters in HTTP Requests for more information on when the message body is URL encoded.
|Connection||string||Using this field the requestor can specify options required for this connection. For example, the option close specifies that the requestor would like the connection to be closed when the request is complete.|
|Cookie||string||See the HTTP specification for more information about this field.
If you want to receive more than one cookie, set the cardinality for this field to repeating (*).
|Pragma||string||This field is used to include implementation-specific directives that might apply to the receiver. See the HTTP specification for more information about using this field.|
The following is the output for the activity.
|Method||string||The method specified in the request. For example, GET or POST.|
|RequestURI||string||The address portion of the request. This is the portion before the question mark (?).|
|HTTPVersion||string||The version field of the HTTP request.|
|PostData or BinaryContent||string||The message body of the HTTP request. The content of this element depends upon whether the message body is parsed. Parsing behavior is controlled by the
Parse Post Method Data field on the
The content of this element will be PostData if the Output Style field selected is of type String, and the element will be BinaryContent if the Output Style field selected is of type Binary.
See Special Characters in HTTP Requests for more information.
|QueryString||string||The query string portion of the request. This is the portion after the question mark (?).|
|Header||string||The header of the HTTP request.|
|Protocol||string||This can be HTTP or HTTPS depending upon the protocol used by the request.|
|Port||string||The port number on which the request was received. This is the port number configured in the HTTP Connector resource.|
The fields of the header specified on the Output Editor tab. See the description of the Output Editor tab for more information about these items.
|Parameters||complex||The parameters for the incoming request. These parameters are configured in the
Parameters field on the
When the Parse Post Method Data check box on the General tab is selected, the parameters include the parameters in the query string and message body of the incoming HTTP request.
When the Parse Post Method Data check box is not selected, the parameters include only the query string of the incoming request.
|DynamicHeaders||complex||The dynamic header is an additional header parameter to receive header parameters from incoming HTTP requests. This element is specified in the
Output Editor tab. The
DynamicHeaders consists of the following information:
The following overriding conditions can be considered:
|mimeEnvelopeElement||complex||This element contains the message attachments.
This element contains a repeating element named mimePart that contains each mime attachment.
|mimeHeaders||complex||This element contains the mime header for each
mimePart. Mime headers can contain the following information:
See http://www.faqs.org/rfcs/rfc2045.html for more information about MIME headers and their syntax.
|binaryContent | textContent||choice||This element contains the mime attachment.
The element can be one of the following:
|Context||complex||Contains information about the client’s environment.
This element holds the optional RemoteAddress element.
|RemoteAddress||string||The IP address of the client that submitted the HTTP request.|
Threading Policy Details
The following are the details about the HTTP Receiver activity threading policy.
Activities that support policies will display the Policy tab. To associate a new or existing policy with the HTTP Receiver activity, click the Add Policy to Activity icon. To edit policy details, click Go to selected Policy icon. The Policy tab has the following fields.