How to read contents of a xml file from an ftp site and store it in some idata obj ..

Hello friends,
Can anyone tell me how to read an xml file from an ftp site and store contents of it in some IData or say some Document object in webmethods.

using ftp in webmethods i know how to transfer file to some local directory or say how to rename a file in ftp .
but i have less idea of above thing , little help or idea will be appreciated .
thanks in advance


I believe this is the same question that you asked in the post: If so, I don’t quite understand your requirement to temporarily store the file… can you not convert the contents of the xml file synchronously, after getting it through ftp? Why do you need to store it? :-/

Anyhow, if you MUST store the xml file, before performing transformations on it and sending it to JMS topic/queue, you can do so by writing the file to the fileSystem using a Java service. There’s a java service in the WmSamples package that writes a file to the filesystem.

HTH, Rohit

hey taureen,
my requirement is not to store the XML file , but to read or say extract contents of the XML file which is there on an ftp site and then work on it. so for that i will have to read the contents of the xml file and store it in some Idata object or say docuent object , please correct me if i am wrong.
So how do i acheive this, i mean reading contents of an xml file so that i can further work on it .

hey taureen,guys, i got my answer, i was basically looking out for pub.file:getFile, sorry for quoting my question wrong.

I basically wanted to read contents of file , where ever it may be not necessarily on ftp . so what i am doing is first transferring file from ftp to local dir and then using pub.file:getFile reading its contents