|
Re: ECF Filetransfer Example [message #1701938 is a reply to message #1701888] |
Thu, 16 July 2015 22:02 |
Scott Lewis Messages: 1038 Registered: July 2009 |
Senior Member |
|
|
Markus Duft wrote on Thu, 16 July 2015 09:07Hey,
Is there an example for how to do a very, very simple integration of ECF filetransfer? We just want to send a file from one JVM to another one. One serves, one downloads.
We failed to find any documentation or examples. Protocol would not matter that much, but XMPP would be nice...
Cheers,
Markus
Hi Markus,
Yes there are some examples in the test code:
SCP/SSH server:
http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/src/org/eclipse/ecf/tests/provider/filetransfer/scp/SCPOutgoingTest.java
Note that the expected/required system properties for this test are:
-Dusername=<username on server>
-Dpassword=<password>
-Dhost=<server hostname>
-DlocalSendFile=<file name of local file to send relative to start path...e.g. test.txt>
-DtargetSendFile=<complete path target file...e.g. /home/myhome/test.txt>
But of course this depends upon the receiver running an ssh server. Not sure if that fits your needs.
XMPP filetransfer:
http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.xmpp/src/org/eclipse/ecf/tests/provider/filetransfer/xmpp/XMPPOutgoingTest.java
Now, before you get too excited about the XMPP, unfortunately I believe that the Smack version we are currently on (3.3.1) has a problem with file transfer, as I can't get it to properly respond to a file transfer request.
I believe I've tracked the Smack problem down:
https://community.igniterealtime.org/thread/39286
Unfortunately, we've been trying to move to Smack 4.x for some time
https://bugs.eclipse.org/bugs/show_bug.cgi?id=438006
but as you can see by the bug comments, the IP requirements that the Eclipse Foundation makes are going to be difficult for the Smack 4 team to satisfy.
What I'm going to do is to start a Smack4 provider project at ECF's github location: https://github.com/ECF/Smack4Provider and begin the effort to move to Smack4, which according to 39286 above seems to fix things. And there are other advantages of going to Smack4 as per 438006. Please join the bug and if you can contribute to the effort to create a Smack4 provider.
EFS Filetransfer
One other option if you are using Eclipse on both ends is to use the 'efs' provider. Eclipse has the Eclipse File System (EFS) and there is an ECF provider that can use it. See this example/test code:
http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.efs/src/org/eclipse/ecf/tests/provider/filetransfer/efs/SendTest.java
|
|
|
|
Powered by
FUDForum. Page generated in 0.04481 seconds