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.  logic needed to construct the xml

    Posted 10/02/12 10:21 PM

    Hi All,

    I have a requirement where I need to construct an xml by pulling the data from the database tables. The table has 2 fields ( eg: kit and sku).

    It will have values like below:

    [TABLE=“width: 96”]
    [TR]
    [TD=“width: 64, bgcolor: transparent”] kit[/TD]
    [TD=“width: 64, bgcolor: transparent”] sku[/TD]
    [/TR]
    [TR]
    [TD=“bgcolor: transparent, align: right”]1[/TD]
    [TD=“bgcolor: transparent, align: right”]25[/TD]
    [/TR]
    [TR]
    [TD=“bgcolor: transparent, align: right”]1[/TD]
    [TD=“bgcolor: transparent, align: right”]26[/TD]
    [/TR]
    [TR]
    [TD=“bgcolor: transparent, align: right”]1[/TD]
    [TD=“bgcolor: transparent, align: right”]30[/TD]
    [/TR]
    [TR]
    [TD=“bgcolor: transparent, align: right”]2[/TD]
    [TD=“bgcolor: transparent, align: right”]34[/TD]
    [/TR]
    [TR]
    [TD=“bgcolor: transparent, align: right”]2[/TD]
    [TD=“bgcolor: transparent, align: right”]35[/TD]
    [/TR]
    [/TABLE]

    Now, I have constructed the xml as below:

    The xml looks like this

    25


    26


    30


    34


    35

    instead of this

    25
    26
    30


    34
    35

    Please let me know the logic how to take the “kit” in the table as primary value and loop over the document.

    Thanks in advance.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: logic needed to construct the xml

    Posted 10/02/12 10:45 PM

    You need to build a temp_test(document) with in the table results set(loop) and and map the attribute and B elements and append to orig_test (documentList) and make sure you drop the temp_test document so that it wont carry overwrite the data.When you outside of the loop finally the orig_test (documentList) should contain all kit/sku values and then create xmldata you know the service to use:

    HTH,
    RMG


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: logic needed to construct the xml

    Posted 10/03/12 06:30 AM

    Hi RMG,

    Thank you for your response but if I use the same temp document and append it. I will not get the desired result.

    My requirement is to different the unique values ( here kit ) and its corresponding sku values to be appended together.

    As in my example below: I want the target xml to look like this

    25 26 30 34 35

    Not this way:
    The xml looks like this [ This is when I create ]

    25


    26


    30


    34


    35

    Sorry, If I am not able to explain this issue properly. Is this something that can be accomplished by finding out the unique values for column1? or something that can be done usin Hash tables.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: logic needed to construct the xml

    Posted 10/06/12 09:10 PM

    Hi David,

    I have created the flow that give the out put same as you need …here is the flow…

    Flow Overview
    [ATTACH=CONFIG]894[/ATTACH]

    please let me in case of any concerns…

    wmuserTest.JPG


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: logic needed to construct the xml

    Posted 10/06/12 09:30 PM

    more details

    2.1 Map doing nothing
    2.211 map mapping Document1
    Result Test1
    Key to @key

    and

    pub.list:appendToStringList

    Document1
    Result Test1
    value to value(string list)

    2.212 map
    pub.list:appendToDocumentList

    Test1 to Document

    2.222211 map

    pub.list:appendToStringList

    Document1
    Result Document
    value to value(string list)

    2.222221 map mapping
    Document1
    Result Test1
    Key to @key

    and

    pub.list:appendToStringList

    Document1
    Result Test1
    value to value(string list)

    2.223
    pub.list:appendToDocumentList

    Test1 to Document


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 6.  RE: logic needed to construct the xml

    Posted 10/08/12 07:59 AM

    Thanks so much…LifeforWM! Infact, I have achieved it by asking the DB team to populate the second set as a comma delimited when they store the values in the view so that I can simply tokenize on webMethods.

    But thanks for your reply. Much appreciated.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods