You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Mar, Kheng Kok" <Ma...@rosettanet.org> on 2006/04/20 17:11:16 UTC
[Axis2] problem with org.apache.axis2.security.util.Axis2Util (for security-0.95 module)
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
Re: [Axis2] problem with org.apache.axis2.security.util.Axis2Util (for security-0.95 module)
Posted by Ruchith Fernando <ru...@gmail.com>.
Hi Kheng Kok,
Just fixed it and checked it it (svn revision 395786)
Thanks for finding and reporting this.
Regards,
Ruchith
On 4/20/06, Mar, Kheng Kok <Ma...@rosettanet.org> wrote:
> 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
>
>
>