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.  Webmethod java Service for Sorting doc list

    Posted Thu April 12, 2012 11:48 AM

    while i am using the below IData Object for sorting
    IDataUtil.sortIDataArrayByKey(itemList, keyField, IDataUtil.COMPARE_TYPE_COLLATION, null, sortDescending);

    it sorts the numeric values based on the digit we given,

    For example if we give 120,110,650,540 it wrks finee …

    if we give 20,120,85,650,450 it given wrong sort list.

    my requirement is sorting doclist…

    is there any one know any other idataobjects is there for sorting??

    appreciate ur comments…:slight_smile:


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


  • 2.  RE: Webmethod java Service for Sorting doc list

    Posted Thu April 12, 2012 02:12 PM

    define input as list
    use Arrays.sort(List);

    Of course you have to check for numeric or non numeric.


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


  • 3.  RE: Webmethod java Service for Sorting doc list

    Posted Thu April 12, 2012 07:06 PM

    Search the forums for previous posts on this topic.


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


  • 4.  RE: Webmethod java Service for Sorting doc list

    Posted Thu April 12, 2012 09:18 PM

    that’s finee,for that i need to convert doc list to string list,then i need to chk numeric and non numeric and applying sorting logic for both in different manner.i am looking for some kind of inbuilt funtions,for direct sorting…like above i mentioned…


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


  • 5.  RE: Webmethod java Service for Sorting doc list

    Posted Sun April 15, 2012 06:37 AM

    You can find “sortDocumentList” service in PSUtilities package…


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


  • 6.  RE: Webmethod java Service for Sorting doc list

    Posted Mon April 16, 2012 04:27 PM

    Be careful with the sort in PSUtilities. When sorting numerically, it converts strings to doubles which may give unexpected results due to inaccuracies associated with using float/double.


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