You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Beth Ayres (JIRA)" <ji...@apache.org> on 2008/01/10 22:07:33 UTC

[jira] Created: (AXIS2-3437) Unsupported encoding error on Z/OS when using WS-Security

Unsupported encoding error on Z/OS when using WS-Security
---------------------------------------------------------

                 Key: AXIS2-3437
                 URL: https://issues.apache.org/jira/browse/AXIS2-3437
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: modules
    Affects Versions: 1.3
            Reporter: Beth Ayres


I am using AXIS2 1.3.  I have a client that runs on Z/OS.  When I make a web service call using Rampart for WS-Security, I get a WSSecurityException: Unsupported encoding (EBCDIC).  I have debugged this problem and found the following.

In Axis2Util.getSOAPEnvelopeFromDOMDocument,

XMLUtils.outputDOM(doc.getDocumentElement(), os, true);

prepends the encoding declaration to the document and encodes that declaration itself in EBCDIC.  The rest of the document is encoded in UTF-8.

Then

ByteArrayInputStream bais =  new ByteArrayInputStream(os.toByteArray());
StAXSOAPModelBuilder stAXSOAPModelBuilder = new StAXSOAPModelBuilder(XMLInputFactory.newInstance().createXMLStreamReader(bais), null);

StAXSOAPModelBuilder throws the WSSecurityException because of the EBCDIC-encoded encoding declaration.

According to the W3C XML spec:

"In the absence of information provided by an external transport protocol (e.g. HTTP or MIME), it is a fatal error<http://www.w3.org/TR/2006/REC-xml-20060816/> for an entity including an encoding declaration to be presented to the XML processor in an encoding other than that named in the declaration, or for an entity which begins with neither a Byte Order Mark nor an encoding declaration to use an encoding other than UTF-8."

I am not using HTTP or MIME, etc.  Therefore, the encoding declaration should not be in EBCDIC at all.


-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org