axis-java-user mailing list archives

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

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="">
       ......
   </B>
</A>

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

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

It seems that XMLUtil may have stripped off the empty namespace
xmlns="". 
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. 

Rgds
Kheng Kok



Mime
View raw message