[User] Problem with Thai characters in REST BC
sevensinsco at gmail.com
Wed Dec 20 08:59:37 GMT 2017
Don't know if this will be a good solution for you, but you can write java
pojo encoder by yourself and add it to you project as external library. For
example I once expirienced same issue when I tried to read cyrillic
characters from xml, they were basicly in cp1251 encoding, so I have to get
string from bpel and transfer it to pojo method, then in java pojo method I
got this string bytes in cp1251(For Thai characters not sure but it can be
ISO-8859-1), then I encoded those bytes to UTF-8 and then I returned string
with UTF-8 characters.
Another solution is you can also write external pojo jbi module, which will
send post request and return answer if needed, in this case you have to
write custom wsdl and xsd scheme so you can invoke pojo module through your
bpel process. All manipulation with characters will be inside your pojo
module. Hope this helps. Excuse my english.
OpenESB Community Forum mailing list wrote
> Hello All,
> I am trying a simple REST BC project where request and response is exact
> same (Echo). While testing this project with I am facing the issue with
> encoding. In request XML I have Thai characters and ESB is not able to
> encode it properly which result in incomplete response message. Below is
> example ,
> Request XML :
> <DRIVER FIRST_NAME="วารินทร์" LAST_NAME="อาดคเดช"
> DRIVER_XID="3401900131031" DATE_OF_BIRTH="1076-11-16 08:00:00.0">
> Response XML :
> <?xml version="1.0" encoding="UTF-8"?>
> <DRIVER DATE_OF_BIRTH="1076-11-16 08:00:00.0" DRIVER_XID="3401900131031"
> FIRST_NAME="วารินทร์" LAST_NAME="อาดคเดช">
> I have also setup JVM parameter in OpenESB startup file as
> -Dfile.encoding=UTF-8 but still it doesn't resolve the problem.
> Did anyone face this issue ?
> Note: With English characters the project is working fine.
> Sent from: http://openesb-community-forum.794670.n2.nabble.com/
Sent from: http://openesb-community-forum.794670.n2.nabble.com/
More information about the User