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.


#TechXchangePresenter
 View Only
  • 1.  Concat all elements found with Space -- Need help in Mapping

    Posted Fri April 26, 2013 10:41 AM

    I am mapping from an IDoc to an XML format, in the Idoc I have a document list say

    data (Document List)

    data[0] (Document)
    name (String)
    value (String) = Hello World
    
    data[1]
    name
    value   = This is concat testing
    
    data[2]
    name
    value    = I need help
    


    data[n]
    name
    value    = Thanks in advance
    

    I need to map them to a target XML format

    My requirement is I have to concat all elements (value) found with a space in between each up to 35 characters.

    Once that limit is reached start with a new/data element as it can be sent multiple times.

    The target xml should be

    Hello World This is concat testing I
    need help Thanks in advance

    Any help is appreciated.


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


  • 2.  RE: Concat all elements found with Space -- Need help in Mapping

    Posted Mon April 29, 2013 04:30 AM

    Loop over the Idoc list and append all the ‘values’ to one single string.

    Later you can use the substring method to break it to 35 characters of each length by knowing the size of the string or either write a java service to break it to 35 characters each.

    -Senthil


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


  • 3.  RE: Concat all elements found with Space -- Need help in Mapping

    Posted Mon April 29, 2013 12:12 PM

    To do this is flow will be really tricky and personally I would suggest you should develop a Java service to this.


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


  • 4.  RE: Concat all elements found with Space -- Need help in Mapping

    Posted Tue April 30, 2013 10:24 AM

    @Stuart Fyffe-Collins how can I write util service for this in java, can you please elaborate more.


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


  • 5.  RE: Concat all elements found with Space -- Need help in Mapping

    Posted Fri May 03, 2013 03:49 PM

    In Designer you can create Java services as well as Flow services. If you specify input and output pipeline variables and save the Java service, you can then generate the skeleton Java which manipulates the pipeline. All that is then required to do is to develop the specific Java code which does the string manipulation. If you don’t know Java programming then this will be somewhat tricky for you, hopefully you may have a colleague who can help with that part.


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


  • 6.  RE: Concat all elements found with Space -- Need help in Mapping

    Posted Thu May 09, 2013 03:24 AM

    Thanks Senthil,Stuart for looking into this. Using util services I have converted string-list to a single string and later I broke the string to the required characters.


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