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 all fields

    Posted Thu March 08, 2007 05:04 PM

    Hi All! This is my firts post. I’M working with webMethods since just a few weeks.

    Here is my question:

    Is there a way to loop over all fields of an XML document? I want to trim all fields, and the only method I can see is to manually apply a trim function on each field.

    Thanks!


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


  • 2.  RE: Loop over all fields

    Posted Thu March 08, 2007 08:13 PM

    If you are manipulating XML document you will definitely be looping over the document. It is a good idea to have trim function as a transformer for all fields to minimize processing time in single map step. I am not sure we have any other options.


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


  • 3.  RE: Loop over all fields

    Posted Thu March 08, 2007 09:27 PM

    Be careful about equating the number of steps to processing efficiency.
    Invoke vs. transformer
    Efficiency of transformers

    I vaguely recall a thread about traversing an IData document (visiting every field all the way down the structure) and performing an action, such as trim. I can’t seem to find it now but maybe my mentioning it will trigger someone’s memory. If not, you should be able to create a Java service that will traverse an arbitrary IData object using recursion. You’ll want to make sure you call trim only on nodes that are strings.


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


  • 4.  RE: Loop over all fields

    Posted Fri March 09, 2007 11:58 AM

    Believe writing a Java service should be fine & easy.

    My 0.02.

    HTH
    Malhar


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