How to use the tRest component output

One Star

How to use the tRest component output

Hi!
I'm using the 'tRest' component to perform a HTTP Post. When that request succeeds, I receive information in XML format. How can I access that information in the next component? My next step is to convert that information in a CSV format. And if I want to save the information I get from the HTTP Post into a XML file, how can I do that?
Thanks.
Community Manager

Re: How to use the tRest component output

Hi
You can use a tExtractXMLField to extract the value from the response of tRest in XML format.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: How to use the tRest component output

Should I be able to use the response of the tRest component (the String called 'Body') in the 'tExtractXMLField'? I can't access it from any component...
Thanks
Community Manager

Re: How to use the tRest component output

Yes, you can extract the value from the body filed on tExtractXMLField, the job looks like:
tRest--main--tExtractXMLField--main--tAdvancedFileOutputXML
If you can't still get it work, please show us the content of the response of tRest component, what's the response looks like after you call the web service with tRest?
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now