Example 1: Configuring the REST step

In the REST step, John configures the URL and the HTTP POST method to use to invoke the REST web service.

Procedure

  1. In the outline, click the REST step.
  2. On the General page, select POST from the HTTP method list.
  3. In the URL field, specify a parameter for the URL string:
    1. Click Insert Parameter.
    2. In the Insert Parameter window, select the restServer job parameter.
    3. Click OK to add the parameter to the URL.
    4. Repeat steps a to c to enter the restServerPort job parameter to the URL.
    5. Enter the rest of the URL manually: http://#restServer#:#restServerPort#/jackson/pojo/person/collectionofcollection
  4. On the Request page, specify information about the request body of the REST web service:
    1. Select the Load the outgoing body from check box.
    2. From the Content type list, select application/json.
    3. From the Encoding list, select UTF-8.
    4. Select the A file whose path is set on the Mappings page as bodyFilePath check box.
    The bodyFilePath node is created on the Mappings page. You will map the bodyFilePath node to the source file path that contains the request body.
  5. On the Response page, specify information about the response body of the REST web service:
    1. Select the Pass the received body to check box.
    2. Select the A text node named body in the Output schema option.
    3. From the Content type list, select application/json.
  6. On the Mappings page, map the bodyFilePath node to the constant value '#Directory#/inputHTTP.json' , which specifies the path of the text file that contains the request body.
    Note: Test Assembly feature is not enabled for the REST step in the Designer client. So, you can not run the assembly in design mode if there is a REST step in the assembly.