Writing XML result into Tamino.

Hi
Need help with the java coding on how to take the xml document result of the MusicCollaborationResult example and write that into Tamino.
Thanks a lot

Hi,
To write an xml object into Tamino using the API for Java you need to code:

// Invoke the insert operation and get response
TResponse response = accessor.insert( xmlObject );


Hope this is enough.

I still don’t get it, I mean taking the result of the MusicianCollaborationResult from the code

// Output with JDOM output tool
XMLOutputter outputter = new XMLOutputter();
outputter.output(jazzMusician, System.out);

And inserting it in tamino. How eould you do that in java.
Thanjs

Sorry if I’m not anwering your question. I have attached an example that shows how to insert or update an instance of jazzMusician. To run this code you need JDOM Beta 9 in classpath. This code will not work with Beta 7 because of problems in Namespace handling in that JDOM version.
If this example still does not help, please try to explain exactly what you need to know.
Thanks.
ModifiedMusician.java (5.96 KB)

Yes it did help, Thanks a Lot.
But now is it possible to retrieve data from one database and to insert the result into another database checking the result against the other schema.

Sure - just create another TConnection and TXMLObjectAccessor, pointing to the new database/collection, and insert the xml as before. When you do the insert, Tamino is responsible for checking the xml against the target schema, and will report any errors in the TResponse object.

It worked thanks a lot :slight_smile: