Topic
3 replies Latest Post - ‏2012-03-27T03:56:56Z by Srikanth_KM
vivd
vivd
2 Posts
ACCEPTED ANSWER

Pinned topic WebSphere outbound file adapter - Array of objects - Line breaks

‏2012-03-21T02:24:30Z |
Hi,
I have an array of objects within an object and I would want to write each of these objects in a new line. How would I do it.

My BO structure

Vehicles
- array of cars
- array of trucks

I would want a line break between each car object and same with the array of trucks.

I am using a CSV delimiter and as of now the entire content is written in one line.

Thanks in advance.
Updated on 2012-03-27T03:56:56Z at 2012-03-27T03:56:56Z by Srikanth_KM
  • Uma k Korukonda
    Uma k Korukonda
    1 Post
    ACCEPTED ANSWER

    Re: WebSphere outbound file adapter - Array of objects - Line breaks

    ‏2012-03-21T03:59:29Z  in response to vivd
    You can use SplitBySize or SplitByDelimter (I mean splitCriteria).
    • vivd
      vivd
      2 Posts
      ACCEPTED ANSWER

      Re: WebSphere outbound file adapter - Array of objects - Line breaks

      ‏2012-03-23T03:09:38Z  in response to Uma k Korukonda
      Thanks Uma. Could you please give me an example. As far as I understand the file adapter serializes the complete object (along with the child objects) into CSV (incase of CSV delimiter) into one single line. Just wondering if I need to you write a wrapper class for the splitFunction.

      Along the same lines, wanted to know how could I make one of the child objects NOT to be written out to the file by the file adapter if the object is null.

      Cheers.
  • Srikanth_KM
    Srikanth_KM
    3 Posts
    ACCEPTED ANSWER

    Re: WebSphere outbound file adapter - Array of objects - Line breaks

    ‏2012-03-27T03:56:56Z  in response to vivd
    Hi,

    If you would need a line break for each of the car object and truck objects, (within a BO) , then you would need to use the new line as the delimiter with the Delimited data handler instead of the CSV datahandler.