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 Fátima Milla Olaya <fa...@evidian.com> on 2007/11/27 11:28:18 UTC
OMElement to org.w3c.dom.Document
Hi,
I want to transform a OMElement to a dom document, I've tried this:
OMElement omquery = policyQuery.getPolicyQuery();
DocumentImpl omdoc=new DocumentImpl(omquery.getOMFactory());
Element queryelement = omdoc.getDocumentElement();
and I get this exception:
Exception in thread "main" org.apache.axis2.AxisFault:
org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory cannot be
cast to org.apache.axiom.om.impl.dom.factory.OMDOMFactory
My webservice exchanges two xml files. Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: OMElement to org.w3c.dom.Document
Posted by Fátima Milla Olaya <fa...@evidian.com>.
Thanks,it's worked.
Evgeniy Vyborov a écrit :
> Hi,
>
> I think the simplest way to transform OMElement to DOM Element is to
> use static method toDOM(OMElement element) from
> org.apache.axis2.util.XMLUtils class.
>
> Regards,
> Eugene
>
> */Fátima Milla Olaya <fa...@evidian.com>/* wrote:
>
> Hi,
> I want to transform a OMElement to a dom document, I've tried this:
> OMElement omquery = policyQuery.getPolicyQuery();
> DocumentImpl omdoc=new DocumentImpl(omquery.getOMFactory());
> Element queryelement = omdoc.getDocumentElement();
>
> and I get this exception:
> Exception in thread "main" org.apache.axis2.AxisFault:
> org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory
> cannot be
> cast to org.apache.axiom.om.impl.dom.factory.OMDOMFactory
>
> My webservice exchanges two xml files. Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ------------------------------------------------------------------------
> Get easy, one-click access to your favorites. Make Yahoo! your
> homepage. <http://us.rd.yahoo.com/evt=51443/*http://www.yahoo.com/r/hs>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: OMElement to org.w3c.dom.Document
Posted by Evgeniy Vyborov <ev...@yahoo.com>.
Hi,
I think the simplest way to transform OMElement to DOM Element is to use static method toDOM(OMElement element) from org.apache.axis2.util.XMLUtils class.
Regards,
Eugene
Fátima Milla Olaya <fa...@evidian.com> wrote: Hi,
I want to transform a OMElement to a dom document, I've tried this:
OMElement omquery = policyQuery.getPolicyQuery();
DocumentImpl omdoc=new DocumentImpl(omquery.getOMFactory());
Element queryelement = omdoc.getDocumentElement();
and I get this exception:
Exception in thread "main" org.apache.axis2.AxisFault:
org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory cannot be
cast to org.apache.axiom.om.impl.dom.factory.OMDOMFactory
My webservice exchanges two xml files. Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------
Get easy, one-click access to your favorites. Make Yahoo! your homepage.