Reputation:
I'm trying to call trestClient component in talend. But trestClient is failing with error message of "javax.ws.rs.WebApplicationException: HTTP 415 Unsupported Media Type".
i'm trying to pass json request to trestclient component. Job
From textracJson component ,extracting recordiD and json object to pass to trestClient component.
Upvotes: 0
Views: 745
Reputation: 452
The issue is caused by the tExtractJSONField component. You want to pass JSON into your tRestClient component, but tExtractJSON reads your JSON from the previous tWriteJSONField component converts it back to a Talend data flow. Remove this component and connect tWriteJSONField to tRestClient directly and connect your schema accordingly (check the input schema in tRestClient to see they're connected and have the right data types). To ensure this, best is to use a tMap with output string
and map the JSON as a string to that column.
Upvotes: 1