[ 
https://issues.apache.org/jira/browse/AXIS2-4468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Veithen resolved AXIS2-4468.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6
         Assignee: Andreas Veithen

The code that causes this problem is generated by the following part of 
modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl:

                    public void serialize(javax.xml.stream.XMLStreamWriter 
xmlStreamWriter)
                            throws javax.xml.stream.XMLStreamException {
                        org.apache.axiom.om.impl.MTOMXMLStreamWriter 
mtomxmlStreamWriter =
                                                        
(org.apache.axiom.om.impl.MTOMXMLStreamWriter) xmlStreamWriter;
                        try {
                            org.apache.xmlbeans.XmlOptions xmlOptions = new 
org.apache.xmlbeans.XmlOptions();
                            
param.save(mtomxmlStreamWriter.getOutputStream(),xmlOptions.setSaveNoXmlDecl());
                            mtomxmlStreamWriter.getOutputStream().flush();
                        } catch (java.io.IOException e) {
                            throw new 
javax.xml.stream.XMLStreamException("Problem with saving document", e);
                        }
                    }

It directly accesses the underlying byte stream but doesn't care about charset 
encoding (and even less about problems related to byte order marks, namespace 
context, etc.). However this code has been eliminated by the change in 
AXIS2-3760. Therefore the charset encoding issue should no longer be present in 
Axis2 1.6.



> Failure to ISO-8559-1 encode server response message body
> ---------------------------------------------------------
>
>                 Key: AXIS2-4468
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4468
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.5
>         Environment: Axis2-1.5 / Tomcat 6.0 / XmlBeans
>            Reporter: Michael Fryars
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>         Attachments: exp01_utf8.txt, exp02_iso-8859-1.txt, MfrTestService.aar
>
>
> When request has Content-Type: text/xml;charset=UTF-8, the response is 
> labelled as UTF-8 and any special characters are correctly encoded in UTF-8.
> But when request has Content-Type: text/xml;charset=iso-8859-1, the response 
> is labelled as ISO-8859-1 but the message body is still encoded as UTF-8.
> See thread at http://marc.info/?l=axis-user&m=125062671421564&w=2 for more 
> details.
> ----------
> List:       axis-user
> Subject:    Re: [AXIS2] Control character encoding used by axis2 server for
> From:       Andreas Veithen <andreas.veithen () gmail ! com>
> Date:       2009-08-18 20:17:40
> Message-ID: b67458760908181317v352bd106wd8fc9ae171728cc3 () mail ! gmail ! com
> [Download message RAW]
> Michael,
> The following log message is interesting:
> org.apache.axiom.om.impl.MTOMXMLStreamWriter  - Returning access to
> the original output stream: java.io.bufferedoutputstr...@14181418
> It means that the xmlbeans databinding bypasses the normal StAX
> XMLStreamWriter and writes part of the output directly to the
> underlying byte stream. It is probably at that moment that things go
> wrong. Can you please open a JIRA [1] and attach a sample AAR (or WAR)
> that allows us to reproduce this problem?
> Andreas
> ----------

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

Reply via email to