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.  Pleas Help

    Posted Thu June 26, 2003 11:07 AM

    Hi All,

    Can anyone help to insert multiple records which is available in an
    XMLString.Basically couuld you please suggest an Flow Steps for my task.

    Since i am new to this , looking forward your reply from all,

    My XMLString:

    <prlnno>10<prlnno>
    <price>230</price>
    <prlnno>20<prlnno>
    <price>890</price>

    So basically above content should be inserted in an Table which has the fields as follows:

    Table name : WMPRDT
    Field name : prlnno,price

    and my output should be , Record must be inserted as Two Rows liks as follows,

          prlnno         price 
    

    Row1 : 10 230
    Row2 : 20 890

    Hanging on this for long time ,

    regards
    Brick


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


  • 2.  RE: Pleas Help

    Posted Thu June 26, 2003 12:26 PM

    Hi Brick,

    The problem is the XML string you are using. Now you get two stringlists (prlnno and price) after running stringToDocument and documentToRecord. Also your <prlnno> tag is not closed correctly it should be </prlnno>.

    So there are two solutions:

    1. The best one: generate a correct XML document and then run stringToDocument and documentToRecord services.

    <doc>
    <record>
    <prlnno>10</prlnno>
    <price>230</price>
    </record>
    <record>
    <prlnno>20</prlnno>
    <price>890</price>
    </record>
    </doc>

    1. Get each time the same index from the two stringLists with the pub.list.getStringListItem service.

    Regards,
    Hugo


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