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.  How to delete all NonXML documents from a collection?

    Posted Wed December 08, 2004 09:19 PM

    I created a collection (no schema) and added bunch of XML and NonXML documents. The NonXML Documents gets added into ino:nonXML automatically in that collection.

    Now how can I delete all the NonXML documents using JAVA API? Any code samples would help.

    Thanks.


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


  • 2.  RE: How to delete all NonXML documents from a collection?

    Posted Wed December 29, 2004 04:56 PM

    Hi,

    just issue an XQuery statement in the following
    form:

    declare namespace ino=“http://namespaces.softwareag.com/tamino/response2
    update delete input()/ino:nonXML/…


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


  • 3.  RE: How to delete all NonXML documents from a collection?

    Posted Mon January 10, 2005 05:03 PM

    I tried this but get the following error:

    Delete NonXML failed with:com.softwareag.tamino.db.API.common.TAccessFailureException( message: Tami
    no access failure (8320, INOXIE8320, Error parsing the XQL query, Unexpected token namespace found,
    expected was End of query), tag: JavaTaminoAPI_4_2_0_53, java: 1.4.2_06, os: Windows XP 5.1 ):

    Any Clues?? Here’s what my code looks like


    String qry = “declare namespace ino="http://namespaces.softwareag.com/tamino/response2\”";
    qry += “update delete input()/ino:nonXML/…”;

    TQuery query = TQuery.newInstance(qry);
    try {
    // Invoke the query operation.
    nxAccessor_.query(query);

    } catch (TQueryException queryException) {
    System.out.println(“Couldn’t Delete NonXML Articles from Tamino DB.”);

    TAccessFailureMessage accessFailure = queryException.getAccessFailureException();
    if ( accessFailure != null )
    System.out.println(“Delete NonXML failed with:” + accessFailure);
    else
    System.out.println(“Delete NonXML failed:” + queryException.getMessage());
    }


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


  • 4.  RE: How to delete all NonXML documents from a collection?

    Posted Tue January 11, 2005 11:56 AM

    Hi,
    Because you are issuing an XQuery, you need to use a TXQuery object, not a TQuery, like this:

    TXQuery query = TXQuery.newInstance(qry);
    // Invoke the query operation.
    TResponse response = accessor.xquery(query);
    ...
    catch...TXQueryException....


    HTH


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