Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
lindsve #1
Member since Mar 2007 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: Fails to send message?
Hi,

I am currently trying out agsXMPP with Wildfire/Openfire, but fails to send messages. I have set up two test users on the server and both logs in fine and get authenticated. I can send a message from the server admin and it is received by the users. I can't figure out how to send messages from one user to the other though.

I am trying this:
xmpp.Send(new agsXMPP.protocol.client.Message(new Jid("test2@geo-td-geilin11"), MessageType.chat, "a message"));

after the onLogin event has triggered. There doesn't seem to be any response from the server (I am listening on the onReadXml event).

The server logs the following message audit:
<jive xmlns="http://www.jivesoftware.org"><packet xmlns="http://www.jivesoftware.org" streamID="941a5fb8" status="auth" timestamp="Mar 26, 2007 08:33:47:171 AM"><message xmlns="" to="test2@geo-td-geilin11" type="chat" from="test1@geo-td-geilin11/agsXMPP"><body>a message</body></message></packet><packet xmlns="http://www.jivesoftware.org" status="unknown" timestamp="Mar 26, 2007 08:33:47:171 AM"><message xmlns="" to="test1@geo-td-geilin11/agsXMPP" type="error" from="test2@geo-td-geilin11"><body>a message</body><error code="404" type="continue"><item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></message></packet>

Any idea what's wrong?
This post was edited 2 times, last on 2007-03-26, 11:33 by lindsve.
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

you source code looks OK. Maybe there is a configuration problem with your server.

  • Can you post your Debug XML?
  • Did you mark both clients as available? Otherwise the message will be stored in the offline storage.

Alex
Avatar
lindsve #3
Member since Mar 2007 · 5 posts
Group memberships: Members
Show profile · Link to this post
Well, I have now tested it with sending messages with my test client, and logged in the other user (test2) with the miniclient. I can receive the messages with the miniclient, so my client app appears to be sending messages fine afterall.

It might be your second comment though. How do I mark my client as available?

This is what I do to initiate the connection:
xmpp = new XmppClientConnection();

xmpp.OnLogin += new ObjectHandler(this.OnLogin);
xmpp.OnAuthError += new OnXmppErrorHandler(this.OnAuthError);
xmpp.OnError += new ErrorHandler(this.OnError);
xmpp.OnXmppError += new OnXmppErrorHandler(this.OnXmppError);
xmpp.OnReadXml += new XmlHandler(xmpp_OnReadXml);
xmpp.OnWriteXml += new XmlHandler(xmpp_OnWriteXml);
xmpp.OnMessage += new XmppClientConnection.MessageHandler(this.OnMessage);

xmpp.Server = "geo-td-geilin11";
xmpp.Username = "test1";
xmpp.Password = "123";
xmpp.KeepAlive = true;

xmpp.Open();

All I do on the onLogin event is to enable the button which triggers the xmpp.Send listed above.

Is the Debug XML the XML from the readxml and writexml events?
This post was edited on 2007-03-26, 12:27 by lindsve.
Avatar
Alex #4
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
When you are logged in your have to send your presence.
Look at the SendMyPresence member and how the MiniClient sends and updates the presence.
If you don't mark yourself as available (presence) you don't get any messages.

Alex
Avatar
lindsve #5
Member since Mar 2007 · 5 posts
Group memberships: Members
Show profile · Link to this post
Whohoo! It works! Great, thanks for your helpful response!
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