Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page: previous  1  2 
Avatar
Alex #16
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post ID 2915
Quote by alinux:
I.e. I was online at the time of sending, could it be something else. Unicode etc ?
has your client a debug console? Are you sure that nothing came in?
Can you try on a public server like jabber.org? I don't know which software your server is running and if its xmpp compliant.

Alex
Avatar
alinux #17
Member since Feb 2008 · 20 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 2916
Thanks Alex

However, as you can see in the Screenshot attached all the code does is change the status of the sender in the receivers UA. But this time with the new code there is some kind of socket error.

Thx
The author has attached one file to this post:
printScreen.JPG 49.4 kBytes
You have no permission to open this file.
Avatar
alinux #18
Member since Feb 2008 · 20 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #16
It is an Eyeball XMPP server...Exodus works fine.
thx
Avatar
alinux #19
Member since Feb 2008 · 20 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #16
This is the debug from the compiler

A first chance exception of type 'System.ArgumentException' occurred in System.dll
A first chance exception of type 'agsXMPP.Xml.xpnet.PartialTokenException' occurred in agsXMPP.dll
A first chance exception of type 'System.IO.IOException' occurred in System.dll
A first chance exception of type 'System.IO.IOException' occurred in System.dll
A first chance exception of type 'System.ObjectDisposedException' occurred in System.dll
A first chance exception of type 'System.ObjectDisposedException' occurred in System.dll

NOTE: I forgot the mention the miniclient works with the server.
This post was edited on 2008-02-27, 16:01 by alinux.
Avatar
Alex #20
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The socket was closed for some reason, this is why you get the exception and the message gets not send.
Please post your complete xml logs.
Avatar
Alex #21
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #19
Quote by alinux:
NOTE: I forgot the mention the miniclient works with the server.

if the MiniClient works then there must be a problem in your code.

Alex
Avatar
alinux #22
Member since Feb 2008 · 20 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #20
Thanks for your valuable comments Alex

I dont know where to capture the XML stream but I attached wireshark dump of the whole situation according to the dump the message left for the server.
The author has attached one file to this post:
testxml.pcap 8 kBytes
You have no permission to open this file.
Avatar
alinux #23
Member since Feb 2008 · 20 posts
Group memberships: Members
Show profile · Link to this post
#include "stdafx.h"

using namespace System;
using namespace System::Threading;

using namespace agsXMPP;
using namespace agsXMPP::protocol::client;


int main(array<System::String ^> ^args)
{       
    // create new XmppConnection
    XmppClientConnection ^ xmpp = gcnew  XmppClientConnection();
   
    xmpp->Username = "9613632799";    // Add your username here
    xmpp->Password = "xxxxx";
    xmpp->Server = "ahwar.net";
    xmpp->AutoResolveConnectServer = true;
    xmpp->Port = 443;
    xmpp->Open();

    xmpp->Open();

    Threading::Thread::Sleep(5000);

    // Send our presence to teh server
    xmpp->SendMyPresence();

    Threading::Thread::Sleep(5000);

    // Send a message
    Message ^ msg = gcnew Message;
    msg->To = gcnew Jid("9613041705@jabber.org");    // The receiver of the Message
    msg->Type = MessageType::chat;
    msg->Body = "Test Message";

    xmpp->Send(msg);

    Threading::Thread::Sleep(5000);

    // Close the XmppConnection properly
    xmpp->Close();

    Threading::Thread::Sleep(5000);

    return 0;
}


This is the whole code running in debug mode, I added to the references the debug agsXMPP.dll
Avatar
alinux #24
Member since Feb 2008 · 20 posts
Group memberships: Members
Show profile · Link to this post
I got this from the server



2008-02-27 16:20:29 98311 error receiving from TCP socket 104 Connection reset by peer
2008-02-27 16:20:29 98311 Error while receiving from stream connection
2008-02-27 16:20:29 98311 Closing connection partially: xxxxxxxx:8082/1
2008-02-27 16:20:29 98311 closing TCP socket 784
2008-02-27 16:20:29 98311 Closing connection completely: xxxxxxxxxxx:8082/1
2008-02-27 16:20:29 98311 closing TCP socket -1
2008-02-27 16:20:29 147466 Forwarded message: <presence type="unavailable" from="9613632799@ahwar.net/agsXMPP" to="9613041705@ahwar.net/Eyeball"><show>Logged Out</show></presence>
Avatar
Alex #25
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #23
this is from your captured data:

  1. <message xmlns="jabber:client" to="9613041705@ahwar.net" from="9613632799@ahwar.net/agsXMPP">
  2.    <body>Test Message</body>
  3. </message>

your message was sent without any problem.
Maybe your other client has a problem when displaying messages with out type or of type=normal. So try to set the type to chat.
If it still does not work then please contact your server vendor. I tried this code on different xmpp server and it works without any problem.
So please try it on the jabber.org server as I suggested several times before.

Alex
Avatar
alinux #26
Member since Feb 2008 · 20 posts
Group memberships: Members
Show profile · Link to this post
Dear Alex

Thank you for your help and thanks for being so supportive, I have finally figured it out "with your help". The second sample has been causing exceptions, so I have used the first example and added the SRV statement and the messageType->Chat statement and that apparently did the trick. Login -> Send Status -> Send Message -> Logout

I will reattach the working example tomorrow when I return to my office so that other users can benefit from it.

Thanks again for the help
Avatar
alinux #27
Member since Feb 2008 · 20 posts
Group memberships: Members
Show profile · Link to this post
This is the code that worked for me

#include "stdafx.h"

using namespace System;
using namespace System::Threading;

using namespace agsXMPP;
using namespace agsXMPP::protocol::client;


int main(array<System::String ^> ^args)
{       
    XmppClientConnection ^ xmpp = gcnew  XmppClientConnection();
    xmpp->Username = "961xxxxx99";    // Add your username here
    xmpp->Password = "xxxxx";
    xmpp->Server = "xxxxxx.net";
    xmpp->AutoResolveConnectServer = true;
    xmpp->Port = xxx;
    xmpp->Open();

    Message ^ msg = gcnew Message;
    msg->To = gcnew Jid("961xxxxx05@xxxxx.net");    // The receiver of the Message
    msg->Type = MessageType::chat;
    msg->Body = "Test Message";

    Threading::Thread::Sleep(5000);
    xmpp->SendMyPresence();
        Threading::Thread::Sleep(5000);
    xmpp->Send(msg);

    Threading::Thread::Sleep(15000);

    return 0;
}
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:
Page: previous  1  2 
Forum: agsXMPP RSS