Ron Gavlin <[EMAIL PROTECTED]> wrote on 07/07/2006 12:23:48 AM: > Using EMF/SDO 1.0, we were able to use XMLResourceImpl's load and > save methods to transform between DataObjects and DOM Nodes. The > same technique is no longer working with Tuscany SDO 2.0. For > example, when I invoke SDOXMLResourceImpl.load(Node, null), a > DynamicEObjectImpl is created instead of a DataObjectImpl. Any ideas > off the top of your head how to make this work? My guess is that you tried this in an environment where the SDO runtime wasn't initialized. Usually that happens automatically, under the covers, when you use SDO features, but you can force it by calling DataObjectUtil. initRuntime().
> > Of course, we would rather not resort to EMF APIs to efficiently > convert between DataObjects and DOM Nodes. But EMF APIs are better > than paying the performance penalty of using Strings or Input/Output > Streams as an intermediate representation. It would be nice if SDO > or Tuscany provided XMLHelper-like save/load methods that took DOM > Nodes in addition to Strings and Streams. Assuming we can get the > SDOXMLResourceImpl load/save problems mentioned above resolved, > would it make sense to use EMF's load/save capabilities to provide > load/save services for DOM nodes? Would SDOUtil, DataObjectUtil, a > Tuscany DOMHelper, or another class be the right location for such methods? I would stay away from calling the EMF APIs directly, if I were you. As Raymond mentioned, in his reply, the plan is to add an API to use Source/Result for this. That API has been agreed for addition to the 2.1 version of the SDO spec. In the meantime, however, we could add something to SDOUtil in Tuscany. Maybe if you want to speed things up, you could write the SDOUtil method for this and contribute it to the project? > > One of the reasons we need DOM Nodes from SDO DataObjects is so we > can perform XML Schema validation. Another reason we transform > between DataObjects and DOM Nodes is to interact with our web services engine. > > Thanks in advance for your help. > > - Ron > > > > --------------------------------------------------------------------- > 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]
