Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
Wave #1
Member since May 2011 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: File Transfer Error
::: Send :::
    <iq type="set" to="-772315480@chat.facebook.com" id="MX_3" xmlns="jabber:client">
  <si id="b4d06a57-6c34-40f2-a46e-b5572fd7c99d" profile="http://jabber.org/protocol/si/profile/file-transfer" xmlns="http://jabber.org/protocol/si">
    <file name="---.txt" size="493" xmlns="http://jabber.org/protocol/si/profile/file-transfer">
      <desc>C:\Users\Ultimate\Desktop\---.txt</desc>
    </file>
    <feature xmlns="http://jabber.org/protocol/feature-neg">
      <x type="form" xmlns="jabber:x:data">
        <field var="stream-method" type="list-single">
          <option>
            <value>http://jabber.org/protocol/ibb</value>
          </option>
        </field>
      </x>
    </feature>
  </si>
</iq>

::: Receive :::
    <iq from="-772315480@chat.facebook.com" to="-100001956455619@chat.facebook.com/MatriX_f40a45f6_4A3AF907D53B1" type="error" id="MX_3" xmlns="jabber:client">
  <si id="b4d06a57-6c34-40f2-a46e-b5572fd7c99d" profile="http://jabber.org/protocol/si/profile/file-transfer" xmlns="http://jabber.org/protocol/si">
    <file name="---.txt" size="493" xmlns="http://jabber.org/protocol/si/profile/file-transfer">
      <desc>C:\Users\Ultimate\Desktop\---.txt</desc>
    </file>
    <feature xmlns="http://jabber.org/protocol/feature-neg">
      <x type="form" xmlns="jabber:x:data">
        <field var="stream-method" type="list-single">
          <option>
            <value>http://jabber.org/protocol/ibb</value>
          </option>
        </field>
      </x>
    </feature>
  </si>
  <error code="503" type="cancel">
    <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
  </error>
</iq>

I'm sending from my client to another instance of it on same pc


        private void InitializeFTP ( )
        {
            Process . FTP . XmppClient = Process . Client;

            Process . FTP . OnFile += new EventHandler<FileTransferEventArgs> ( FTP_OnFile );
            Process . FTP . OnError += new EventHandler<Matrix . ExceptionEventArgs> ( FTP_OnError );
            Process . FTP . OnAbort += new EventHandler<FileTransferEventArgs> ( FTP_OnAbort );
            Process . FTP . OnEnd += new EventHandler<FileTransferEventArgs> ( FTP_OnEnd );
            Process . FTP . OnProgress += new EventHandler<FileTransferEventArgs> ( FTP_OnProgress );
            Process . FTP . OnStart += new EventHandler<FileTransferEventArgs> ( FTP_OnStart );


        }

        void FTP_OnStart ( object sender , FileTransferEventArgs e )
        {
            MessageBox . Show ( "FTP Start" );
        }

        void FTP_OnProgress ( object sender , FileTransferEventArgs e )
        {
            MessageBox . Show ( "FTP Progress" );
        }

        void FTP_OnEnd ( object sender , FileTransferEventArgs e )
        {
            MessageBox . Show ( "FTP End" );
        }

        void FTP_OnAbort ( object sender , FileTransferEventArgs e )
        {
            MessageBox . Show ( "FTP Abort" );
        }

        void FTP_OnError ( object sender , Matrix . ExceptionEventArgs e )
        {
            MessageBox . Show ( "FTP Error" );
        }

        void FTP_OnFile ( object sender , FileTransferEventArgs e )
        {

            MessageBox . Show ( "FTP File" );

            MessageBox . Show ( "jid " + e . Jid + " sid " + e . Sid );
            e . Accept = true;
            e . Directory = Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . MyDocuments ) );
        }


I didn't even get any message box on the sender client
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you send the file and iq to a bare Jid:
-772315480@chat.facebook.com

iqs must be always addresses to full Jids, user-id/resource

Alex
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: