transport.http.ListingAgent: i18n problem in case of a non-English default 
encoding
-----------------------------------------------------------------------------------

                 Key: AXIS2-2318
                 URL: https://issues.apache.org/jira/browse/AXIS2-2318
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: transports
    Affects Versions: 1.1.1
         Environment: Axis2 1.1.1, Oracle OC4J 10.1.3.2
            Reporter: Dmitry


Method processListService in org.apache.axis2.transport.http.ListingAgent has 
the following on lines 207 and 231:

schema.write(out);

This call converts String data to bytes using system's default encoding. A bit 
earlier in the code there is

res.setContentType("text/xml");

Thus in case of an XSD file request, user's browser will get "ContentType: 
text/xml" header without encoding specified, and will assume UTF-8. But if 
server's default encoding is something like Cp1251 the browser may complain 
about bad characters (as schema comments are sometimes written in national 
languages). A simple workaround is to replace

schema.write(out);

with 

schema.write(new OutputStreamWriter(out, "UTF8"));

WSDL2Java tool seems to have a similar kind of problem as it always outputs xsd 
files using system's default encoding rather than UTF-8 (even if source xsds 
are in UTF-8).



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to