Limitation in JSON length when using POST in tRestClient

One Star

Limitation in JSON length when using POST in tRestClient

Hello,
I'm currently running v5.6.0 of TOS for Data Integration, and it seems like I'm running into issues passing JSON strings with around 4500-5000 characters via POST in tRESTClient. With smaller strings, it passes the data just fine. However, with the larger strings, I get null on the service side every time. I thought this might have to do with the field's length in the schema, but I tried increasing the value and removing it all together with no joy.
For testing purposes, I have created a test job consisting of a tFixedFlowInput connected tp the tRESTClient. In the tFixedFlowInput component, I'm passing the json string manually with all the quotes delimited. In the tRestClient component, I'm passing a token via query parameter.
Any help would be greatly appreciated. Thanks in advance!
Community Manager

Re: Limitation in JSON length when using POST in tRestClient

Hi
Do you use Talend ESB product to build the rest web service or it is hosted by other provider?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Limitation in JSON length when using POST in tRestClient

Hi, Shong - the service is built and hosted externally.
Community Manager

Re: Limitation in JSON length when using POST in tRestClient

Hi 
I am not sure the problem is caused by tRestClient component, I have built a restful webservice with Talend ESB, called the web service and pass a string more than 6500 characters to it, it works fine.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Limitation in JSON length when using POST in tRestClient

Shong, could you please post screenshots of your job and tRestClient settings? Thanks.
Community Manager

Re: Limitation in JSON length when using POST in tRestClient

Hi
I just use a tRowGenerator to generate a string with 6500 characters and pass it to the restful webservice, I run the job and I can see the webservice server receive the string and process it, return the correct the result.
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Limitation in JSON length when using POST in tRestClient

Shong - would it make a difference using JSON as the content type of the tRestClient?
Community Manager

Re: Limitation in JSON length when using POST in tRestClient

I change the content type from XML to json, it also works. but I did't try to send a json string as you did, can you email me your json string for testing?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Community Manager

Re: Limitation in JSON length when using POST in tRestClient

Hi
I have tested your json string and it also works for my restful webservice, I have sent the demo jobs to you.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business