UTF-8 Encoding problem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

UTF-8 Encoding problem

Hamid Reza Sahlolbey
Hi;

I have problem sending Persian String over SOAP from client to server on axis2 .Response strings are correct and but when I use Persian string as my method parameters I get garbage characters on server side.

I used RPCServiceClient to call the web service and set character encoding to UTF-8.

 

Anybody can help?

Thanks
Hamid

Reply | Threaded
Open this post in threaded view
|

Re: UTF-8 Encoding problem

Hamid Reza Sahlolbey
Hi;
I found that is this problem occurs when I use rampart and without rampart evrything is ok. does anybody knows why?
 
Is it a bug?
 
Thanks,
Hamid

 
On 6/2/08, hamidreza sahlolbey <[hidden email]> wrote:
Hi;

I have problem sending Persian String over SOAP from client to server on axis2 .Response strings are correct and but when I use Persian string as my method parameters I get garbage characters on server side.

I used RPCServiceClient to call the web service and set character encoding to UTF-8.

 

Anybody can help?

Thanks
Hamid


Reply | Threaded
Open this post in threaded view
|

Re: UTF-8 Encoding problem

anismek
This post has NOT been accepted by the mailing list yet.
I am facing the same issue with arabic characters.
I created different security flavors of the same service:
0:no security, 1:user name token, 2:signature, 3:signature and encryption).
My service reads a database table an returns an array of lines (some fileds contain arabic characters).

The characters are returned well encoded if i do not use encryption (flavors 0 to 2).
This is not the case when my service's policy asks for encryption : flavor 3.
Remark: french characters like 'é', 'è' are well handled ...

What i suspect is that at the moment when the array of bytes representing the data to be ciphered is read,
the UTF-8 encoding is not respected:

message.getBytes();

in stead of:

message.getBytes("UTF8");

Can someone confirm ? Is there a way to xork around this ?

Axis2 used version 1.3 with corresponding version of ramaprt.