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 Frédéric Viollet <fr...@evidian.com> on 2007/07/11 18:04:28 UTC

axis and UTF-8

Hi everybody,

here's my problem. Maybe someone will be able to help me.
I'm trying to send accents to my web service. But on the client side, 
the generated XML contains a strange encoding of these characters.
Here's an example:
I try to send the 'é' character.
The generated XML looks like this:

POST /apmadmws HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: zembra:9999
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 919
Cookie: apmsession=xaNwgUevQncs9ztbdypjrlE1eN+q2Ybr

<?xml version="1.0" encoding="UTF-8"?>
   <soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
         <apmSet-Container xmlns="http://evidian.com/security/apmadmws">
            <containerid>
               <guid>d6a8d2b60475294b8a6221a47ad9507f</guid>
               <type>APMOBJTYPEunknown</type>
            </containerid>
            <attrs>
               <ns1:arr ns1:mod="APMATTMODREPLACE" 
ns1:type="APMATTTYPESTRING" 
xmlns:ns1="http://evidian.com/security/apmadmws">
                  <ns1:name>APMATTNAMEAPMDISPLAYNAME</ns1:name>
                  <ns1:value>
                     <ns1:string>fvi</ns1:string>
                  </ns1:value>
               </ns1:arr>
               <ns2:arr ns2:mod="APMATTMODREPLACE" 
ns2:type="APMATTTYPESTRING" 
xmlns:ns2="http://evidian.com/security/apmadmws">
                  <ns2:name>APMATTNAMEDESCRIPTION</ns2:name>
                  <ns2:value>
---->                     <ns2:string>&#xE9;</ns2:string>             
<----------- Here's the problem
                  </ns2:value>
               </ns2:arr>
               <arr xsi:nil="true"/>
            </attrs>
         </apmSet-Container>
      </soapenv:Body>
   </soapenv:Envelope>


The character is not UTF-8 encoded. It looks like the serialization is 
not done using UTF-8 encoding.
Does anyone have an idea of what I could do?

Thanks for your help.

Fred