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.  Simple XQUERY update replace problem (non experienced user)

    Posted Tue March 06, 2007 03:36 PM

    I got a little problemmm…
    I got the following 2 documents inside the database:

    1
    MLSonline
    Connect
    2007-03-06 14:47:01.968

    2655
    Testlieferant

    2000-01-20 00:00:00.000

    Processing


    2
    MLSonline
    Connect
    2007-03-06 14:47:21.125

    2655
    Testlieferant

    2000-01-20 00:00:00.000

    Processing

    Now i wanted to update some elements of the first document:
    update for $a in input()/MLSSyncHistory
    where $a/SyncID = “1”
    do (
    replace $a/EndDate/text() with (“2007”)
    replace $a/CacheType/text() with (“SuperFull”)
    replace $a/LastModNew/text() with (“MistakesAllOvertheWorld”)
    )

    i can run the update query in Interactive Interface, there is no error. But the content arent updated…any idea?


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: Simple XQUERY update replace problem (non experienced user)

    Posted Wed March 07, 2007 05:31 AM

    Try:

    
    declare namespace tf = "http://namespaces.softwareag.com/tamino/TaminoFunction"
    update for $a in input()/MLSSyncHistory 
    where $a/SyncID = "1" 
    do ( 
    replace $a/EndDate/text() with tf:createTextNode("2007") 
    replace $a/CacheType/text() with tf:createTextNode("SuperFull") 
    replace $a/LastModNew/text() with tf:createTextNode("MistakesAllOvertheWorld") 
    ) 

    or

    
    update for $a in input()/MLSSyncHistory 
    where $a/SyncID = "1" 
    do ( 
    replace $a/EndDate with <EndDate>2007</EndDate>
    replace $a/CacheType with <CacheType>SuperFull</CacheType> 
    replace $a/LastModNew with <LastModNew>MistakesAllOvertheWorld</LastModNew> 
    ) 

    #Tamino
    #webMethods
    #API-Management


  • 3.  RE: Simple XQUERY update replace problem (non experienced user)

    Posted Wed March 07, 2007 10:03 AM

    thanks.
    But its the same, problem isnt solved.

    both of the queries are running without any failed information.
    But the instance has never been updated…


    #API-Management
    #Tamino
    #webMethods


  • 4.  RE: Simple XQUERY update replace problem (non experienced user)

    Posted Wed March 07, 2007 10:55 AM

    If i update one single element, then its working, see this query:

    update replace input()/MLSSyncHistory[SyncID=“1”]/EndDate
    with 2007

    but if i try to update all elements in one query, then its not done (see above posted message)


    #webMethods
    #Tamino
    #API-Management


  • 5.  RE: Simple XQUERY update replace problem (non experienced user)

    Posted Wed March 07, 2007 01:02 PM

    Sorry.

    My response was misleading as I hadn’t realised that the problem is related to whether the nodes have content or not.

    So it doesn’t matter whether TII or an API had been used.


    #API-Management
    #webMethods
    #Tamino


  • 6.  RE: Simple XQUERY update replace problem (non experienced user)

    Posted Thu March 08, 2007 09:51 AM

    Hi,

    when I test the second update statement

    
    update for $a in input()/MLSSyncHistory
    where $a/SyncID = "1"
    do (
    replace $a/EndDate with <EndDate>2007</EndDate>
    replace $a/CacheType with <CacheType>SuperFull</CacheType>
    replace $a/LastModNew with <LastModNew>MistakesAllOvertheWorld</LastModNew>
    ) 

    it works fine. Which version of Tamino are you using?

    Regards

    Harald


    #API-Management
    #webMethods
    #Tamino