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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  pub.list:sizeOfList

    Posted 02/16/12 01:12 PM

    pub.list:sizeOfList is failing and the error it produces is :com.wm.data.ISMemDataImpl cannot be cast to [Ljava.lang.Object;

    Can anyone tell me what this error means?? I am passing the data from a listdocument to this service and capturing the output as size of a list in a sting variable.


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


  • 2.  RE: pub.list:sizeOfList

    Posted 02/16/12 01:34 PM

    Hi Monica,

    are you sure you are passing an array object to sizeOfList. the error means that the input to the sizeOfList is not a List object…

    HTH


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


  • 3.  RE: pub.list:sizeOfList

    Posted 09/25/12 02:47 PM

    I am facing a similar issue.

    I have XML data as input to a service and it contains a document list somewhere inside. i use a pub.list:sizeOfList to get the size of this list (i have done XMLStringToXMLNode and XMLNodeToXMLDocument).

    the service runs well when the input XML has multiple records for the document list,
    but when the input XML file contains only one record in the document list, i get an error:

    java.lang.ClassCastException: com.wm.app.b2b.services.CValues
    at pub.list.sizeOfList(list.java:361)

    Can anyone suggest what could be the problem?


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


  • 4.  RE: pub.list:sizeOfList

    Posted 09/25/12 07:21 PM

    In the call to XMLNodeToDocument you need to specify the IS document type name that the XML conforms to. That way the service will know to create a list even when only one entry is present.


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


  • 5.  RE: pub.list:sizeOfList

    Posted 09/26/12 08:11 AM

    Thanks Rob !! that was the perfect solution :slight_smile:

    Specified the IS doc type and makeArrays=false

    Thank you


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