Procedure
-
From the General view, select the
Connectors tab and click the
Add... button, and then in the connector wizard
select Talend > Talend ESB REST Client and then click Next.
-
Give the connector a name, UpdateUserInfo for example,
and click Next.
-
Configure the REST Service.
- Fill the Endpoint URL field with the URL of the REST Service implement by the Job mentioned above, http://localhost:8045/users in this example.
-
Fill in the Relative Path field with
/post/${id}/${first_name}/${last_name}.
This allows you to enter the information you want to update to the server end via the resource path when the process is executed.
- From the Method list, select POST, to update the specified information to the remote server through the called REST service.
- From the Accept Type list, select ANY, to transform any type of response message into a string.
-
Expand the Request node, select
XML from the Content
Type list, and fill the Request
field with the request payload structure:
<id></id><first_name></first_name><last_name></last_name>
- Leave all the other parameters as they are.
The REST Service configuration page opens. -
Click Next.
The Configure TESB Feature page opens to let you configure service locator information, service activity monitoring, and business correlation. As we do not use any of these options in this example, simply click Next to proceed with connector output mapping.
- Click the Create data button to open the Add a new variable dialog box.
-
Name the variable userInfo, clear the
Auto-generate form check box, then click
Finish to close the dialog box.
-
Remove the correlation ID output mapping, which is not required in this
example, and click Finish to close connector
configuration wizard.