Subject: File Transfer problem
Hi everyone.
For file transfer i used the following code:
using agsXMPP.protocol.iq.oob;
using agsXMPP.protocol.stream.feature.compression;
private void button1_Click(object sender, EventArgs e)
{
odlgfile.ShowDialog(); //odlgfile is the open file dialog control name
Oob xit = new Oob();
Jid to = new Jid("vathan@vathan");
IQ fiq = new IQ(IqType.set);
fiq.To = to;
fiq.From = new Jid("surjith@vathan");
xit.Url = odlgfile.FileName;
xit.Description = "test file";
fiq.AddChild(xit);
agsXMPP.protocol.client.Message msg = new agsXMPP.protocol.client.Message();
msg.Type = MessageType.chat;
msg.To = m_Jid;
msg.Body = rtfSend.Text;
_connection.Send(fiq);
_connection.Send(msg);
OutgoingMessage(msg);
rtfSend.Text = "";
}
here I get the resultant output in the debug window:
SEND: <iq xmlns="jabber:client" type="set" to="vathan@vathan" from="surjith@vathan"><query xmlns="jabber:iq:oob"><url>C:\Documents and Settings\surjith.TURTLEINDIA\Desktop\xmas01_cola2.mpg</url><desc>test file</desc></query></iq>
SEND: <message xmlns="jabber:client" type="chat" to="vathan@vathan/Exodus"><body /></message>
RECV: <iq type="error" from="vathan@vathan" to="surjith@vathan/MiniClient"><query xmlns="jabber:iq:oob"><url>C:\Documents and Settings\surjith.TURTLEINDIA\Desktop\xmas01_cola2.mpg</url><desc>test file</desc></query><error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
for the file is not getting transferred to the destination jid. can any one please help me for this. Thanks in advance.
regards
P.K.Surjith
For file transfer i used the following code:
using agsXMPP.protocol.iq.oob;
using agsXMPP.protocol.stream.feature.compression;
private void button1_Click(object sender, EventArgs e)
{
odlgfile.ShowDialog(); //odlgfile is the open file dialog control name
Oob xit = new Oob();
Jid to = new Jid("vathan@vathan");
IQ fiq = new IQ(IqType.set);
fiq.To = to;
fiq.From = new Jid("surjith@vathan");
xit.Url = odlgfile.FileName;
xit.Description = "test file";
fiq.AddChild(xit);
agsXMPP.protocol.client.Message msg = new agsXMPP.protocol.client.Message();
msg.Type = MessageType.chat;
msg.To = m_Jid;
msg.Body = rtfSend.Text;
_connection.Send(fiq);
_connection.Send(msg);
OutgoingMessage(msg);
rtfSend.Text = "";
}
here I get the resultant output in the debug window:
SEND: <iq xmlns="jabber:client" type="set" to="vathan@vathan" from="surjith@vathan"><query xmlns="jabber:iq:oob"><url>C:\Documents and Settings\surjith.TURTLEINDIA\Desktop\xmas01_cola2.mpg</url><desc>test file</desc></query></iq>
SEND: <message xmlns="jabber:client" type="chat" to="vathan@vathan/Exodus"><body /></message>
RECV: <iq type="error" from="vathan@vathan" to="surjith@vathan/MiniClient"><query xmlns="jabber:iq:oob"><url>C:\Documents and Settings\surjith.TURTLEINDIA\Desktop\xmas01_cola2.mpg</url><desc>test file</desc></query><error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
for the file is not getting transferred to the destination jid. can any one please help me for this. Thanks in advance.
regards
P.K.Surjith