Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a problem with the tRESTClient component.
I'm using Talend Studio : Talend Cloud Data Management Platform | Version 8 | Update R2024-07
First of all in my job, I generate an XML File by a tXMLMap with the configuration you can see with the different screenshots.
Then I call this file with a tFileInputRaw that I connect to a tRESTClient. Two outputs : Response and Error.
I get this error : "status":400,"error":"Bad Request","path":"/api/import-all-of"
But when I take the generated file to test it with Postman, everythong's fine. I get the same error when I delete or modify the XML structure.
So I think there's a problem with the encoding of the file while the tRESTClient read the file or something to do in the HTTP Headers. But I can't find anything on Internet or the link Talend Community are closed.
Has someone found this kind of problem before?
Thanks a lot,
Maxime.
Hello,
During my tests, I modified the tRESTClient schema and it was a bad idea.
Here is the support message:
The issue is that you have overwritten the tRESTClient input schemas.
tRESTClient schemas shouldn't be modified. So you need to recreat tRESTClient with its original schemas.
What you can do then is link tFileInputRaw with tRESTClient via a tConvertType which map tFileInputRaw's "content" schema with tRESTClient's "string" schema (as you are reading the file as string).
Now, my problem is resolved.
tRestClient has two fields: body and string; you have to fill one of them. I don't believe you can pass to tRestClient directly a file.
I suggest to pass to tRestClient the content of the file in string field.
Hello,
During my tests, I modified the tRESTClient schema and it was a bad idea.
Here is the support message:
The issue is that you have overwritten the tRESTClient input schemas.
tRESTClient schemas shouldn't be modified. So you need to recreat tRESTClient with its original schemas.
What you can do then is link tFileInputRaw with tRESTClient via a tConvertType which map tFileInputRaw's "content" schema with tRESTClient's "string" schema (as you are reading the file as string).
Now, my problem is resolved.