Calling a RESTful web service
This recipe shows how a RESTful web service can be called from Talend. The REST service we will be using is a Google maps service, so you will need to be connected to the Internet to perform this recipe.
Getting ready
Open the job jo_cook_ch09_0070_consumeRestService
.
How to do it...
- Drag a
tRESTClient
component onto the canvas. - Set the URL to http://maps.googleapis.com the Relative Path to
"maps/api/geocode/xml"
. - Add two Query Parameters
"address"
with a value of"Trafalgar Square"
and"sensor"
with a value of"false"
. - Your
tRestClient
should look like the one below: - Link a
tLogRow
component to the response and error flows ...
Get Talend Open Studio Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.