Return-Path: Delivered-To: apmail-xml-xmlbeans-user-archive@www.apache.org Received: (qmail 20974 invoked from network); 17 Jun 2004 23:53:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Jun 2004 23:53:59 -0000 Received: (qmail 85381 invoked by uid 500); 17 Jun 2004 23:54:24 -0000 Delivered-To: apmail-xml-xmlbeans-user-archive@xml.apache.org Received: (qmail 85362 invoked by uid 500); 17 Jun 2004 23:54:23 -0000 Mailing-List: contact xmlbeans-user-help@xml.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: xmlbeans-user@xml.apache.org Delivered-To: mailing list xmlbeans-user@xml.apache.org Received: (qmail 85347 invoked by uid 99); 17 Jun 2004 23:54:23 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Avoiding unnecessary copying Date: Thu, 17 Jun 2004 16:53:48 -0700 Message-ID: <4B2B4C417991364996F035E1EE39E2E10190AE3F@uskiex01.bea.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Avoiding unnecessary copying Thread-Index: AcRUuTMynFoZ1Jo1R6u0K+DoAATP7gAC9RpA From: "David Remy" To: X-OriginalArrivalTime: 17 Jun 2004 23:53:49.0382 (UTC) FILETIME=[55D9EE60:01C454C6] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > -----Original Message----- > From: nn [mailto:nnakae@comcast.net] > Sent: Thursday, June 17, 2004 3:20 PM > To: xmlbeans-user@xml.apache.org > Subject: Re: Avoiding unnecessary copying >=20 > Hi Mark, >=20 > I had similar problem to adapt XMLBeans for SAXON. > SAXON depends on specific API, so it was ncessary to create NodeWrapper > class from XmlObject. Is it possible to see the code that you wrote to work with SAXON? I don't know perhaps we could suggest something if we see it ... > This worked, but from performance point of view, this was not > satisfactory. > XmlObject(or XMLBeans generated classes) should directly implement these > interfaces. >=20 > in the comming new release it will support adding interface for generated > class. actually this feature will also be in the imminent xmlbeans 1.03 release. > So it may be possible to implement DOM api using this feature. >=20 > But DOM API is so standard, it would be useful for XMLBeans to support > this > feature directly. dom level 2 is implemented natively in v2. it becomes a peer api to xmlcursor (and you will be able to switch at will from dom, xmlcursor, and xmlobject). this is under the newstore2 in v2. eric has implemented the dom code, and is in the process of moving over the existing apis (xmlcursor, etc.) over to the newstore. this is a big task so i assume it will be a couple of months before the newstore is fully functional in v2. =20 > (maybe by choosing option for code generation time). >=20 > For the DOM API implementation, there are a few issues since XMLBeans does > not follow DOM API structure. > I sent a reply and explained how to implement getChildren etc from > XmlObject. > You can see it. just curious did you see the api that was added by cezar to selectChildren, selectAtributes, etc.? there is a mini spec for it here: http://wiki.apache.org/xmlbeans/SelectChildrenAndAttributesFeature=20 >=20 > Another approach is to use AOP approach (e.g, AspectWerkz), then even if > XMLBeans does not have the new feature, XmlObject(or XMLBean generated > classes) can be mixen and implement given interface magically. >=20 > nn >=20 >=20 > ----- Original Message ----- > From: "Mark Lewis" > To: > Sent: Thursday, June 17, 2004 10:47 AM > Subject: Avoiding unnecessary copying >=20 >=20 > > I have a working program using xmlbeans 1.0.2 to invoke some web > > services, but I'm trying to figure out if I can make it more efficient. > > I was hoping someone out there can point me in the right direction. > > > > I'm using SAAJ to invoke web services (document-style), and I need to > > pass it a DOM object to send. I'm currently using > > XmlObject.newDomNode() to generate the DOM from my bean, but that makes > > a complete copy of my XML as a DOM node prior to sending. > > > > Is anybody familiar with a simple way of invoking a web-service that > > doesn't involve this extra copy? > > > > Here's my current code: > > > > // Convert the XmlBeans object to a DOM-node > > Document document =3D (Document)xmlData.newDomNode(); > > > > // Create the SOAPMessage and SOAPConnection to send > > SOAPMessage message; > > SOAPConnection connection; > > synchronized(this) { > > message =3D messageFactory.createMessage(); > > connection =3D connectionFactory.createConnection(); > > } > > > > // Prepare the SOAPMessage > > message.getSOAPHeader().detachNode(); > > SOAPBody body =3D message.getSOAPBody(); > > body.addDocument( document ); > > message.saveChanges(); > > > > // Send the message > > SOAPMessage response =3D connection.call(message, endpoint); > > > > > > Thanks for any pointers, > > Mark Lewis > > > > > > - --------------------------------------------------------------------- > > To unsubscribe, e-mail: xmlbeans-user-unsubscribe@xml.apache.org > > For additional commands, e-mail: xmlbeans-user-help@xml.apache.org > > Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/ > > >=20 >=20 > - --------------------------------------------------------------------- > To unsubscribe, e-mail: xmlbeans-user-unsubscribe@xml.apache.org > For additional commands, e-mail: xmlbeans-user-help@xml.apache.org > Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/ - --------------------------------------------------------------------- To unsubscribe, e-mail: xmlbeans-user-unsubscribe@xml.apache.org For additional commands, e-mail: xmlbeans-user-help@xml.apache.org Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/