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.  How to implement complex query in X-application

    Posted 11/08/02 04:48 AM

    I find the following code in document

    QueryContainer query = new QueryContainer(“Property”);
    query.add(new QueryElement(“/Property/@Category”, “Buy”, “=”));
    Cursor docCursor = ws.query(“buyProperties”, query);
    while (docCursor.hasNext()) {
    BusinessDocument doc = (BusinessDocument)docCursor.next();
    }

    However, if I want to make complex query say,
    /Property/[@Category=‘abc’ or @Category~=‘xxx’]

    How to make it?

    Thanks.


    #API-Management
    #webMethods
    #Tamino


  • 2.  RE: How to implement complex query in X-application

    Posted 11/08/02 08:43 AM

    Hello,

    with XApplication 3.1.3 we added the method query to the BusinessDocumentWorkspace which accepts a simple XQL query string and returns a BusinessDocumentCursor. Therefore, it is not longer required to create a QueryContainer.

    For more details have a look into the JavaDocs of the class BusinessDocumentWorkspace.

    Bye,
    Christian.


    #webMethods
    #API-Management
    #Tamino


  • 3.  RE: How to implement complex query in X-application

    Posted 11/08/02 08:43 AM


  • 4.  RE: How to implement complex query in X-application

    Posted 11/12/02 05:07 AM

    Can you give me some example on this?

    Thanks.


    #webMethods
    #Tamino
    #API-Management


  • 5.  RE: How to implement complex query in X-application

    Posted 11/12/02 07:53 AM

    Hi,

    referring to your first post, your example would look like this:

    String arbitraryQuery="/Property[./@Category='abc' or ./@Category~='xxx']";
    String DOCTYPE = "Property";
    Cursor docCursor = ws.query("buyProperties", DOCTYPE, arbitraryQuery);
    while (docCursor.hasNext()) {
    BusinessDocument doc = (BusinessDocument)docCursor.next();
    }



    Hope this helps

    Bye
    Thorsten


    #API-Management
    #webMethods
    #Tamino