FTP file polling and transport query

I have added a Flat file in the polling directory and called a service for the same … …I would like to know as to how does one read the contents of the file in the service or How do i read the files contents from the service ?What are the file contents passed in the pipeline for the service being called from the transport ???

Would Appreciate your help …

regards
Dhiraj Shetty

Dhiraj,

Your polling service input should be ffdata(object stream)for handling flatfiles via filepolling mechanism or ftped to a service.The flow steps for reading/parsing inbound flat file are pub.io:streamTobytes(map ffdata object to input),
pub.string:bytesToString(extracts flatfile string),
pub.flatfile:convertToValues(parse the flatfile using FFSchema that you have created depends on the flatfile layout).

HTH
RMG

Hi RMG,
My ffData input in the pipeline is BufferedInputStream and after going thru your reply i implemented the same but i get a ClassCastException when converting into pub.io:streamTobytes …
Please guide …

regards#
Dhiraj

Hi RMG,
Thanks for your valuable input …There was an error in Naming my ffData variable (as against ffdata ) … Rectified the same …Now its working fine …

regards and Cheers
Dhiraj Shetty

yes ffdata object stream is the way to go,anyways it was good to know that you have rectified.

HTH,
RMG