Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Encoding of parameters of tRESTRequest in Runtime

Hi experts,
we have modeled a REST service with tRESTRequest / tRESTREsponse that takes parameters with German umlauts in JSON format. We extract them with tExtractJSONFields, do some work with them and create a JSON response with the help of tWriteJSONField.
All places where you can configure the encoding are set to UTF-8 in my opinion and running the service in Talend Studio works perfect.
Unfortunately the service deployed in the Talend Runtime shows another behavior i.e. the umlauts are not correctly recognized and processed.
What is the reason for this and how can we configure our service in the runtime to behave like in Studio?
Many thanks + best regards
Rabe
Labels (6)
6 Replies
Anonymous
Not applicable
Author

Hi Rabe 
How do you call the web service? using talend component or other tool?

Regards
Shong
Anonymous
Not applicable
Author

Hi Shong,
I'm using SoapUI. But it depends only on the fact whether I'm starting / using the service(s) in Studio or deploy them to the Runtime, i.e. I'm only changing the URL in SoapUI and with Studio the umlauts are correct and with Runtime not.
Do you have an idea?
Regards
Rabe
Anonymous
Not applicable
Author

Hi Rabe
It is column name or data contains German umlauts? Can you try to use tRestClient to call the web service and see if the problem is the same?

Regards
Shong
Anonymous
Not applicable
Author

Hi Shong,

okay, I think I have to explain the problem more detailed.

The REST call I'm talking about is a HTTP POST with an object with umlauts as payload e.g. {"customer_id":"4711","customer_name":"Märkel"}.

This object will be parsed by tExtractJSONFields, converted into another structure, enriched with additional information (which does not matter here) and then stored by a call of another (external) service.

And the effect is that if I run this job in Talend Studio "Märkel" gets properly stored (and logged by tLogRow in the job!), if I run it in the Talend runtime the name is corrupt (i.e. looks like "Mürkel").
Any idea?
Best regards
Rabe
Anonymous
Not applicable
Author

Hi Shong,
no hint for me?
We have found and tested a solution in the meantime but for me it's more a workaround than a solution.
You can can configure the Runtime by doing the setting -Dfile.encoding=UTF-8 for the Java environment. Then it works.
Unfortunately this is a global setting, so if you want to deploy two services with different requirements concerning this setting you will come into troubles.
Maybe there is still another way to solve this issue?
Best regards
Rainer
sanjeevini
Contributor III
Contributor III

could you please provide more detail where excatly this value has to be set- -Dfile.encoding=UTF-8