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.  insertBefore

    Posted Tue November 06, 2001 04:34 AM

    Folks:

    Does anybody has some sample code on how to use “insertBefore” API in Tamino Client ?

    Unclear about the “relative URL” part. I keep on getting “Element/Attribute not found” error.

    –Naren


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


  • 2.  RE: insertBefore

    Posted Tue November 06, 2001 12:29 PM

    Hi,

    insertBefore() takes three parameters, and heres a bit of explaination of each:

    relURL - this is the relative URL to the document that is being updated. So this URL has to refer to an actual document, e.g. say if you have a document and you know its ino:id is 1 then the relative URL would be:

    String relURL = “/collection/doctype/@1” ;

    xpath - this is an XPath query that references within the aforementioned document (so not a X-Query statement) where to make the modification. e.g. If I had a document :

    xxx

    and I wanted to insert before a node then the xpath would be:
    String xpath = “a/b” ;

    node - this is of type org.w3c.dom.Node and you use DOM methods to construct it.


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


  • 3.  RE: insertBefore

    Posted Thu November 08, 2001 09:14 PM

    Hi Stuart:

    Thanks for the info.

    I tried “insertBefore” and I keep on getting following in tamino result -

    Message Text: No message received
    Message Line: null
    Ino Code : INOXME8554

    and the node never makes it to the document.

    This is my document -




    I have only one document in the collection.

    I am using following for relUrl -

    relURL - POCollection/polist/@1

    POCollection - is the name of my collection
    polist - is the doctype (figured this out by reading the schema file)
    @1 - because I have only one doc in the collection (tried “0” as well didn’t work)

    Is this the right way to use relUrl ?

    Also, tried several combinations of xpath ?

    Any suggestions…

    –naren


    quote:
    Originally posted by Stuart Fyffe-Collins:
    Hi,

    insertBefore() takes three parameters, and heres a bit of explaination of each:

    relURL - this is the relative URL to the document that is being updated. So this URL has to refer to an actual document, e.g. say if you have a document and you know its ino:id is 1 then the relative URL would be:

    String relURL = “/collection/doctype/@1” ;

    xpath - this is an XPath query that references within the aforementioned document (so not a X-Query statement) where to make the modification. e.g. If I had a document :

    xxx

    and I wanted to insert before a node then the xpath would be:
    String xpath = “a/b” ;

    node - this is of type org.w3c.dom.Node and you use DOM methods to construct it.



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


  • 4.  RE: insertBefore

    Posted Fri November 09, 2001 10:23 AM

    Do you you have the nodelevelupdate filter installed on your server?

    If not it won’t work


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