powered by Jive Software

JID in file transfer


I’m using smack 4.2.3 version. I’m trying to send a file from my java desktop application to a jabber client (Pidgin). I’m facing some problems when getting the correct jid user…I don’t know how to get the JID correctly.

Any one can help me? Thanks

My code:

File f = new File("/home/demo/myFileToBeSent");
FileTransferManager manager = FileTransferManager.getInstanceFor(myAbstractXMPPConnection);
String userIDdestiny = "destination01@xmpp.jp" + “/Smack”;

OutgoingFileTransfer transfer = manager.createOutgoingFileTransfer(userID);

The error I get

**12:37:33 PM RECV (0): <iq xml:lang='en' to='origin1@xmpp.jp/Smack' from='destiny01@xmpp.jp/104355517130954792975642067' type='error' id='ZspH0-32'><query xmlns='http://jabber.org/protocol/disco#info' node='http://pidgin.im/#AcN1/PEN8nq7AHD+9jpxMV4U6YM='/><error code='503' type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>User session not found</text></error></iq>**