axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <stev...@iseran.com>
Subject Re: [PROPOSAL] synchronizing character encoding between request and response
Date Tue, 02 Mar 2004 09:43:04 GMT
Ias wrote:
> Hi all,
> 
> I'd like to propose simple changes to AxisServlet, Message and
> SerializationContextImpl as the subject of this message says. Let me
> introduce an example. Currently, Axis returns a SOAP message based on UTF-8
> character encoding unless you customize the default differently. If you
> send a request message like
> 
> <?xml encoding="utf-16"?>
> ...
> 
> to a service deployed to Axis, you can get
> 
> <?xml encoding="utf-8"?>
> ...
> 
> as the response of the request.
> 
> This mechanism is O.K. , even regarding WS-I BP 1.0 because there' no
> requirement for "giving the same character encoding back" in the profile.
> However, it's obvious that users expect the character encoding of a request
> will be naturally the same with that of its corresponding response since
> the request results in the response.
> 
> I hope this "synchronizing character encoding" will be the default behavior
> of Axis based on SOAP including the character encoding specified by the
> "Content-Type" HTTP header. 
> 
> At last, these changes passed "ant clean all-tests".
> 
> Looking forward to your opinion and comment,
> 

+1, provided it is only UTF-8 and UTF-16 that we are switching between. 
Something (I think WS-I) says that only these should be supported; 
adding more complicates so much.

Note that while UTF-16 encoded korean will by much more efficient than 
utf-8, if you send binary stuff back inline in base-64 encoding, the 
binary data is 50% less efficient, as each base-64 char now takes up two 
bytes. So there may be a need for an endpoint to override the charset 
coming in over the wire.

Mime
View raw message