IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Writing XML result into Tamino.

    Posted Thu October 23, 2003 12:30 PM

    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


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 2.  RE: Writing XML result into Tamino.

    Posted Thu October 23, 2003 12:37 PM

    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.


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 3.  RE: Writing XML result into Tamino.

    Posted Thu October 23, 2003 02:07 PM

    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


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 4.  RE: Writing XML result into Tamino.

    Posted Thu October 23, 2003 06:19 PM

    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)


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 5.  RE: Writing XML result into Tamino.

    Posted Fri October 24, 2003 10:47 AM

    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.


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 6.  RE: Writing XML result into Tamino.

    Posted Fri October 24, 2003 11:59 AM

    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.


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 7.  RE: Writing XML result into Tamino.

    Posted Fri October 24, 2003 03:41 PM