axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ias" <iasan...@tmax.co.kr>
Subject RE: [PROPOSAL] synchronizing character encoding between request and response
Date Tue, 02 Mar 2004 06:31:24 GMT
> you misunderstand, the Accpet-Charset header indicates what 
> charset the client will accept for the response. It has 
> nothing to do with the content type of the request. 

I fully understand the header and didn't say that it had something to do the
content type of the request. (I rather told you that this proposal was not
about (the header's meaning of) accepting character sets.)

> This is a 
> HTTP level thing that seems to map exactly to what you are 
> looking for, why re-invent the wheel ?

Let me explain more specifically. This proposal is essentially designed to
work at "SOAP (XML) level" and hence not to depend on HTTP. I changed
org.apache.axis.Message and
org.apache.axis.encoding.SerializationContextImpl for the purpose. As a
result, abstractly we can get the same character encoding between request
and response in terms of XML document.

request SOAP message: <?xml encoding="x"?>
->
response SOAP message: <?xml encoding="x"?>

However, in order to transfer SOAP messages over HTTP compliantly, we also
need to synchronize charset of Content Type header of request and response.

request HTTP message: Content-Type: text/xml;charset=x
->
response HTTP message: Content-Type: text/xml;charset=x

This is why I changed AxisServlet. 

Sorry to lead you to misunderstanding. Again, "XML level" first and "HTTP
level" followed.

Ias

> 
> Cheers
> Simon
> 
> On Tue, 2 Mar 2004 13:59:30 +0900, in soap you wrote:
> 
> >> Wouldn't it be better for the server to use the 
> Accept-Charset HTTP 
> >> header ?
> >
> >This proposal is not an approach (for problems) about accepting 
> >character sets. What I'm intending is basically making a 
> response XML 
> >message based on the character encoding of its corresponding request 
> >XML message. If you send the XML (SOAP) message over HTTP, it's no 
> >wonder that charset of Content-Type header and encoding of XML 
> >declaration in the message are the same.
> >
> >Regards,
> >Ias
> >
> >> 
> >> Cheers
> >> Simon
> >> 
> >> On Tue, 2 Mar 2004 12:17:26 +0900, in soap you 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,
> >> >
> >> >Ias
> >> >
> >> >=========================================================
> >> >Lee, Changshin (Korean name)
> >> >Ias (International name)
> >> >               Company Web Site: http://www.tmax.co.kr
> >> >               Personal Web Site: http://www.iasandcb.pe.kr
> >> >---------------------------------------------------------
> >> >JSR 201, 204, 222 and 224 Expert Group Member Apache Web Services 
> >> >Project Member R&D Center Tmax Soft, Inc.
> >> >=========================================================
> >> 
> 


Mime
View raw message