File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Web-Services and Character Set(UTF-8,ISO-8859-1) encoding-decoding Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web-Services and Character Set(UTF-8,ISO-8859-1) encoding-decoding Issue" Watch "Web-Services and Character Set(UTF-8,ISO-8859-1) encoding-decoding Issue" New topic
Author

Web-Services and Character Set(UTF-8,ISO-8859-1) encoding-decoding Issue

Chintan B Shah
Ranch Hand

Joined: Sep 23, 2008
Posts: 83
Hi Folks,

I will try to make this easy.

My architecture is like this

Remedy server-->Remedy Midtier-->Remedy Web Service-->My web-service client(JAX-WS)-->data gets stored in "String".

I am working with Remedy application that has data stored in French (with all special latin characters).

e.g. Equinix vous informe d’un nouvel incident réseau à SV. Merci de vérifier vos courriels ou notre portail client pour de plus amples informations.

Now, I am using Remedy web-service to retrieve this data(Remedy WSDL supports UTF-8) and in SOAP Response it looks like this

---[HTTP response - http://<servername>; - 200]---
Transfer-encoding: chunked
null: HTTP/1.1 200 OK
Content-type: text/xml;charset=utf-8
Server: Apache-Coyote/1.1
Date: Wed, 13 Jun 2012 21:17:53 GMT
Set-cookie: JSESSIONID=A94D284C2F31FDDC77880361AB4BEC4A; Path=/arsys
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns0:OpGetResponse xmlns:ns0="urn:RemedyECPIntegration" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns0:Arguement_Builder>
Equinix vous informe d’un nouvel incident réseau à SV. Merci de vérifier vos courriels ou notre portail client pour de plus amples informations.
</ns0:Arguement_Builder>
</ns0:OpGetResponse></soapenv:Body></soapenv:Envelope>--------------------

I am using JAX-WS Library to write my web-service client.

When this data gets stored in "String" since that is what return parameter data-type is, it looks like below
Equinix vous informe dâun nouvel incident réseau à SV. Merci de vérifier vos courriels ou notre portail client pour de plus amples informations.


Now, the text that I need in "String" is the original text that is stored in Remedy which is
Equinix vous informe d’un nouvel incident réseau à SV. Merci de vérifier vos courriels ou notre portail client pour de plus amples informations.

How can I achieve it?

Any help is greatly appreciated.

P.S.: I have gone through various links about using CharSet encoding/decoding and none of it is working.

Thanks
Chintan.


SCJA 1.0
Chintan B Shah
Ranch Hand

Joined: Sep 23, 2008
Posts: 83
Hi folks,

Problem was with the encoding of my terminal client(Putty).

Just for your info, encoding can be changed under "Change Settings-->Windows-->Translation" in Putty.

My co-worker pointed it out .

Thanks
Chintan.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Web-Services and Character Set(UTF-8,ISO-8859-1) encoding-decoding Issue