HTTP Receiver
HTTP Receiver is a process starter activity that starts the process based on the receipt of an HTTP request.
General
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 Connection | Yes | The
HTTP Connector resource describes the characteristics of the connection used to receive incoming HTTP requests.
For more information about specifying shared resources, see HTTP Connector . |
Context Path | 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. In a Send HTTP POST request where a Path Spec is not provided, add a forward slash (/) after the Context Path (for example: http://<host>:<port>/<contextPath>/). If you do not add the forward slash, the POST request is redirected as a GET request for the resource at /<context_path>. In a Send HTTP POST request where a Path Spec is provided no forward slash (/) is required (for example: http://<host>:<port>/<contextPath>/<pathSpec>). |
Path Spec | Yes | If specified, it is added as a prefix of a URL of the form http://hostname.com/contextPath/pathSpec. |
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. This field is present only when the Output Style is String. |
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. Use the and buttons to the right of the parameter table to add and remove parameters. 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. |
Advanced
The Advanced tab has the following fields.
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:
name=John%20Smith&address=500%201%2F2%20Main%20Street
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.
Output Editor
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. For more information about the fields and content of the header of an HTTP request, see the HTTP specification at 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 at w3.org.
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 at w3.org.
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.
For more information about this header field, see the HTTP specification at w3.org. |
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 at w3.org. |
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. For more information about when the message body is URL encoded, see Special Characters in HTTP Requests. |
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 | If you want to receive more than one cookie, set the cardinality for this field to repeating (*).
For more information about this field, see the HTTP specification at w3.org. |
Pragma | string | This field is used to include implementation-specific directives that might apply to the receiver.
For more information about this field, see the HTTP specification at w3.org. |
Conversations
You can initiate the conversation here. Click the Add New Conversation button to initiate multiple conversations.
For more information about conversations, see TIBCO ActiveMatrix BusinessWorks™ Application Development guide.Output
The following is the output for the activity.
Output Item | Datatype | Description |
---|---|---|
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 or FileName | 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
General tab.
The content of this element is PostData if the Output Style field selected is of type String, and the element is BinaryContent if the Output Style field selected is of type Binary. For more information, see Special Characters in HTTP Requests. If the Write to File field is selected on the Advanced tab, and the incoming message exceeds the specified threshold size, the PostData field can also contain the file name of the file containing the message. |
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. |
Headers | complex |
The fields of the header specified on the Output Editor tab. For more information about these items, see the description of the Output Editor tab. |
Parameters | complex | The parameters for the incoming request. These parameters are configured in the
Parameters field on the
General tab.
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:
For more information about MIME headers and their syntax, see http://www.faqs.org/rfcs/rfc2045.html. Note: When the content type is specified as
"text/*" (for example,
"text/xml"), the attachment content is expected to be in
either
the
textContent input element or the file name storing the attachment is expected to be in the
fileName input element. When the content type is anything other than
"text/*", the attachment content is expected to be in
either
the
binaryContent input element or the file name storing the attachment is expected to be in the
fileName input element.
|
binaryContent | textContent | fileName | 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.