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...

  1. Drag a tRESTClient component onto the canvas.
  2. Set the URL to http://maps.googleapis.com the Relative Path to "maps/api/geocode/xml".
  3. Add two Query Parameters "address" with a value of "Trafalgar Square" and "sensor" with a value of "false".
  4. Your tRestClient should look like the one below:
    How to do it...
  5. 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.