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.  CHECKING EXISTENCE

    Posted Thu November 28, 2002 02:16 PM

    I have an xml with Users root element and some nested element like UserID, my desire is to check if an userID exist in these data.
    So, if i do the query /Users/UserID=“someuserid” or //UserID=“someuserid” i don’t get an entire xml object and so the check response.hasFirstXMLObject() cannot be done an so i tried with resp.hasQueryContent()but it returns always true indipendently that the specified user is in the xml or not.
    Why?
    Can anyone help me?

    BRGS @nto


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: CHECKING EXISTENCE

    Posted Thu November 28, 2002 04:11 PM

    Please, try the query
    Users[UserID=“someuserid”]
    or
    Users[./UserID=“someuserid”]
    or
    Users[//UserID=“someuserid”]

    in order to get the complete Users document.

    Regards.


    #webMethods
    #Tamino
    #API-Management


  • 3.  RE: CHECKING EXISTENCE

    Posted Thu November 28, 2002 04:32 PM

    It works.
    So if i have to select a particular element in a document have i always to structure the query in the way the it will return an entire xml object?
    This is the actual Tamino limitation?

    ThxS
    @nto


    #webMethods
    #API-Management
    #Tamino


  • 4.  RE: CHECKING EXISTENCE

    Posted Thu November 28, 2002 05:37 PM

    No, that is not a Tamino limitation.

    With your query: Users/UserID=“someuserid”
    you are asking Tamino something meaning “Are there any Users document which has a node UserID with value “someuserid”??”

    and Tamino answers you:
    xql:resultTRUE</xql:result> (or FALSE)

    With my queries I am asking Tamino “give me the documents that have the value “someuserid” in the node UserID”.

    If you need only to retrieve the UserID node, the correct query is (one of the possibilities):

    User[./UserID=“someuserid”]/UserID

    More information in Tamino Documentation (X-Query) and the XPath documentation :wink:

    Regards.


    #API-Management
    #Tamino
    #webMethods