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
  • 1.  csv, tokenize

    Posted Tue February 05, 2013 01:49 PM

    I’m trying to treat a csv file. to read the contents invoke:

    getFile, and then mapping to “tokenize” but I get no result.

    If I insert the contents of file in the input field “inString” of service “tokenize” itworks ok.

    [ATTACH]916[/ATTACH]
    example.doc (60.5 KB)


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


  • 2.  RE: csv, tokenize

    Posted Tue February 05, 2013 05:43 PM

    You should investigate the use of the flat file services instead of trying to parse this yourself.

    Tokenize likely has behaviors that you don’t want, such as collapsing multiple delimiters into one field.

    What are the inputs you’re using in the getFile call?


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


  • 3.  RE: csv, tokenize

    Posted Wed February 06, 2013 09:52 AM

    Inputs en getFile:

    [FONT=PalatinoLinotype-Italic][SIZE=3][FONT=PalatinoLinotype-Italic][SIZE=3]filename → /home/xxxx/rr.csv[/size][/font]

    loadAs -->string

    encoding–> nothing

    bufferSize–> nothing

    I have three rows in a file for each row and I want to call a service. I think the tokenize can serve this purpose.

    [SIZE=3][I]You can show a simple example? Thank you very much!

    [/SIZE][/SIZE][/FONT][/I]


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


  • 4.  RE: csv, tokenize

    Posted Wed February 06, 2013 09:17 PM

    Based upon the inputs there isn’t anything obvious as to why passing the string to tokenize wouldn’t work.

    But I would again recommend using the flat file services to do this. And I would definitely recommend against tokenize.


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