webMethods

webMethods

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.  Query in Java Client API

    Posted Fri October 12, 2001 09:08 AM

    Hi,

    I’ve written a query somthin like

    http://localhost/tamino/MyStore/Telephone/Telephone?_xql=Telephone[LoginName=‘Weber315’]

    and I get a record using the Browser.

    When I try the same in the Java Client like

    TaminoResult tr = tamino.query(“Telephone[LoginName='Weber315']”);

    I get no records.

    Regards
    Pushparajan


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


  • 2.  RE: Query in Java Client API

    Posted Fri October 12, 2001 11:17 AM

    Hi,

    a good way to figure out what might be going wrong with queries is to take a look at the webserver’s access log. Since the Java API “merely” wraps a HTTP command, chances are that the _xql= shows up in the log, and you see where the trouble comes from.

    (in this case I find the escaped single quote inside the string delimiter very suspicous …)

    Best regards, Andreas


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


  • 3.  RE: Query in Java Client API

    Posted Sat October 13, 2001 02:47 AM

    Hi,

    I checked the access log file, I makes entries of those accessed directly by the browser and the connect entries from the JAVA API, the following queries are not logged.

    the following does not fetch results
    TaminoResult tr = tamino.query(“Telephone[Lastname="Weber"]”);
    OR
    TaminoResult tr = tamino.query(“Telephone[Lastname=Weber]”);

    and the following retrieves the record.

    TaminoResult tr = tamino.query(“Telephone[EntryID=315]”);
    (Both are text nodes)

    Is it a problem with the way I handle strings or Is this a bug.

    Regards
    Pushparajan


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


  • 4.  RE: Query in Java Client API

    Posted Sat October 13, 2001 04:10 AM

    Hi,

    I used the ~ operator and have the correct result.

    Telephone[LoginName~=“Weber315”]

    Regards
    Pushparajan


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


  • 5.  RE: Query in Java Client API

    Posted Mon October 15, 2001 12:29 PM

    Hi,

    Did you try single quotes (') instead of double ones (") and not escaped with a backslash?

    TaminoResult tr = tamino.query(“Telephone[LoginName=‘Weber315’]”);

    (I didn’t try it, so it’s just a guess)

    regards,
    Pieter


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


  • 6.  RE: Query in Java Client API

    Posted Wed October 17, 2001 04:20 AM

    Hi,

    I did try ’ but does not work with the java client API.

    thanks
    Pushparajan


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