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.  Java Help in Splitting a String

    Posted 12/15/10 05:56 AM

    Hi,

    I have received a csv file content as string. Now I want to split the string so that I can get the individual record and start processing.

    To split the recod I have used String.split(“\n”)

    I have tried with StringTokenizer st=new StringTokenizer(“\n”)

    Both are not giving the desired result?

    Any help in this?

    Cheers,
    Sasanka


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


  • 2.  RE: Java Help in Splitting a String

    Posted 12/15/10 10:52 AM

    why not use built in service pub.string:tokenize - this itself is a java service.

    -regards
    DC


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


  • 3.  RE: Java Help in Splitting a String

    Posted 12/15/10 03:58 PM

    Review the Flat File Schema Developer’s Guide. IS has facilities to parse the file for you and return records to your service for processing. No need to split/tokenize yourself.


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


  • 4.  RE: Java Help in Splitting a String

    Posted 12/21/10 06:29 AM

    Hi,

    You can use flatfile schema to convert CSV file to a Document.
    

    Use pub.flatFile:convertToValues and specify the flatfile schema.

    Regards,
    Nat


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


  • 5.  RE: Java Help in Splitting a String

    Posted 01/05/11 09:05 PM

    Here’s a link which explains the flat file conversion if you haven’t done it before.

    [url]http://webmethodssag.blogspot.com/2010/12/handling-csv-files.html[/url]


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