Issue In Restful Service

Seven Stars

Issue In Restful Service

Hi,

 

I am trying to access results from restful service. Here is my design

 

tRestClient_1 > tExtractJsonFields_1 > tLogRow_1

 

My JSON in response in following format

 

{"staff":[{"FirstName":"Tarunjit","LastName":"Chhatwal"},{"FirstName":"Sachin","LastName":"Tomar"}]}

 

If is use following job design then I could json in console. It means my restful service is working fine.

 

tRestClient_1 > tLogRow_1

 

When I add tExtractJsonFields as mentioned above then json doesn’t show in console. Please find attached component properties for > tExtractJsonFields_1.

 

Can someone please help me on this?

 

 


Accepted Solutions
Highlighted
Employee

Re: Issue In Restful Service

Hi Tarunjit,

 

If you have't already, go into tRestClient in the Component->Advanced Settings tab, and uncheck the option "Convert Response To DOM Document".  This will allow the response to show up in the Response Schema's "string" field.

 

Also, make sure you haven't changed the default built-in schema in tRestClient.  Your response schema should have the original fields 'statusCode', 'body', and 'string'.  If a different schema has been pushed into tRestClient, you may want to drop a new copy of the component and configure that one.

 

I hope that helps.


All Replies
Seven Stars

Re: Issue In Restful Service

In continuation to my previous comment. Please find attached schema.

Highlighted
Employee

Re: Issue In Restful Service

Hi Tarunjit,

 

If you have't already, go into tRestClient in the Component->Advanced Settings tab, and uncheck the option "Convert Response To DOM Document".  This will allow the response to show up in the Response Schema's "string" field.

 

Also, make sure you haven't changed the default built-in schema in tRestClient.  Your response schema should have the original fields 'statusCode', 'body', and 'string'.  If a different schema has been pushed into tRestClient, you may want to drop a new copy of the component and configure that one.

 

I hope that helps.

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

Downloads and Trials

Test drive Talend's enterprise products.

Downloads