Populating Document Template Values

To test a handler for a REST-based service operation you must populate the document template values in the Handler Tester utility.

The Handler Tester page features a Populate Document Template link that provides access to the Populate Document Template page (IB_DOCTPLT_SEC). Use the Document Template page to select a URI index and provide values for the URI template to which the index is assigned.

Image: Populate Document Template page

This example illustrates the fields and controls on the Populate Document Template page.

Populate Document Template page

Use the Populate Document Template page to enter test values for each URI template.

The previous example shows the QE_WeatherTemplate document template. The URI Template Index drop-down list shows that the select URI index is 1. The URI Template field shows the URI template defined in the document template for that index, weather/{state}/{city}?forecast={day}.

You must set values for the elements in the URI template that have variable values. Elements with variable values are contained within braces ( { } ) in the URI template. In the previous example the elements with variable values in the URI template are state, city,and day.

To set a value for a variable, click the hyperlinked variable name. The Set Value page (IB_LSTESTER_SEC) appears.

Image: Set Value page

This example illustrates the fields and controls on the Set Value page.

Set Value page

In this example the state link is clicked on the Populate Document Template page. In the example, you populate the Long field. The value(s) to populate on the page vary, depending on the data type of the element.

Image: Populate Document Template

The following example shows the Set Value page populated with all values for elements with variables for the URI template with the index of 1.

Populate Document Template page

To populate document template values:

  1. Access the Populate Document Template page (PeopleTools > Integration Broker > Service Utilities > Handler Tester and click the Populate Document Template link).

  2. Set values for URI template elements that have variable values:

    1. From the URI Template Index drop-down list, select the URI index that corresponds to the URI template to populate.

      The string of the URI template for the index appears under the drop-down list box.

    2. Click the element name for which to set value(s).

      The Set Value page appears.

    3. Enter the test value(s) for the data type of the element.

  3. Repeat step 2 for each URI template index in the document template.

  4. Click the Return button.

    The Handler Tester page appears and you can run the test.

    See Running Handler Tests and Viewing Test Results.