axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Voelkle <martin.voel...@gmail.com>
Subject Overriding charset
Date Thu, 14 Jan 2010 16:26:41 GMT
Hi list,

I am writing a service client using Axis2/C 1.6 (win32 binary
distribution) and WSDL2C, but I have a few issues:
I am only sending numerical values, but the reply contains text nodes
with non-ASCII characters. When the reply is deserialized in the
generated code, the first element containing non-ASCII chars is empty
and any following element is missing, a bit like the description in
issue AXIS2C-1265.

Looking through tcpmon, I see that both the request and the reply are
UTF8, so I first tried to change this with the following code:
	axis2_options_t* options = axis2_stub_get_options(stub, env);
	axutil_property_t* charset = axutil_property_create(env);
	axutil_property_set_value(charset, env, "Windows-1252");
	axis2_options_set_property(options, env, "CHARACTER_SET_ENCODING", charset);
and:
	axis2_options_set_property(options, env, "CHARACTER_SET_ENCODING",
"Windows-1252");
But none of these have any effect on the outgoing message or the reply
deserialization (I also tried ISO-8859-1).

I tried to set the Accept-Charset HTTP header using
axis2_options_set_http_headers, which is sent correctly, but the
service still replies using UTF-8.

I added a Content-Type HTTP header
(application/soap+xml;charset=Windows-1252;action="urn:action") and
the service finally replied using a Windows-1252 charset. This has 2
problems:
- the Content-Type HTTP header is sent twice, once set by me (with the
Windows-1252 charset) and once set by Axis2/C (with the UTF-8
charset). I guess that I am lucky that my header is sent first.
- the original problem is not solved, as the deserialization still has
the same bug as with UTF-8!

Is there an other way to override the outgoing charset?
Is there a way to receive non-ASCII characters?

Thank you,

Martin Voelkle

Mime
View raw message