Complete the following steps to create the transformation:
In the Developer tool mapping editor, scroll down in the mapping palette to locate the REST Web Service Consumer transformation and drag it to the mapping.
The
New REST Web Service Consumer Transformation
wizard appears.
Enter a name for the transformation.
Next to
HTTP Method
, select
Get
.
When you use the Get method, you do not configure an input mapping.
Click
Next
.
The wizard displays a message that input is not applicable when using the Get method.
Click
Next
.
Select
Create as empty
.
Next to
Show
, select
Output mapping
.
The following image shows the options in the wizard:
Drag the output group from the
Method output definition
area on the left to the
Ports
area on the right.
Click
Finish
.
Navigate to the
Ports
tab of the REST Web Service Consumer transformation.
Highlight the output group.
Select
New
in the top right corner of the
Ports
tab and select
Other ports
. Check the box next to
Output XML
and click
OK
.
The Output XML port is nested under the output group as shown in the following image:
Navigate to the
Advanced
tab.
To connect to the web service, configure the URL property with the base URL.
If you use an HTTP connection, enter the connection name for the property
Connection
. The HTTP Connection overrides the base URL configured for the property URL.
Enter the format of the request and response messages. Configure the
Input Format
and
Output Format
with XML or JSON.
The following image shows where you configure the advanced properties:
Run Data Viewer or run the mapping.
The following image shows an example of a response in the Output XML port: