Search Results

Send HTTP Response

Send HTTP Response is a synchronous activity that sends a response to a previously received HTTP request. The default status line returned by this activity is "200 OK".

General

Note: When configuring an HTTP activity, configuring an HTTPConnector Shared Resource as the value for a module property is not supported. Configure a literal value instead.

The General tab has the following fields.

Field Description
Name The name to be displayed as the label for the activity in the process.
Reply For The HTTP Receiver process starter activity that received the request. This is a list of available activities that can receive HTTP requests.
Flush Response You can specify whether the response is to be flushed after each Send HTTP Response activity.

By default, this property is not selected. This check box is useful when there are a large number of Send HTTP Response activities in a job. In such cases, the Close Connection check box is selected in the last activity to indicate the response is complete.

However, selecting the Flush Response check box overrides this behavior and causes the response to be flushed after each Send HTTP Response activity.

Close Connection Specifies that this activity contains the last part of an HTTP response. This field is used when you have more than one Send HTTP Response activities in a process and each activity sends a part of the response to the client. All Send HTTP Response activities in a process should have this check box clear, except the last Send HTTP Response activity. Select this check box for the last Send HTTP Response activity to indicate the response is complete.

Select this check box, if the entire response is sent by only one Send HTTP Response activity in the process.

Description

Provide a short description for the activity.

Input Editor

Input Editor tab describes the data structure for the headers of the HTTP response. You can use the default structure, or you can alter the structure, if the outgoing response 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 a HTTP request. You can obtain this specification at www.w3.org.

The following are the default header fields.

Header Datatype Description
StatusLine string This field is the first line of a response message. This consists of the protocol version, a numeric status code, and the text phrase explaining the status code.

See the HTTP specification for more information about status codes in HTTP responses.

Content-Type string This field indicates the media type of the entity body sent to the receiver. The media types are described in the HTTP specification. An example of the media type is: text/html; charset=ISO-8850-4.

By default this item is set to text or html. If you are using this activity and the Retrieve Resources activity to retrieve a WSDL file, you should set the type to text or xml when specifying values on the Input tab.

Set-Cookie string See the HTTP specification for more information about this field.
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.
Location string This field is used to redirect the receiver to a location other than the RequestURI for the completion of the request or for identifying a new resource.

Input

The following is the input for the activity.

Input Item Datatype Description
binaryContent binary The binary content of the response to the request.
asciiContent string The ASCII content of the response to the request.
Headers complex The fields of the header specified on the Input Editor tab. See the description of the Input Editor tab for more information about these items.
Note: Only the first Send HTTP Response activity in the process can set the Headers element. If your process contains multiple Send HTTP Response activities, the headers are set by the first activity and this element is ignored for all subsequent activities.
DynamicHeaders complex The dynamic header is an additional header parameter to add runtime headers to the outgoing HTTP messages. This element is specified on the Input tab. DynamicHeaders consists of the following information:
  • Name: the name of the header
  • Value: the value of the header

You can consider the following overriding conditions:

  • Overrides the value of the HeaderName with the value found in the DynamicHeaders, if it is a non-repeating header. If more than one occurrence of this header is found under DynamicHeaders, it throws the following exception: The header [ headerName ] is defined as non-Repeating Header in Input Editor. This header cannot have multiple occurences in DynamicHeaders.
  • If it is a repeating element, add the respective name value pairs under DynamicHeaders. This is added to the existing list maintained for this element.
  • For a repeating element, if the new header name is not found under the "Headers" section in TIBCO Business Studio™, the following is added into the HTTP headers.
    • Shows only one value, if found once in the DynamicHeaders.
    • Shows an array of values, if found repeating in DynamicHeaders.
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. mimeHeaders can contain the following information:
  • content-disposition: to suggest a filename for an attachment, use "*;filename=<filename>" in this element.
    Note: The HTTP servers may alter or ignore the suggested name.
  • content-type
  • content-transfer-encoding
  • content-id
  • any element

See http://www.faqs.org/rfcs/rfc2045.html for more information about MIME headers and their syntax.

Note: When the content type is specified as "text/*" (for example, "text/xml"), the attachment content is either the textContent input element or the file name storing the attachment is in the fileName input element. When the content type is anything other than "text/*", the attachment content is in either the binaryContent input element or the file name storing the attachment is in the fileName input element.
binaryContent | choice This element is the content of the attachment when the attachment is binary data.

Fault

The Fault tab lists the possible exceptions thrown by this activity.

Fault Thrown When..
HttpCommunicationException An HTTP exception occurred when sending the response.