nplexity / xmpp-file-transfer-demo

iOS demo application using XMPPFramework for file transfer.
43 stars 24 forks source link

Code=503 service-unavailable ,I can't send the file,please help! #15

Closed ZsIsMe closed 9 years ago

ZsIsMe commented 9 years ago

Sir, I get a question and I really need your help! I use your demo to send the file, after I logged in successfully , I got the error.

The Log is

"

2015-04-07 10:22:50:000 FileTransferDemo[42056:5813] SEND: 2015-04-07 10:22:50:194 FileTransferDemo[42056:286b] RECV: 2015-04-07 10:22:50:384 FileTransferDemo[42056:6303] RECV: heheRShL05 2015-04-07 10:22:50:575 FileTransferDemo[42056:286b] RECV: 2015-04-07 10:23:48:206 FileTransferDemo[42056:607] XMPPOutgoingFileTransfer: didActivate 2015-04-07 10:23:48:211 FileTransferDemo[42056:607] XMPPOutgoingFileTransfer: startFileTransfer: 2015-04-07 10:23:48:212 FileTransferDemo[42056:607] XMPPOutgoingFileTransfer: queryRecipientDiscoInfo 2015-04-07 10:23:48:213 FileTransferDemo[42056:6817] SEND: 2015-04-07 10:23:48:441 FileTransferDemo[42056:5a8f] RECV: 2015-04-07 10:23:48:442 FileTransferDemo[42056:6817] XMPPIncomingFileTransfer: sendIdentity: 2015-04-07 10:23:48:443 FileTransferDemo[42056:5d9f] SEND: 2015-04-07 10:23:48:446 FileTransferDemo[42056:607] XMPPOutgoingFileTransfer: handleRecipientDiscoInfoQueryIQ:withInfo: 2015-04-07 10:23:48:446 FileTransferDemo[42056:607] iq: , info: <XMPPBasicTrackingInfo: 0x7f9032df4c90> 2015-04-07 10:23:48:446 FileTransferDemo[42056:607] XMPPOutgoingFileTransfer: failWithReason:error: 2015-04-07 10:23:48:447 FileTransferDemo[42056:607] Outgoing file transfer failed because: 2015-04-07 10:23:48:447 FileTransferDemo[42056:607] XMPPOutgoingFileTransfer: cleanUp 2015-04-07 10:23:48:448 FileTransferDemo[42056:607] Outgoing file transfer failed with error: Error Domain=XMPPOutgoingFileTransferErrorDomain Code=503 "" UserInfo=0x7f90351148a0 {NSLocalizedDescription=}

"

I went to find the answer in the stackoverflow ,this is a question just for me:

http://stackoverflow.com/questions/26250533/service-unavailable-503-error-for-file-transfer-in-xmpp-with-ios

maybe the question is the receiver JID,but I don't know how to do,please help me,thanks!

ZsIsMe commented 9 years ago

screenshot screenshot

I had put the image file in the the document.

jonstaff commented 9 years ago

"a.jpg" is unlikely the recipient JID resource.

ZsIsMe commented 9 years ago

Sir ,what do you mean?I don't know how to set the the JID resource name.

jonstaff commented 9 years ago

You don't set the JID resource inside the demo app; it should already be set. Check the logs for the full recipient JID.

ZsIsMe commented 9 years ago

Sir, I understand what you mean! I sent to the image to myself "zzsss@104.236.174.238/c5cff096" then i receive the image,but the "c5cff096" is different ever time ,how can i know other's "c5cff096" staff?

Oh, I really sorry to bother you at dark night,have a good sleep.

jonstaff commented 9 years ago

Your application will need to handle the process of setting the JID resource as a particular value. If you take a look at the XMPPJID class inside the XMPPFramework, there are methods to change this. Good luck!