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.  Loop over XML based arrays

    Posted Tue June 15, 2004 08:01 PM

    Hi,

    I am using an XML-document as a source of properties in a service that I am writing in WM 4.6. The XML-document is converted to a record using “getFile”, “stringToDocument” and “documentToRecord”. I am then looping over a recordlist (in-array) in the created record and using another recordlist as out-array.

    The problem that I have encountered is that when there is just one element in the array that I am supposed to loop over the array is no longer an array! Instead it is showed just as a record (and not a recordlist) and the looping is therefore not possible.

    Any suggested solutions to this problem are highly appreciated!

    Br

    //Erik


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


  • 2.  RE: Loop over XML based arrays

    Posted Tue June 15, 2004 11:31 PM

    In your documentToRecord service:

    1. Set the arrays value to the name of your input XML RecordList.
    2. Set the makeArrays value to true.
    • Step 1 may be unnecesary if you are specifying the recordName value which conforms to a record definition/structure that you have created.

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


  • 3.  RE: Loop over XML based arrays

    Posted Tue June 15, 2004 11:40 PM

    Erik,

    Piara solution will work,and also anytime please use the search functionality in this site,since lot of threads have been discussed on this problem.So this will minimise the duplicate threads.

    If possible take some time to register your self and become a member of this site,welcome wmusers!!!

    Regards,


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