Hello,
I'm seeking some advice/help with a character encoding problem with an axis2
service (i.e. server side).
When my service receives a (WS/SOAP) request with:
Content-Type: text/xml; charset=UTF-8
in the HTTP header, everything works fine, any unusual charcters in the
response are correctly encoded in UTF-8.
But when the service receives a request with:
Content-Type: text/xml; charset=ISO-8859-1
the response is inconsistent. The response is labelled as ISO-8859-1:
Content-Type: text/xml; charset=ISO-8859-1
<?xml version="1.0" encoding="ISO-8859-1"?>
but in fact the message body is still encoded in UTF-8.
Should the axis2 engine automatically select and use ISO-8859-1 encoding for
the response? Or is it something I need to configure? Or is it always UTF-8?
I understood from a previous thread ("How to change Axis2 response character
encoding") that axis2 selects a a message builder based on the Content-Type
header. My axis2.xml config does not contain anything specifically for
"text/xml" :
<messageBuilders>
<messageBuilder contentType="application/xml"
class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
<messageBuilder contentType="application/xml"
class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
<messageBuilder contentType="application/x-www-form-urlencoded"
class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
<messageBuilder contentType="multipart/form-data"
class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
</messageBuilders>
Is this where I need to intervene to control the response encoding?
Thanks in advance for any help you can provide.
Michael Fryars