HTTP Get Request activity

The HTTP Get Request activity sends a Get Request to the specified location (the HTTP endpoint) and receives a HTTP response back from that location.

Adding an HTTP Get Request 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 Get Request activity onto the orchestration.
  4. Select the activity. The Checklist is displayed.

Creating, selecting, or editing an HTTP endpoint

  1. Click Pick Endpoint task from the Checklist and choose from one of the following actions:
    • Select an existing endpoint:
      1. Select Browse. The Project Explorer is displayed.
      2. Select an existing endpoint and click OK. Skip to the "Configure the activity" procedure.
    • Select an existing endpoint and edit the endpoint:
      1. Select Browse. The Project Explorer is displayed.
      2. Select an existing endpoint and click OK.
      3. Click Edit. The Edit Endpoint pane is displayed.
    • Create a new endpoint: Select New. The Create Endpoint pane is displayed.
  2. Create or edit a HTTP endpoint. See Creating or editing an HTTP endpoint.

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 or Check Box Description
    URL (Path after Hostname) Specifies the resource path that the Get Request activity sends the request to, for example: /mypath. The string you specify in this field must exclude the string: http://, the hostname, and the port number of the Integration Appliance. The full URL is automatically constructed from the host name of the Integration Appliance, the port number specified in the HTTP endpoint and the path specified in this field. For example, if the full URL that the Get Request activity sends the request to is http://myAR:myPort/myPath, in this field, you only need to specify the string: /myPath. The specified path must be unique for the Get Request activities that are deployed at the same time on the same Integration Appliance using the same port.

    To make use of path parameters and query parameters, enter a URL in this format: url/{path}?name1=value1&name2=value2. This allows you to map a string value to the "{path}" parameter and to specify query parameter names: name1 and name2 in this example. If you choose to declare multiple "{path}" parameters, it is recommended that each parameter has a unique name. Parameters with the same name are represented by only one node in the map. The path parameters will be displayed under /httpheaders/pathParameters in Map Input. And query parameters will be displayed under /httpheaders/queryParameters in Map Input.

    Note: In the URL, any value you assign to a query parameter is not passed to the mapper. To assign a value to the query parameter, either explicitly map a value to the query parameter in the mapper, or define a default value.
    Where Request Message is Of Type Specifies the message type of the HTTP response - either Text or Binary.
    Where Reply Message is Of Type Specifies the message type of the HTTP reply - either Text or Binary..
    Stop Processing the Orchestration Job

    or

    Continue Processing and Return the HTTP Error code

    Specifies the run time behavior of the activity if an error response is returned from the HTTP Server:
    • Stop Processing the Orchestration Job - Select this option if the orchestration job should stop processing when an error response is received from the HTTP Server during run time. The orchestration stops processing in the HTTP Get Request activity and the activities after the HTTP Get Request activity in the orchestration are not processed and a failed exception is thrown.
    • Continue Processing and Return the HTTP Error code - Select this option if the orchestration job should continue processing when an error response is received from the HTTP Server during run time. The orchestration job should continue processing activities after the HTTP Get Request activity in the orchestration and the error response code and the error response message is returned in the responsecode and responsemessage output parameters, respectively.
    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 request headers

  1. Select the Request Headers task from the Checklist. The Request 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. Duplicate header names are not allowed (ignoring the case difference) and if duplicated headers appear in the Custom Headers table, you are prompted to remove them. The selected HTTP headers are displayed under /httpheaders in Map Input.

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. Duplicate header names are not allowed (ignoring the case difference) and if duplicated headers appear in the Custom Headers table, you are prompted to remove them. The selected HTTP headers are displayed under /httpheaders in Map Output.

