Community
Participate
Working Groups
Some remote FTP system types might require additional commands to be sent for initialization, before RSE can properly communicate with them. For instance, an an AS/400 (System i), the following command is necessary after logon: quote site namefmt 1 It supposes to change the file system to IFS, see also http://dev.eclipse.org/mhonarc/lists/dsdp-tm-dev/msg01537.html In the ftpListingParsers extension point framework, we already have a means to match remote system types against custom extensions for listing parsers. It seems logical to add a new optional slot to this extension point: initCommands which allows users to specify commands like the one above, which need to be issued right after logon to the FTP server (and after the remote system type has been determined). It should be possible to specify multiple commands to be sent right in the extension.
This seems a simple change which would make us a whole lot more flexible. Should plan for it in time for API freeze (M4).
Did not make the fix for M4, targeting 3.0M5
Retargeting M6. Anyone in the Community want to step up? Javier is pretty busy currently.
Since it would be good to have multiple commands, we could use '|' as a control character to split the "initCommands" string passed through the extension point. This character is not allowed as a filename in Windows and I expect the same in other OS's as it's used for piping, so it minimises having conflicts when splitting multiple commands. For example, in case wanting to send the following initial commands: > PWD > quote site namefmt 1 The initCommands attribute should contain "PWD|quote site namefmt 1" Any better suggestion ?
Hm... I first thought I think I'd prefer a ';' character as separator since it is often used as command separator in shellscripts already. But on the other hand, VMS uses it as version selector e.g. TYPE [FOO.DIR]MYFILE.TXT;13 so the | might be better after all. Or, what about doing the command list as XML markup? That would save us from worrying about invalid characters and quoting altogether. Yet another option would be embedded newlines as command separator.
We could use XML syntax, for example: <command>PWD</command><command>quote site namefmt 1</command>
Seems like the best solution to me. Does PDE provide proper UI tooling for ordered lists in XML, in the plugin.xml editor?
(In reply to comment #7) > Seems like the best solution to me. Does PDE provide proper UI tooling for > ordered lists in XML, in the plugin.xml editor? > No, it looks like there's no support for string lists in plugin attributes (please correct me if I'm wrong) Since having XML processed within FTPService seems a bit overkilling, I'd prefer going for the character separated commands.
I have committed the modified extension point using '|' as a command separator. In case a better solution is found, the way of processing the initCommands list can be changed after M6, since it won't require an API modification.
Created attachment 94018 [details] Patch to list initCommands by XML markup I managed to do a list of init commands by XML markup - it was actually really easy with the Extension Point Schema Editor. Right-click > new > Sequence; New Element; Associate Sequence with Element; Right-click > new > Attribute. I really think that this is better than any artificial character as separator, since the UI tooling can be used and we don't need to worry about quoting. Can you please add the necessary code to parse the XML markup and pass it into the service.
Reopen to improve initCommand markup handling
Yes, much better providing a the initial commands as a sequence. I'll make the changes so the commands are parsed and passed to the FTP service as an array of String rather than a String with a character separator.
Now the initial commands are passed as a sequence in the extension point and the FTP service receives a String[] containing them.
Created attachment 94349 [details] Patch adding the "site namefmt 1" command for OS/400 Attached patch adds the "quote site namefmt 1" command to our standard OS/400 FTP Parser, as specified in comment 0. I'm committing this fix right away, could anyone test and verify it on an OS/400 machine?
From E-Mail: I used this driver to connect to one of the iSeries box, and the following is what I got in the console. It seems the "quote site namefmt 1" command is sent, but not recognized by the system. If I tried to use "ftp xxxx.xxx.ibm.com" command in the dos prompt to connect to this system, the command "quote site namefmt 1" executed correctly. I got message : 250 Now using naming format "1". It looks like the "quote" should not be sent when directly talking to the host. I've changed the plugin.xml accordingly, to avoid the "quote". I've committed this change and started a fresh I-build. I20080402-1100 should become available later today, in an hour or so, Xuan could you please verify with that one: http://download.eclipse.org/dsdp/tm/downloads/drops/I20080402-1100/
Martin, I sync up with the cvs, and give it a try again. This time, it is better. I could see the files/folders right under the "/" directory in. But I could not expand any folders under it. I got this error: Folder /home is not readable. Cannot expand. But I do have enough authority on the system to access to home and all its sub folders.
Thanks Xuan. What does the FTP Console show?
If I remembered correctly, I did not see anything extra in the console. I will double check it.
Just checked, no additional output in the console if I expand the home directory.
Hm, odd. This would mean that the query is not made at all. Guess we'll need to debug that at some point. I filed bug 225821 to track this.