powered by Jive Software

SMACKX Transfer Issue

Hi everyone,

I tried the sending files tutorial in the SMACK documentation. Whenever I try to test it with by trying to send a file from Eclipse an eclipse program to a client (I’m testing it against Exodus), Exodus only detects that I have logged into the network but not the fact that I am trying to send a file to the account.

Does anyone have any recommended resources for other fileTransfer tutorials?

Here is the snippet of code that doesn’t seem to be working:

FileTransferManager transferManager = new FileTransferManager(connection);
transferManager.addFileTransferListener(new PlaygroundTransferListener());

OutgoingFileTransfer out = transferManager.createOutgoingFileTransfer(“gdawg@jabber.org”);
System.out.println(“Creating file transfer”);

try{
out.sendFile(new File(“shakespeare_complete_works.txt”), “Test123!”);
}
catch(Exception E){
System.err.println("Error: " + E);
}

Attached is the entire file:
PlaygroundTransfer.java (3568 Bytes)

First, you should not test file transfer with other any other clients but Spark because there have been a bit of varied implementation among XMPP client. So you should look at Spark implementation learn file transfer too. Here is the link to it.

http://www.igniterealtime.org/fisheye/browse/svn-org/spark/trunk/src/java/org/ji vesoftware/spark/filetransfer/SparkTransferManager.java?r=10980#l97

Next, I have noticed that you are just usinguser-ID in createOutgoingFileTransfer(), you are not to be blamed for that cause that’s how they have documented here. Alas, their javadoc said "userID - The fully qualified jabber ID with resource of the user to send the file to."