Specifying the retry options

  1. Select the Retry task from the Checklist. The Retry pane is displayed.
  2. Configure the retry options to connect to an HTTP Server. The following table defines the retry options for connecting to an HTTP Server:
    Field Description
    Retry  
    1) Wait ___ seconds between each retry. Specifies the amount of time (in seconds) that the Integration Appliance waits before trying to establish a connection to the HTTP server.
    2) Try to connect ___ times before failing. Specifies the retry count - the maximum number of times the Integration Appliance attempts to establish a connection to the HTTP Server before issuing an error and stopping the processing of the current orchestration job. If you deploy an orchestration that contains an HTTP Get Request activity and the Integration Appliance cannot connect to the specified HTTP Server, the Integration Appliance logs the connections errors as Warnings in the system and orchestration logs until the retry count value is reached. When the retry count is reached, the Integration Appliance logs an error in the system and orchestration logs and the stops processing the current orchestration job. For example, you set the retry count to 3. The first, second, and third connection errors appear in the system log as warnings. The Integration Appliance logs the fourth connection error as an error and stops processing the current orchestration job.
    3) Time out after ___ seconds when the Endpoint does not respond to a request. Specifies the amount of time in seconds before a timeout occurs between the activity making a request on an Endpoint and the time it takes the Endpoint to respond. For the HTTP Get Request activity, the activity timeout is the amount of time that the Integration Appliance waits for a response from the HTTP Server after sending a HTTP request, before the Integration Appliance issues a timeout error. An activity timeout is different from a connection timeout because an activity timeout occurs after the connection to the endpoint has been established. A connection timeout specifies the amount of time in seconds before a timeout occurs between the Integration Appliance attempting to establish a connection to the endpoint and the time it takes for the endpoint to respond to the connection request. You set the connection timeout in HTTP Endpoint tab. For more information about connection timeouts, see, Creating or Editing a Web Services Endpoint.

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 optional. The body input parameter contains the body of the HTTP response message sent back to the HTTP server.
  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 and httpConnParameter input parameters are 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/<configured_header_name> If you configured at least one request header in the Request Headers step, each is displayed here. <configured_header_name> is replaced with the actual header names you selected or entered.
    httpheaders/pathParameters If you configured path parameters in the URL in the Configure step, each is displayed here. If no path parameter is specified, this node does not display.
    httpheaders/query Parameters If you configured query parameters in the URL in the Configure step, each is displayed here. If no query parameter is specified, this node does not display.
    httpheaders/otherHeaders/headerItem Specifies an element that contains a set of HTTP header parameters as name/value pairs. 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 header parameter.
    httpheaders/otherHeaders/headerItem/value Specifies the value of the HTTP parameter.
    Note: If the Content-Length header is explicitly set using the httpheaders/otherHeaders/headerItem/name and httpheaders/otherHeaders/headerItem/value, this value is ignored during run time . This activity automatically sets the Content-Length header to the size of the body.
    The following table defines the nodes of the optional httpConnParameter input parameter. You can optionally override the settings you specified in the Pick Endpoint task of the Checklist dynamically during run time by passing in values from variables into the nodes specified in the following table. For example during run time, you can override the Host Name specified in the endpoint, by mapping a variable to the host node of the httpConnParameter input parameter. During run time, the value of the variable is the host name used to connect the HTTP server.
    Table 3.
    Nodes of the httpConnParameter Input Parameter Description Overrides what settings in the HTTP endpoint?
    timeout Specifies the amount of time in seconds before a timeout occurs.  
    host Specifies the host name or IP address of the remote HTTP server. The host node of the httpConnParameter input parameter overrides the Host Name field of the HTTP endpoint.
    port Specifies the port number of the remote HTTP server. The port node of the httpConnParameter input parameter overrides the Port field of the HTTP endpoint.
    isSecure Set this boolean equal to true to enable HTTPS - secure HTTP over SSL. Set this boolean equal to false to disable security. The isSecure node of the httpConnParameter input parameter overrides the Security option in the HTTP endpoint.
    username Specifies the user name for the account used to connect to the HTTP server. The username node of the httpConnParameter input parameter overrides the User Name field in the HTTP endpoint.
    password Specifies the password for the account used to connect to the HTTP Server. The password node of the httpConnParameter input parameter overrides the Password field in the HTTP endpoint.
  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

Mapping the output of the activity

  1. Select the Map Outputs task in the Checklist. The output parameters of the activity are displayed in the From Activity pane of the Map Outputs task as described in the following table:
    Table 4.
    Output Parameter Description
    httpheaders Specifies the header of the HTTP request.
    body Specifies the body of the HTTP request message.
    responsecode Specifies the HTTP Response Code that is returned from the HTTP Server during run time.
    responsemessage Specifies the message associated with the HTTP Response Code.
    The following table defines the nodes of the optional httpheaders output parameter.  
    Table 5.
    Nodes of the httpheaders Output Parameter Description
    httpheaders/uri Specifies the resource path of the incoming request, for example: /myPath.
    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 names you selected or entered.
    httpheaders/otherHeaders/headerItem Specifies an element that contains a set of HTTP header parameters as name/value pairs. Multiple HTTP header parameters can be specified in the HTTP request, so this is a recurring node.
    httpheaders/otherHeaders/headerItem/name Specifies the name of the HTTP header parameter.
    httpheaders/otherHeaders/headerItem/value Specifies the value of the HTTP header parameter.
  2. Create a map between the output parameter or parameters of the activity and orchestration variable or variables. 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: Wednesday, February 17, 2016


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