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.  Delete using a query

    Posted 04/15/04 05:46 PM

    I want delete all documents retrieved by query. I am using c++ an my code is:


    TaminoCommand* inoCommand = m_Tamino->CreateCommand(collection);
    TaminoQuery* inoQuery = new TaminoQuery(query);
    TaminoQueryResponse* inoResp = inoCommand->Query(inoQuery);

    if(!inoResp->HasData)
    return;

    TaminoItemIterator* it = inoResp->GetItemIterator();
    while(it->Next()){
    TaminoDocument* inoDoc = dynamic_cast<TaminoDocument*>(it->GetItem(__typeof(TaminoDocument)));
    inoCommand->Delete(inoDoc);
    }

    i doesn’t run because line “dynamic_cast<TaminoDocument*>(it->GetItem(__typeof(TaminoDocument)));” throw a WebException.
    What’s wrong ?
    Finally, in documentation a find the class “TaminoXmlDocument”, but I can use it from c++, why ?
    thanks


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


  • 2.  RE: Delete using a query

    Posted 04/19/04 02:02 PM

    One would normally use GetNode to get nodes. GetItem is used when you wish to get the node back as a particular “type”. In this case the type you wish the node to be must have a corresponding serializer generated using the .NET xsd tool from an .xsd type descriptor. This explains the dynamic cast exception.

    I suspect that the use of TaminoDocument is incorrect in GetItem. This is why the example serializer TaminoXmlDocument is provided.

    TaminoXmlDocument is under the Serialization namespace: SoftwareAG.Tamino.Api.Serialization.

    By the way I suspect that you might be able to delete documents using XQuery. Unfortunately the website Find is not working at the moment.


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


  • 3.  RE: Delete using a query

    Posted 04/22/04 12:11 PM

    I knew I had seen XQuery delete on documents.

    It is detailed in this forum message:

    http://tamino.forums.softwareag.com/viewtopic.php?p=2980


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


  • 4.  RE: Delete using a query

    Posted 04/30/04 03:58 PM