You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Thomas Pawlitzki <ma...@pawlitzki.name> on 2008/02/14 10:42:33 UTC
Axis2 [1.3] Problems with special chars
Hello,
I am using axis to generate a stub for a webservice.
But i have problems with this stub when i want to send messages
containing special chars like ö,ä,ü.
I add my data to the adbs and use getOMElement().toStringWithConsume()
to log the date in the adb
<?xml version="1.0" encoding="UTF-8"?>
<ns1:Veela xmlns:ns1="http://www.evb-online.com/xmlschema">
...
<ns1:Versicherungsnehmer>
<ns1:NatuerlichePerson>
<ns1:Nachname>DuckÖ</ns1:Nachname>
<ns1:Vorname>Daisy</ns1:Vorname>
</ns1:NatuerlichePerson>
</ns1:Vereinigung>
...
As you can see the Nachname is displayed correctly with the Ö as suffix.
When i now call the service method of the stub to send the message to
the webservice the httpclient logs the follwowing:
...
<ns1:Vereinigung>
<ns1:NatuerlichePerson>
<ns1:Nachname>Duck[0xd6]</ns1:Nachname>
<ns1:Vorname>Daisy</ns1:Vorname>
....
Here you can see that the httpclient encodes the Ö into [0xd6].
I played a bit with the options of the stub and tried diffrent
CHARACTER_SET_ENCODING
like
options.setProperty(org.apache.axis2.Constants.Configuration.CHARACTER_SET_ENCODING,
"ISO-8859-1");
but neither the default setting utf8 nor my custom settings works properly.
Has anyone experiences with this problem and can give me a hint?
Thanks in advance
Greetings,
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Axis2 [1.3] Problems with special chars
Posted by Thomas Pawlitzki <ma...@pawlitzki.name>.
Hey Andreas,
> HttpClient *logs* it like that. Indeed, all characters outside of the
> range 32..127 are transformed like that. You can see this from the
> code here:
> http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/Wire.java?view=markup
>
> However, that doesn't mean that HttpClient *sends* the message like
> that.
Thanks a lot for this information.
Greetings,
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Axis2 [1.3] Problems with special chars
Posted by Andreas Veithen <an...@skynet.be>.
On 14 Feb 2008, at 10:42, Thomas Pawlitzki wrote:
> When i now call the service method of the stub to send the message to
> the webservice the httpclient logs the follwowing:
>
> ...
> <ns1:Vereinigung>
> <ns1:NatuerlichePerson>
> <ns1:Nachname>Duck[0xd6]</ns1:Nachname>
> <ns1:Vorname>Daisy</ns1:Vorname>
> ....
>
> Here you can see that the httpclient encodes the Ö into [0xd6].
HttpClient *logs* it like that. Indeed, all characters outside of the
range 32..127 are transformed like that. You can see this from the
code here:
http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/Wire.java?view=markup
However, that doesn't mean that HttpClient *sends* the message like
that.
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org