title: Apache Axis Charset Wrong Encoding on Tomcat?
body: <p>I call a web service via Apache Axis Client in Tomcat server. I get ISO-8859-1 encoded response xml instead of UTF-8. When i simply run this client form main method, everything works as excepted. Below is an example request and response xml log. Please help!</p>
  
  <p>In Message:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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"&gt;
      &lt;soapenv:Body&gt;
          &lt;ns1:getContactInformation
              soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
              xmlns:ns1="http://extranet.turkcell.com.tr/webServices/toskaWebService"&gt;
              &lt;longVal href="#id0" /&gt;
              &lt;longVal0 href="#id1" /&gt;
              &lt;longVal1 href="#id2" /&gt;
              &lt;longVal2 href="#id3" /&gt;
              &lt;integer href="#id4" /&gt;
              &lt;integer0 href="#id5" /&gt;
              &lt;integer1 href="#id6" /&gt;
              &lt;integer2 href="#id7" /&gt;
          &lt;/ns1:getContactInformation&gt;
          &lt;multiRef id="id1" soapenc:root="0"
              soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
              xsi:type="xsd:long" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;-1&lt;/multiRef&gt;
          &lt;multiRef id="id6" soapenc:root="0"
              soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
              xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;408&lt;/multiRef&gt;
          &lt;multiRef id="id0" soapenc:root="0"
              soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
              xsi:type="xsd:long" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;-1&lt;/multiRef&gt;
          &lt;multiRef id="id2" soapenc:root="0"
              soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
              xsi:type="xsd:long" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;5322067832&lt;/multiRef&gt;
          &lt;multiRef id="id3" soapenc:root="0"
              soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
              xsi:type="xsd:long" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;-1&lt;/multiRef&gt;
          &lt;multiRef id="id5" soapenc:root="0"
              soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
              xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;100&lt;/multiRef&gt;
          &lt;multiRef id="id7" soapenc:root="0"
              soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
              xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;0&lt;/multiRef&gt;
          &lt;multiRef id="id4" soapenc:root="0"
              soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
              xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;1&lt;/multiRef&gt;
      &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>Out Message:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-9" standalone="yes"?&gt;
  &lt;env:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;env:Header&gt;&lt;/env:Header&gt;
      &lt;env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;
          &lt;m:getContactInformationResponse
              xmlns:m="http://extranet.turkcell.com.tr/webServices/toskaWebService"&gt;
              &lt;result xmlns:n1="java:com.turkcell.toska.model" xsi:type="n1:WSContactList"&gt;
                  &lt;addresslist soapenc:arrayType="n1:WSAddress[1]"&gt;
                      &lt;WSAddress xsi:type="n1:WSAddress"&gt;
                          &lt;address1 xsi:type="xsd:string"&gt;7-8 Mah. I 9 C Kap�s�&lt;/address1&gt;
                          &lt;address2 xsi:type="xsd:string"&gt;�orak�� Sok. No:111&lt;/address2&gt;
                          &lt;address3 xsi:type="xsd:string"&gt;Gazzosmanpa�a&lt;/address3&gt;
                          &lt;addressID xsi:type="xsd:long"&gt;0&lt;/addressID&gt;
                          &lt;addressStatus xsi:type="xsd:int"&gt;0&lt;/addressStatus&gt;
                          &lt;addresstype xsi:type="xsd:int"&gt;0&lt;/addresstype&gt;
                          &lt;addressusage xsi:type="xsd:int"&gt;1&lt;/addressusage&gt;
                          &lt;cityCode xsi:type="xsd:int"&gt;72&lt;/cityCode&gt;
                          &lt;cityName xsi:nil="true"&gt;&lt;/cityName&gt;
                          &lt;countryCode xsi:type="xsd:int"&gt;1&lt;/countryCode&gt;
                          &lt;usageStatus xsi:type="xsd:int"&gt;0&lt;/usageStatus&gt;
                          &lt;zipCode xsi:type="xsd:string"&gt;72439&lt;/zipCode&gt;
                      &lt;/WSAddress&gt;
                  &lt;/addresslist&gt;
                  &lt;emaillist soapenc:arrayType="n1:WSEmailInfo[0]"&gt;&lt;/emaillist&gt;
                  &lt;errMessage xsi:type="xsd:string"&gt;&lt;/errMessage&gt;
                  &lt;phonelist soapenc:arrayType="n1:WSPhone[1]"&gt;
                      &lt;WSPhone xsi:type="n1:WSPhone"&gt;
                          &lt;addressID xsi:type="xsd:long"&gt;0&lt;/addressID&gt;
                          &lt;addressStatus xsi:type="xsd:int"&gt;0&lt;/addressStatus&gt;
                          &lt;extension xsi:nil="true"&gt;&lt;/extension&gt;
                          &lt;generationDate xsi:nil="true"&gt;&lt;/generationDate&gt;
                          &lt;modificationDate xsi:nil="true"&gt;&lt;/modificationDate&gt;
                          &lt;phonenumber xsi:type="xsd:string"&gt;2125487549&lt;/phonenumber&gt;
                          &lt;phonenumbertype xsi:type="xsd:int"&gt;100&lt;/phonenumbertype&gt;
                          &lt;usageStatus xsi:type="xsd:int"&gt;0&lt;/usageStatus&gt;
                      &lt;/WSPhone&gt;
                  &lt;/phonelist&gt;
                  &lt;resultcode xsi:type="xsd:int"&gt;0&lt;/resultcode&gt;
              &lt;/result&gt;
          &lt;/m:getContactInformationResponse&gt;
      &lt;/env:Body&gt;
  &lt;/env:Envelope&gt;
  </code></pre>