Five Stars

tRestRequest JSON POST not working

I'm trying to POST a simple JSON object to tRestRequest and i'm not able to get those JSON fields in the service.

 

It is very very simple rest call, not sure why it is not working.

 

I was trying to see some examples all are using tXMLMap, i dont know why. No simple examples using JSON post call.

 

Please find the attached images.

 

I'm using Postman to call my rest service, the rest service is getting called, but it is not able to convert / pass the JSON content to next stage.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Seventeen Stars

Re: tRestRequest JSON POST not working

The result of the tRESTRequest component is NOT a parsed json-attribute, instead the component returns the json document it self.

You expect in your job to get the json attributes but this does not work. You need to send the request payload (use the String content) to a tExtractFieldJSON component to parse the json.

3 REPLIES
Seven Stars

Re: tRestRequest JSON POST not working

No images are shown. Can you upload the job again so someone can help?
Five Stars

Re: tRestRequest JSON POST not working

are you not able to see the attachments? because i can.

 

If not , could you please let me know is there any Talend community help page showing the example of such a simple tRestRequest component in working stage?

 

If i write a simple web service call using Spring boot it will not take more than five minutes to make it working... but i'm trying this for more than a day.

Seventeen Stars

Re: tRestRequest JSON POST not working

The result of the tRESTRequest component is NOT a parsed json-attribute, instead the component returns the json document it self.

You expect in your job to get the json attributes but this does not work. You need to send the request payload (use the String content) to a tExtractFieldJSON component to parse the json.