Need help on GetFile method in developer 6.5

Hi Frienz…

I am very new to webMethods developer 6.5, I got explored to work on flat file schema where i am pulling data from flat file and sending it to database… till this part i am perfect (as per my requirement) … but here i got a problem … whenever a file gets generated at other end i am ftping that and running webMethods at my end … as of now it is manual but needs to make it as automatic … I have used schedular and did it…
The real problem is … when file gets generated the name will be appended with time stamp but in GetFile i have fixed the filename and it is not allowing me to pass “filename*” .

quick turnaround is highly appreciated …

Thanks
Sra1

OK to make the ftp process automatic , u need to screate a scheduler service ,

  1. which logs into the ftp server ,
    2)then u use pub.client.ftp:ls service to list the files ,
  2. use pub.client.ftp:get service to get the files.

once the files are on your location , before u call getfile service , u need to write a java service which takes input the directory name and gives u the names of files in the directory . u can use the names from the above java service to get the file and do your processing .

HTH
srikanth

Hi Srikanth,
Thanks for the reply … as i said i am very new to webMethods can you pls tell me how to write a java service … if psbl can you pls paste me some sample code/steps …

Thanks
Sravan

Sravan,

You may not need to write Java service to get the file names in a specified directory. pub.client.ftp:ls service will return dirlist, which is a documentList. You can loop over dirlist and check whether it is “filename*” or not. If this check returns true, you can call pub.client.ftp:get service to get the content of the file.

Thanks,
Sukanta

There are also strategies available where you don’t have to poll the FTP server for files and instead can process them when they are put to IS. Refer to the docs for info.

Hi Frienz…
Thanks for the quick reply… I am working on it …

once again thanking you … Sra1