webMethods

webMethods

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
Expand all | Collapse all

How to Convert ObjectList to StringList

  • 1.  How to Convert ObjectList to StringList

    Posted Wed May 26, 2010 11:18 PM

    Hi All,

    I have a javaservice which gives the fileNames as a ObjectList. Now I want to convert this into StringList.

    When I am looping on the fileNames and calling bytestoString it is giving me the error “bytes must be byte”. I tried streamtoBytes…it has given “typeCastException”

    Can someone help.

    Regards,
    David


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


  • 2.  RE: How to Convert ObjectList to StringList

    Posted Wed May 26, 2010 11:54 PM

    Why your JavaService does not already reply with a StringList?

    Open your JavaService with developer, in the output insert a StringList, for example named “StringListOutput”.

    Now under menu tools → Generate Code → Select your service → Generate code: For implementing this service → Output → All fields.

    Now your clipboard has this:

    Now in your service fill in the StringList !


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