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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  getElement doesn't !

    Posted 11/14/01 06:05 PM

    I am trying to query Tamino using the new API and return DOM2 Elements which I can process. The code extract below:

    code:

    TConnection myConnection = TConnectionFactory.getInstance().newConnection( taminoURL );
    TLocalTransaction localTransaction = myConnection.useLocalTransactionMode();
    TXMLObjectAccessor xmlObjectAccessor =
    myConnection.newXMLObjectAccessor( TAccessLocation.newInstance( taminoCollection ), TDOMObjectModel.getInstance() );
    TQuery query = TQuery.newInstance( taminoDocType + “[@ino:id=1]”);
    TResponse response = xmlObjectAccessor.query( query );
    if ( response.hasFirstXMLObject() ) {
    TXMLObjectIterator myIterator = response.getXMLObjectIterator();
    while (myIterator.hasNext()) {
    TXMLObject xmlObjectReturned = myIterator.next();
    xmlObjectReturned.writeTo(System.out);
    Element myElement = (Element)
    xmlObjectReturned.getElement();
    System.out.println("Element for transform is: " + myElement);


    …results in output on System.out:


    3456

    Element for transform is: [Property: null]

    So the writeTo works fine, but the Element is not what I expected (I expected xml).

    What am I doing wrong?


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


  • 2.  RE: getElement doesn't !

    Posted 11/15/01 06:58 PM

    It was working - it just didn’t look like it.
    My mistake.


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