"I haven't studied the specs to be able to decide how it should work"...
Section 3.1.5 of the Simple SOAP Binding Profile (WS-I) states that "Content-Type" HTTP header field-value must indicate the correct character encoding, using the "charset" parameter. In absence of this, it must use the default "us-ascii" charset. Furthermore, it says that the 'encoding' attribute on the envelope should be ignored... http://www.ws-i.org/Profiles/SimpleSoapBindingProfile-1.0.html#Character_Enco dings -----Original Message----- From: Manuel Mall [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 01, 2006 8:24 AM To: [email protected] Subject: Re: Converting from UTF-8 to ISO-8859-I with Axis2 and Java On Thursday 02 November 2006 00:03, Bruno Negrao wrote: > Manuel, > > It seems you are using SoapUI to decode the SOAP response. Does > SoapUI uses axis2 do send/receive the messages? > The log shows the case were SoapUI is the client and Axis2 is the server. The server does decode the message, that is converts the <text>...<text> element into a Java String and then puts that String back into the response. I also tested with an Axis2 client and it works fine as well. In the end I was mainly interested in the 'wire' log. And it shows correct encoding. This meant that the Axis2 service correctly decoded and encoded the XML. > You should use Axis2 to decode the response, not SoapUI. Can you make > your echo service available on the internet? No guarantee it will be available for long. But for the time being: http://arcus.com.au:6060/axis2/services/EchoService > > Also I saw your server is setting the "Content-Type: text/xml; > charset=iso-8859-1[\r][\n]" header on its responses. This is > different from my case since my server omits this header. > > My hypotheses is axis2 gets encoding type of the response from the > Content-Type header instead from the XML declaration. > Yes, that could well be the case. I haven't studied the specs to be able to decide how it should work. I assume its along the following lines: 1) If http is the transport and an http Content-type header exists use that encoding else 2) attempt encoding detection as per XML spec, that is look for an xml prolog and do some UTF byte mark sniffing... > Regards, > bruno Cheers Manuel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
