axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mar, Kheng Kok" <>
Subject [Axis2] problem with (for security-0.95 module)
Date Thu, 20 Apr 2006 15:11:16 GMT

In the getSOAPEnvelopFromDOOMDocument(Document doc, Boolean disableDoom)
method in Axis2Util, it uses XmlUtils to output doc to bytearray, and
create a XMLStreamReader out of this array. However, this implementation
seems to have problem with the following type of XML document: 

<A xmlns="urn:x:y:z"> 
   <B xmlns="">

When later XMLStreamReader created from this byte array, the reader
returns the XML document as 

<A xmlns="urn:x:y:z">

It seems that XMLUtil may have stripped off the empty namespace
It thus caused the Xmlbean to fail to validate the xml document. 

When I changed it to the following (which is in the source code but
somehow commented out) 

        OMElement docElem = (OMElement)doc.getDocumentElement();
        reader = docElem.getXMLStreamReader();

Everything works fine. 

Kheng Kok

View raw message