axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Beth Ayres <>
Subject Unsupported encoding error on Z/OS when using WS-Security
Date Fri, 07 Dec 2007 17:08:42 GMT
I am using AXIS2 1.3.  I have a client that runs on Z/OS.  When I make a web service call using
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);

appears to prepend the encoding declaration to the document and encode that declaration itself
in EBCDIC.  The rest of the document is encoded in UTF-8.


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

StAXSOAPModelBuilder throws the WSSecurityException because of the EBCDIC.

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<> 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.

I see no way around this problem unless there is some option or setting to prevent the behavior.
 Has anyone seen this before and have a solution?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message