I need to receive a ftp’ed file in web methods and then to process further, the input format of that ftped file is comma delimeted…can anyone suggest me the proper service for that… is that getTransportInfo service gets only the protocol information only?, can i get the content of ftped file using that service???
Once you ftped the file to the ns/service, basically your service input should be ffdata(object stream),so in your flow use streamTobytes,bytesToString(flatfile content) further down use WmFlatFile Adapter and create FFSchema (for .csv data) and parse with wm.flatfile:convertToValues …continue with your mapping what ever your flow says.
And yes getTransportInfo service will just give the protocol information,contenttype,filename information in the pipeline.
So basically the input from the ftp'ed data will be a node(object) right? then i have used txtContentHandler service to convert to proper data, I need the content of the ftp'ed data(comma delimeted) to be stored in a record structure.will it stored automatically?
I need to know how the Comma delimeted file is received and unpacked into data records?
hI,
i am using IS4.6. How about using the tokenize service ? i have used getTransportInfo ,txtContentHandler services for getting the ftp’ed data(comma delimeted file) and then i have used tokenize service for getting the data into the record structure…Thanks for ur quick response.Will it work fine?
Guhan
Be careful when using tokenize for this purpose. It uses the Java tokenize facilities under the covers, which collapses multiple separators into one (as would exist when one or more fields in a record are empty). Thus, it doesn’t behave the way you probably need it to behave.
If the fields in the records are empty then i replaced it with “X”. I have tested it and seems to be working nice and i have got the record structures with proper data in it.Thanks for ur suggestion, more help is also welcome.
guhan
Are you manually placing “X” in the empty fields? How will this approach work in a production environment? How will you know to strip out the “X” before passing these bogus values on to the target? Would recommend you use the FF adapter and avoid the tokenize approach. There are too many issues.
Im using String replace service for identifying the null values,search string is “,” replaced by x. We have already used this kind of approach in production server. i will try to avoid tokenize. can u send me the code for FF adapter(comma delimeted file from ftp needs to be stored in record structure). Thanks for ur suggestion Eamon.
The Flat-file Adapter is a standard package within Integration Server. The documentation covers how to use it to read and create comma-delimited files.
Hi RMG,
I have added a Flat file in the polling directory and called a service from the admin …I would like to know as to how does 1 read the contents of the file in the service …
What is passes in the pipeline for the service being called from the polling …
Need your help …