powered by Jive Software

Smack File Transfer Problem

Hi,

I have a question regarding to the file transfer.

In my program, I created User A and User B.

A was sending the file to B.

My original code was like this:

// Create the outgoing file transfer
OutgoingFileTransfer transfer = manager.createOutgoingFileTransfer("xxxxxx@gmail.com");

but it didn’t work, the smack debuger said Exception in thread “AWT-EventQueue-0” java.lang.IllegalArgumentException: IQ Type not understood

But i chaged to

OutgoingFileTransfer transfer = manager.createOutgoingFileTransfer("xxxxxx@gmail.com/Smack05B73129");

and it worked…

Can anyone know why createOutgoingFileTransfer requires that weird receiver userID? Is there any way make the first way work?

Thank you.

Can anyone know why createOutgoingFileTransfer requires that weird receiver userID?

This is by design of XMPP, see RFC-3921, Section 11.1 Rule 4.3.

Is there any way make the first way work?

No, I don’t think so.

Thanks for you reply.

Do you know how can I get my contact’s full JID of the form <user@domain/resource>?

Thank you.

I got it…myRoster.getRoster().getPresence(entry).getFrom()

Thank you.

Thank you!