cancel
Showing results for 
Search instead for 
Did you mean: 

Receive file by FTP (Server is restricted to get command only)

Former Member
0 Kudos

Dear all,

I would like to receive a file from a very special FTP server. And I am not sure if the File Adapter is able to handle this:

The FTP server I wand to connect to is a very special one. This server allows only to log in and to receive a specific file. This means that the only allowed command is

get file.dat

It is not possible to change directory or to get the directory listing. When the file was received it is not necessary (and not possible) to delete the catched file. The FTP server notices that the file was received and removes its content. This means that the file will not be removed. So it is always possible to get the file. But in most cases the file is empty (but that should not be a problem - the File Adapter can handle or ignore empty files.).

From my point of view it seems that SAP XI 3.0 SPS17 does not support to interact with this special kind of FTP Server. In RWB I can see the following error message:

"An error occurred while connecting to the FTP server 'XXX.XXX.XX.X:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 500 -3002 : command : invalid command'. For details, contact your FTP server vendor."

I connected to this FTP server manually. I get this error message when I try a command which is not allowd by the FTP server ("ls" for example). So I guess that SAP XI uses "ls" before catching the file.

Do you have an idea how I can configure the File Adpater to work with this FTP Server properly?

Many thanks

Michael

Accepted Solutions (1)

Accepted Solutions (1)

michael-john_turner
Active Participant
0 Kudos

Hi Michael,

This is a tricky one. The set of required ftp commands that need to be supported to be RFC compliant is quite small (see RFC 959) but it seems that the file adapter assumes a certain minimum set (including CWD and LIST, both of which are optional).

There are several options, varying in complexity immensely:

1) Scripting the transfer process so that files are transferred to a local filesystem, from where they can be processed by XI

2) Adjusting the "special ftp server" so that it ignores commands it doesn't understand - I'm guessing this isn't possible?

3) Creating a "more relaxed" ftp JCA adapter, one that doesn't assume a certain minimum set of commands

4) Something else I'm not thinking of so early in the morning

Hope that helps a little...

Regards, MJ

Former Member
0 Kudos

Hallo Michael-John,

many thanks for your reply. In a first step a will contact the administrator of the FTP service. Maybe it will be possible activate the missing commands ("del" and "ls").

Best regards

Michael

Edited by: Michael Kletzin on Dec 7, 2010 11:25 AM

Answers (0)