HTTP Send Response activity

The HTTP Send Response activity sends a reply back to the sender of an HTTP request.

The following figure shows the HTTP Send Response activity sending a reply back to the sender of an HTTP request.
Figure 1.
The HTTP Send Response activity must be used in conjunction with an HTTP Receive Request activity in an orchestration as shown in the preceding figure. If you add a HTTP Send Response activity to orchestration, you must select the Requires a Reply check box in the Configure task of the HTTP Receive Request activity.

By Default, the HTTP connector uses ISO-8859-1 character encoding in place of UTF-8. You can change this character encoding value by using any one of the methods given in Character encoding errors when using the HTTP connector.

By default, compression is not enabled for the HTTP Send Response activity. For more information, see Compression/Decompression with the HTTP Send Response activity.

Adding an HTTP Send Response activity to the orchestration

  1. Create or open an orchestration. A graphical representation of the orchestration is displayed.
  2. Select the Activities tab and expand the HTTP folder.
  3. Drag the Send Response activity onto the orchestration.
  4. Select the activity. The Checklist is displayed with the Configure task active in the properties pane. The properties pane is located beneath the graphical representation of the orchestration.

Configuring the activity

  1. Select the Configure task from the Checklist. The Configure pane is displayed.
  2. Configure all the fields and check boxes in this pane as described in the following table:
    Table 1.
    Field Description
    To Specifies the HTTP Receive Request activity associated with this HTTP Send Response activity. During run time, the associated HTTP Receive Request activity receives the request from the client and the HTTP Send Response activity sends the response back to the client.
    Note: This field is populated only if you select the Requires a Reply check box in the Configure task of the HTTP Receive Request activity.
    Of Type Specifies the message type of the HTTP response - either Text or Binary.
    Use Compression/Decompression Specifies if compression/decompression is turned on or off at the activity level. By default, the Use Compression/Decompression check box is clear and compression/decompression is disabled for this activity. Select the Use Compression/Decompression check box to enable compression/decompression for this activity. For more information, see Compression/Decompression with the HTTP Invoke/Get/Post/Head/Put/Delete Request activity.

Specifying the response headers

  1. Select the Response Headers task from the Checklist. The Response Headers pane is displayed. A Custom Headers table is displayed at the top, a Include pre-defined standard headers checkbox is displayed in the middle and a Standard Headers table is displayed at the bottom.
  2. Click the Add button to add a header to the Custom Headers table. Click on the new entry to enter a header name or select a header name from the drop down list. If the header name is a pre-defined header name, a description is displayed in the Description column, otherwise enter your own description for your headers.
  3. To use the pre-defined standard headers, check the Include pre-defined standard headers checkbox. Note that duplicate header names are not allowed (ignoring the case difference) and you are prompted to remove any duplicate headers in the Custom Headers table. The selected HTTP headers are displayed under /httpheaders in Map Input.

Mapping the input into the activity

  1. Select the Map Inputs task in the Checklist. The body input parameter is displayed in the To Activity pane of the Map Inputs task. The body input parameter is mandatory and at least one variable must be mapped to it. The body input parameter contains the body of the HTTP response message sent back to the client.
  2. To view the optional input parameter in the To Activity pane of the Map Inputs pane, select Map > Show Optional Parameters from the toolbar menu or right-click in the To Activity pane and select the Show Optional Parameters option. If the Map > Show Optional Parameters option is not selectable in the toolbar menu, click on a node in the Map Inputs pane to make this option active. The httpheaders input parameter is displayed.
    The following table defines the nodes of the optional httpheaders input parameter:
    Table 2.
    Nodes of the httpheaders Input Parameter Description
    httpheaders/uri Specifies the resource path, for example: /myPath.
    httpheaders/method Specifies the type of HTTP response, for example: POST.
    httpheaders/Via Contains the time taken by each of the activities present between HTTP Receive and HTTP Send Response. For example, FTP Put(uploadfile):50ms;Send Email(postinfo):30ms;. There are two activities, FTP Put and Send Email, that are present between HTTP Receive and HTTP Send Response activities. So, when a job is processed, the Via header response will contain this value. It means that FTP Put activity takes 50 milliseconds and the Send Email activity takes 30 milliseconds, respectively, to complete the activity.
    httpheaders/<configured_header_name> If you configured at least one response header in Response Headers step, each is displayed here. <configured_header_name> is replaced with the actual header name you selected or entered.
    httpheaders/otherHeaders/headerItem Specifies an element that contains a set of HTTP header parameters as name/value pairs for the HTTP response. Multiple HTTP parameters can be specified in the HTTP response, so this is a  recurring node.
    httpheaders/otherHeaders/headerItem/name Specifies the name of the HTTP parameter.
    httpheaders/otherHeaders/headerItem/value Specifies the value of the HTTP parameter.
  3. Create a map between the orchestration variable or variables and the input parameter or parameters. See Creating a map for general instructions on mapping

Using certificates with Microsoft Internet Explorer

If you have selected the HTTPS security option in the HTTP endpoint, note that Microsoft Internet Explorer does not recognize a modified certificate and caches the SSL state. If you modify certificates, you must clear the SSL state. To clear the SSL state in Microsoft Internet Explorer:
  1. From the Microsoft Internet Explorer toolbar menu, select Tools > Internet Options.... The Internet Options pane is displayed.
  2. Click the Content tab.
  3. In the Certificates section, click Clear SSL State. The SSL Cache Cleared Successfully dialog box is displayed.
  4. Click OK and click OK.



Feedback | Notices


Timestamp icon Last updated: Monday, 29 July 2019


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/http_send_response_activity.html