Yes, it's packaging. we may have to refactor stuff. It may be better to move XMLStreamReaderFromDOM directly into axiom in the long run.
-- dims On 5/14/07, Yarmamedov, Vasyl <[EMAIL PROTECTED]> wrote:
Than obvious question why XMLUtils.toOM is not implemented through XMLStreamReaderFromDOM? (possible answer is packaging) Or is it uncommon operation for axis developers to convert existing DOM to Axiom? Thank You -----Original Message----- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Sunday, May 13, 2007 11:02 AM To: [email protected] Subject: Re: [Axis2] Axiom, What is the best way to add existing DOM (created by xerces) element to OMElement? yes , XMLStreamReaderFromDOM is much better. thx, dims On 5/13/07, Yarmamedov, Vasyl <[EMAIL PROTECTED]> wrote: > Here are two examples - one with XMLUtils and another one using > org.apache.axis2.jaxws.message.util.impl.XMLStreamReaderFromDOM: > > public void addUsingXmlUtil(OMElement oe,Element dom) throws Exception { > OMElement convertedOE = XMLUtils.toOM(dom); > oe.addChild(convertedOE); > oe.serialize(new > org.apache.commons.io.output.NullOutputStream()); > } > > public void addUsingDomReader(OMElement oe,Element dom) throws Exception > { > XMLStreamReaderFromDOM domStreamReader = > new XMLStreamReaderFromDOM(phones); > StAXOMBuilder domBuilder = new StAXOMBuilder(domStreamReader); > OMElement convertedOE = domBuilder.getDocumentElement(); > oe.addChild(convertedOE); > oe.serialize(new > org.apache.commons.io.output.NullOutputStream()); > } > > Usage of DOM reader from axis-jaxws delivers better results comparing to > XMLUtils. > > Any comments, known caveats that would prevent usage of > XMLStreamReaderFromDOM? (one I found - DOM model must be namespace > aware) > > Thank You > > -----Original Message----- > From: Davanum Srinivas [mailto:[EMAIL PROTECTED] > Sent: Saturday, May 12, 2007 9:25 PM > To: [email protected] > Subject: Re: [Axis2] Axiom, What is the best way to add existing DOM > (created by xerces) element to OMElement? > > See org.apache.axis2.util.XMLUtils.toOM method > > http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel > /src/org/apache/axis2/util/XMLUtils.java?view=annotate > > -- dims > > On 5/12/07, Yarmamedov, Vasyl <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > Hi, > > > > > > > > I have a DOM element object that has to be part of WS response. What > is the > > best way to add it (DOM element) to response OMElement? > > > > > > > > I posted same question to axiom-dev, but looks like this group is more > > active. > > > > > > > > Thank You > > > > > > > > > > > -- > Davanum Srinivas :: http://davanum.wordpress.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Davanum Srinivas :: http://davanum.wordpress.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Davanum Srinivas :: http://davanum.wordpress.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
