Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
PITadmin
Contributor II
Contributor II

tRESTClient Body missing

Hi,

I'm trying to POST a JSON String to a REST API using tRESTClient but get an error on the API side that says: Required request body is missing: ...

The JSON String ist correct but is not passed to the client is guess.

Do i have to set a "Query parameter", but how?

Any ideas what is wrong in the settings?

thx in advance

Stefan

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

@Stefan, Don't change the column name of tRestClient, let the schema as it is.

 

...tWriteJsonField--tXMLMap--tRestClient.

 

In the output table of tXMLMap, define two columns: body and string.

body: document type, let its value as empty.

string: rowN.jsonstring.

 

Regards

Shong

 

 

 

 

 

 

 

 

 

 

 

 

View solution in original post

4 Replies
Anonymous
Not applicable

@Stefan, Don't change the column name of tRestClient, let the schema as it is.

 

...tWriteJsonField--tXMLMap--tRestClient.

 

In the output table of tXMLMap, define two columns: body and string.

body: document type, let its value as empty.

string: rowN.jsonstring.

 

Regards

Shong

 

 

 

 

 

 

 

 

 

 

 

 

aksharma
Contributor II
Contributor II

I am also facing same issue on talend 7.3.1 .I tried your solution but it is not working

 

Error message

tXMLMap_1_TXMLMAP_OUT row28.body can't be empty

java.lang.RuntimeException: row28.body can't be empty

 

0693p00000ADtcDAAT.png

 

 

 

RVeitch_84
Creator
Creator

Did you find a solution to your issue, as I'm faced with a simialr issue, I not getting the same error as you, I think my issue is just a formating issue?

Payload: {"errors": [{"code": "BAD_REQUEST","detail": "Must provide at least 1 location_id.","field": "location_ids","category": "INVALID_REQUEST_ERROR"}]}

 

 

I'm trying to post a very basic JSON data, to the body of a tRestClient?

 

0695b00000F9UBCAA3.jpg 

0695b00000F9UAxAAN.jpg0695b00000F9UB7AAN.jpg 

Here's what my post is expexcting for a JSON format?

0695b00000F9UC5AAN.jpg 

 

 

 

praneeths
Contributor II
Contributor II

@RVeitch_84 I am also trying the same approach, I am getting errors, can you please help me?