Need to do FTP bGETb using IS 60 FTP Port

I have an FTP Port configured on IntegrationServer 6.0.1. I have an FTP Client that needs to do a ‘get’ on a file that already exists on the file system within the webMethods root directory. Is that possible?

(I realize that when doing a ‘put’ to the /ns/flowService directory, you can do a ‘get’ in the same session, but that only returns a .out file related to the file that was recently ‘put’ on the system. I just need to do a classical FTP get off the file system).

Stan,

Instead of using fileport,you can use (pub.client.ftp:put) builtin service that will grab the file from webMethods filesystem and transfer it to appropriate destination.

Hope this is what your requirement?

HTH.

Thanks for the input. Let me clarify the requirement though. The IS is serving as an FTP Server. My trading partner is doing FTP ‘puts’ to the IS, and I process the incomming files with a flow service. With this requirement, the trading partner’s client program that needs to do an FTP Get from the file system ( in a separate FTP session), and I would like for it to use the FTP port on webMethods. pub.client.ftp:put presumes webMethods is the FTP client, which is not true in my case.

Given that scenario, do you have any suggestions?

Thanks stan for clarifying,

Using FTP port configuration on webMethods,i dont think it has the ability to send out the file externally.
The similar fashion which your trading partner is doing FTP put on webMethods ns/flowservice,they can do a ftp get file from webMethods folders only if your system allows to trigger the file.

HTH,

Try this.

  1. ftp to host
  2. cd to admin, This will take you to your IS installation directory.
  3. From there you can get/put whatever you want.

Let us know if it works

I just found out that it will work only if the user is admin user. Thus it has obvious disadvantages.

Create a flow service that will do a pub.flow:getFile and return this file as output to the service. Then someone without admin privileges can do a put to the IS FTP port to invoke your flow service to get the file back. Obviously you don’t want to be giving them the ability to download webMethods server files, so you could load the specific file yourself or put the file somewhere else and let them pass in the filename that will be loaded from a secured directory.

Stan, we have been playing with this concept lately to trigger some of our integrations.
Have a look at the webMethods Flat File Schema Developers Guide (ISFlatFileSchemaGuide.pdf). The section “Submitting a Flat File to Integration Server via FTP” will explain how to do what you want.

Just a couple tips. Make sure you connect to the FTP port with an ID/PW that has the appropriate privileges. When I opened my FTP connection to the I.S. FTP port I used the id Default (no password). I did a put of my trigger text file and got the following error:
553 ‘trigFile.txt;application:x-wmflatfile’: cannot write.
If you get this error you need to either login with an id/pw that has enough privileges to run the flow services, or adjust the ACL privileges within the flow service.

If you want to pass data from the file into the flow service, your service needs to specify an input value called ffdata (type Object). Your flow service will then have to convert the Object into a String or Values. For example, you can use the built in services:
pub.io:streamToBytes
and then
pub.string:bytesToString
this will convert your input stream object into a String. There are other built in services available to convert the stream (eg. pub.flatFile:convertToValues)

I hope this helps.

Regards,

Wayne

Will Kriski, thanks for your tip on doing a getFile. Can you clarify for me? I tried doing the getFile in the flow service that gets executed on an ftp put. Once the flow service does the getFile, it places it in an output field, but nothing gets returned to the ftp client after doing the put. The only thing i can do a ‘get’ on, is the inputfilename.out file (which is the behavior explained in the webMethods docs).

Am I doing something wrong?

Hi,

I have the problem that when I try to send a file to a WM ftp Port, calling a flow service, the integration server list the following error: 2005-05-17 12:59:02 GMT+02:00 [ISC.0076.0007W] XMLCoder decode invalid data type
: wm.server.net.FTPInputStream.

This is while the ftp put command (using dos prompt) is successful.

I send a plain txt file. What is the command for sending a file? I just “put myFile.txt”. Will the server automatically assign the contents of this file to the ffdata input field of my flow service?

Thanks!