Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Problem when trying transfer file from MiniClient and my Client
Avatar
Rinat #1
Member since May 2010 · 10 posts
Group memberships: Members
Show profile · Link to this post
Subject: File transfer
 Hi all,

I'm new in agsXMPP, little bit confuse.
I'm using openfire as a server and transfer file with proxy on port 7777.

I wrote my client application and run it and the miniClient on my machine .

those are the steps:
1. MiniClient trying to send file to myClient
2. MyClient accept the request
3. now it stack.

I can see in debug that sendStreamHosts is working but  the call back SendStreamHostsResult is never called.

The strangest thing is that when I cancel the request for transfering ( from MyClient side) the call back SendStreamHostsResult is called and file actually transfered.

Another problem is that sometimes the transfered file size is 0K. so actually it is not transferd.

Following is the xml I took from the miniClient. mabye it can give you a clue about my mistake. (I will attach the rest in the next post)

SEND: <stream:stream to='sqltmstest' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="sqltmstest" version="1.0" xml:lang="en" id="6c7ee2a5" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>JIVE-SHAREDSECRET</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5" />
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09InNxbHRtc3Rlc3QiLG5vbmNlPSJZZWRXZW9MbTNpSDZGd0xOQXVlZW9id3doYlU5eTVud2I5Z2Qwc1hkIixxb3A9ImF1dGgiLGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNz</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9InU5IixyZWFsbT0ic3FsdG1zdGVzdCIsbm9uY2U9IlllZFdlb0xtM2lINkZ3TE5BdWVlb2J3d2hiVTl5NW53YjlnZDBzWGQiLGNub25jZT0iNTE0MDAwMGI1Y2M1ZmVlZGY3NmJmZWMzZGQyNmY0NmQ3ZTY3MjM2OGU0MmQ1MjExZDQwZmRiMzE1MTU4Y2Y1ZCIsbmM9MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC9zcWx0bXN0ZXN0IixjaGFyc2V0PXV0Zi04LHJlc3BvbnNlPWZhMjFkNDk3N2RhNjRiZGQ1NDAxZDE2MmI0MmVlMTc0</response>
RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD0wMGUzNDAwYTlkNzI3M2ExZDE4ZjI3ZWY5YTA1NTY0Yw==</success>
SEND: <stream:stream to='sqltmstest' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="sqltmstest" version="1.0" xml:lang="en" id="6c7ee2a5" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></stream:features>
SEND: <iq id="agsXMPP_1" type="set" to="sqltmstest"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>MiniClient</resource></bind></iq>
RECV: <iq xmlns="jabber:client" from="sqltmstest" to="sqltmstest/6c7ee2a5" type="result" id="agsXMPP_1"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>u9@sqltmstest/MiniClient</jid></bind></iq>
SEND: <iq id="agsXMPP_2" type="set" to="sqltmstest"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>
RECV: <iq xmlns="jabber:client" from="sqltmstest" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_2"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>
SEND: <iq id="agsXMPP_5" type="get" to="sqltmstest"><query xmlns="http://jabber.org/protocol/disco#items" /></iq>
SEND: <iq id="agsXMPP_3" type="get" to="sqltmstest"><query xmlns="jabber:iq:agents" /></iq>
SEND: <iq id="agsXMPP_4" type="get"><query xmlns="jabber:iq:roster" /></iq>
RECV: <iq xmlns="jabber:client" from="sqltmstest" to="u9@sqltmstest/MiniClient" type="error" id="agsXMPP_3"><query xmlns="jabber:iq:agents" /><error code="501" type="cancel"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></iq>
RECV: <iq xmlns="jabber:client" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_4"><query xmlns="jabber:iq:roster"><item name="u7" jid="u7@sqltmstest" subscription="both" /></query></iq>
SEND: <presence><status /><priority>10</priority><c xmlns="http://jabber.org/protocol/caps" node="http://www.ag-software.net/miniclient/caps" ver="8RovUdtOmiAjzj+xI7SK5BCw3A8=" /></presence>
RECV: <iq xmlns="jabber:client" from="sqltmstest" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_5"><query xmlns="http://jabber.org/protocol/disco#items"><item name="Publish-Subscribe service" jid="pubsub.sqltmstest" /><item name="Client Control Manager" jid="manager.sqltmstest" /><item name="Socks 5 Bytestreams Proxy" jid="proxy.sqltmstest" /><item name="Remote Logger" jid="logger.sqltmstest" /><item name="Public Chatrooms" jid="conference.sqltmstest" /><item name="User Search" jid="search.sqltmstest" /><item name="Spark Updater" jid="updater.sqltmstest" /><item name="SIP Controller" jid="sipark.sqltmstest" /><item name="Fastpath" jid="workgroup.sqltmstest" /><item name="Broadcast service" jid="broadcast.sqltmstest" /></query></iq>
SEND: <iq id="agsXMPP_6" type="get" to="pubsub.sqltmstest"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>
SEND: <iq id="agsXMPP_7" type="get" to="manager.sqltmstest"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>
SEND: <iq id="agsXMPP_8" type="get" to="proxy.sqltmstest"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>
SEND: <iq id="agsXMPP_9" type="get" to="logger.sqltmstest"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>
SEND: <iq id="agsXMPP_10" type="get" to="conference.sqltmstest"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>
SEND: <iq id="agsXMPP_11" type="get" to="search.sqltmstest"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>
SEND: <iq id="agsXMPP_12" type="get" to="updater.sqltmstest"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>
SEND: <iq id="agsXMPP_13" type="get" to="sipark.sqltmstest"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>
SEND: <iq id="agsXMPP_14" type="get" to="workgroup.sqltmstest"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>
SEND: <iq id="agsXMPP_15" type="get" to="broadcast.sqltmstest"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>
This post was edited on 2013-03-06, 19:28 by Alex.
Avatar
Rinat #2
Member since May 2010 · 10 posts
Group memberships: Members
Show profile · Link to this post
Subject: Continue the XML
RECV: <presence xmlns="jabber:client" from="u7@sqltmstest/agsXMPP" to="u9@sqltmstest/MiniClient"><status /><priority>5</priority></presence>
RECV: <iq xmlns="jabber:client" from="pubsub.sqltmstest" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_6"><query xmlns="http://jabber.org/protocol/disco#info"><identity name="Publish-Subscribe service" category="pubsub" type="service" /><feature var="http://jabber.org/protocol/pubsub" /><feature var="http://jabber.org/protocol/pubsub#collections" /><feature var="http://jabber.org/protocol/pubsub#config-node" /><feature var="http://jabber.org/protocol/pubsub#create-and-configure" /><feature var="http://jabber.org/protocol/pubsub#create-nodes" /><feature var="http://jabber.org/protocol/pubsub#delete-nodes" /><feature var="http://jabber.org/protocol/pubsub#get-pending" /><feature var="http://jabber.org/protocol/pubsub#instant-nodes" /><feature var="http://jabber.org/protocol/pubsub#item-ids" /><feature var="http://jabber.org/protocol/pubsub#meta-data" /><feature var="http://jabber.org/protocol/pubsub#modify-affiliations" /><feature var="http://jabber.org/protocol/pubsub#manage-subscriptions" /><feature var="http://jabber.org/protocol/pubsub#multi-subscribe" /><feature var="http://jabber.org/protocol/pubsub#outcast-affiliation" /><feature var="http://jabber.org/protocol/pubsub#persistent-items" /><feature var="http://jabber.org/protocol/pubsub#presence-notifications" /><feature var="http://jabber.org/protocol/pubsub#publish" /><feature var="http://jabber.org/protocol/pubsub#publisher-affiliation" /><feature var="http://jabber.org/protocol/pubsub#purge-nodes" /><feature var="http://jabber.org/protocol/pubsub#retract-items" /><feature var="http://jabber.org/protocol/pubsub#retrieve-affiliations" /><feature var="http://jabber.org/protocol/pubsub#retrieve-default" /><feature var="http://jabber.org/protocol/pubsub#retrieve-items" /><feature var="http://jabber.org/protocol/pubsub#retrieve-subscriptions" /><feature var="http://jabber.org/protocol/pubsub#subscribe" /><feature var="http://jabber.org/protocol/pubsub#subscription-options" /><feature var="http://jabber.org/protocol/pubsub#default_access_model_open" /><feature var="http://jabber.org/protocol/disco#info" /></query></iq>
RECV: <iq xmlns="jabber:client" from="manager.sqltmstest" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_7"><query xmlns="http://jabber.org/protocol/disco#info"><identity name="Client Control Manager" category="manager" type="text" /><feature var="broadcast" /><feature var="file-transfer" /><feature var="muc" /><feature var="vcard" /></query></iq>
RECV: <iq xmlns="jabber:client" from="proxy.sqltmstest" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_8"><query xmlns="http://jabber.org/protocol/disco#info"><identity name="SOCKS5 Bytestreams Service" category="proxy" type="bytestreams" /><feature var="http://jabber.org/protocol/bytestreams" /><feature var="http://jabber.org/protocol/disco#info" /></query></iq>
RECV: <iq xmlns="jabber:client" from="logger.sqltmstest" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_9"><query xmlns="http://jabber.org/protocol/disco#info"><identity name="Remote Logger" category="component" type="generic" /><feature var="http://jabber.org/protocol/disco#info" /><feature var="http://www.jivesoftware.com/protocol/log" /></query></iq>
RECV: <iq xmlns="jabber:client" from="conference.sqltmstest" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_10"><query xmlns="http://jabber.org/protocol/disco#info"><identity name="Public Chatrooms" category="conference" type="text" /><identity name="Public Chatroom Search" category="directory" type="chatroom" /><feature var="http://jabber.org/protocol/muc" /><feature var="http://jabber.org/protocol/disco#info" /><feature var="http://jabber.org/protocol/disco#items" /><feature var="jabber:iq:search" /><feature var="http://jabber.org/protocol/rsm" /></query></iq>
RECV: <iq xmlns="jabber:client" from="search.sqltmstest" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_11"><query xmlns="http://jabber.org/protocol/disco#info"><identity name="User Search" category="directory" type="user" /><feature var="jabber:iq:search" /><feature var="http://jabber.org/protocol/disco#info" /><feature var="http://jabber.org/protocol/rsm" /></query></iq>
RECV: <iq xmlns="jabber:client" from="updater.sqltmstest" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_12"><query xmlns="http://jabber.org/protocol/disco#info"><identity name="Spark Updater" category="updater" type="text" /><feature var="jabber:iq:updater" /></query></iq>
RECV: <iq xmlns="jabber:client" from="sipark.sqltmstest" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_13"><query xmlns="http://jabber.org/protocol/disco#info"><identity name="SIP Controller" category="component" type="generic" /><feature var="http://jabber.org/protocol/disco#info" /><feature var="http://www.jivesoftware.com/protocol/sipark" /></query></iq>
RECV: <iq xmlns="jabber:client" from="workgroup.sqltmstest" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_14"><query xmlns="http://jabber.org/protocol/disco#info"><identity name="Fastpath" category="collaboration" type="workgroup" /><feature var="http://jabber.org/protocol/workgroup" /><feature var="http://jabber.org/protocol/disco#info" /><feature var="jabber:iq:version" /><feature var="http://jabber.org/protocol/commands" /><feature var="jive:email:provider" /></query></iq>
RECV: <iq xmlns="jabber:client" from="broadcast.sqltmstest" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_15"><query xmlns="http://jabber.org/protocol/disco#info"><identity name="Broadcast service" category="component" type="generic" /><feature var="http://jabber.org/protocol/disco#info" /><feature var="http://jabber.org/protocol/disco#items" /></query></iq>
SEND: <iq id="agsXMPP_16" to="u7@sqltmstest/agsXMPP" type="set"><si xmlns="http://jabber.org/protocol/si" profile="http://jabber.org/protocol/si/profile/file-transfer" id="211c7ba8-7524-4770-865a-938d81ffe2ea"><file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="IMG_0474.jpg" size="2424230"><range /></file><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="form"><field type="list-single" var="stream-method"><option><value>http://jabber.org/protocol/bytestreams</value></option></field></x></feature></si></iq>
RECV: <iq xmlns="jabber:client" from="u7@sqltmstest/agsXMPP" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_16"><si xmlns="http://jabber.org/protocol/si" id="211c7ba8-7524-4770-865a-938d81ffe2ea"><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="submit"><field var="stream-method"><value>http://jabber.org/protocol/bytestreams</value></field></x></feature></si></iq>
SEND: <iq id="agsXMPP_17" to="u7@sqltmstest/agsXMPP" type="set"><query xmlns="http://jabber.org/protocol/bytestreams" sid="211c7ba8-7524-4770-865a-938d81ffe2ea"><streamhost jid="sqltmstest" host="sqltmstest" port="7777" /></query></iq>
RECV: <iq xmlns="jabber:client" from="u7@sqltmstest/agsXMPP" to="u9@sqltmstest/MiniClient" type="result" id="agsXMPP_17"><query xmlns="http://jabber.org/protocol/bytestreams"><streamhost-used jid="sqltmstest" /></query></iq>
SEND: <iq id="agsXMPP_18" to="sqltmstest" type="set"><query xmlns="http://jabber.org/protocol/bytestreams" sid="211c7ba8-7524-4770-865a-938d81ffe2ea"><activate>u7@sqltmstest/agsXMPP</activate></query></iq>
RECV: <iq xmlns="jabber:client" from="sqltmstest" to="u9@sqltmstest/MiniClient" type="error" id="agsXMPP_18"><query xmlns="http://jabber.org/protocol/bytestreams" sid="211c7ba8-7524-4770-865a-938d81ffe2ea"><activate>u7@sqltmstest/agsXMPP</activate></query><error code="501" type="cancel"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></iq>

Thanx,
Rinat
This post was edited on 2013-03-06, 19:27 by Alex.
Avatar
Alex #3
Member since Feb 2003 · 4307 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
It looks like the advertised streamhost is wrong.

  1. <streamhost jid="sqltmstest" host="sqltmstest" port="7777" />

In the service discovery before the address is proxy.sqltmstest, not sqltmstest

Alex
Avatar
Rinat #4
Member since May 2010 · 10 posts
Group memberships: Members
Show profile · Link to this post
Subject: I'have changed the Streamhost as you said and I still have this problem.
Hi,

Thanx for replying.

This tme I used the XML: <streamhost jid="proxy.sqltmstest" host="sqltmstest" port="7777" />
and still failed to send the file.
but again, in case I cancel the transfer, I can see the file name in the "recieved file" directory but its size is 0K.

Thanx,
Rinat
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS