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