Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
How can add a new contact to my jabber id in asp.net using matrix
Page: previous  1  2 
Avatar
shamsher.savi #16
User title: Shamsher Singh
Member since Dec 2012 · 11 posts · Location: Gurgaon, Haryana, India
Group memberships: Members
Show profile · Link to this post
In reply to post ID 7415
Dear Sir,

Messages are going from my chat app. And the receiver on other hand receiving it immediately. But  my app is not receiving the msg.
Although the onMessage event is firing. And log is also showing the message. I am giving onMessage event coding and log and Event below please find out the problem.
 
// OnMessage Event in chat Hub
  1. void xmppClient_OnMessage(object sender, MessageEventArgs e)
  2.     {
  3.         DisplayEvent("OnMessage");
  4.         Clients[Context.ConnectionId].onMessage(new Message(e.Message.From, e.Message.Body));
  5.        
  6.     }

// signalR callback for incoming messages
  1.   chatGmail.onMessage = function (msg)
  2.              {
  3.                  if (msg.Body != null)
  4.                  {
  5.      $("#messages").append("<span class='from'>" + msg.From + " - " + document.getElementById(msg.From).innerHTML + ":</span>" + "<span class='message'>" + msg.Body + "</span>" + "</br>");
  6.                  }
  7.              };

  1. Send : <presence xmlns="jabber:client"> <status></status> <priority>0</priority> </presence>
  2. Send : <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="gmail.com" version="1.0" >
  3. Receive : <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" id="475512C83883A3E3" version="1.0" xmlns="jabber:client" >
  4. Receive : <stream:features xmlns:stream="http://etherx.jabber.org/streams"> <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"> <required /> </starttls> <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"> <mechanism>X-GOOGLE-TOKEN</mechanism> <mechanism>X-OAUTH2</mechanism> </mechanisms> </stream:features>
  5. Send : <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  6. Receive : <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  7. Send : <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="gmail.com" version="1.0" >
  8. Receive : <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" id="313445E473931E56" version="1.0" xmlns="jabber:client" >
  9. Receive : <stream:features xmlns:stream="http://etherx.jabber.org/streams"> <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"> <mechanism>PLAIN</mechanism> <mechanism>X-GOOGLE-TOKEN</mechanism> <mechanism>X-OAUTH2</mechanism> </mechanisms> </stream:features>
  10. Send : <auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">XXX</auth>
  11. Receive : <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
  12. Send : <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="gmail.com" version="1.0" >
  13. Receive : <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" id="FB136214E0BA87E4" version="1.0" xmlns="jabber:client" >
  14. Receive : <stream:features xmlns:stream="http://etherx.jabber.org/streams"> <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /> <session xmlns="urn:ietf:params:xml:ns:xmpp-session" /> </stream:features>
  15. Send : <iq id="MX_25" type="set" xmlns="jabber:client"> <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"> <resource>MatriX</resource> </bind> </iq>
  16. Receive : <iq id="MX_25" type="result" xmlns="jabber:client"> <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"> <jid>testuserlivechat@gmail.com/MatriXD2245031</jid> </bind> </iq>
  17. Send : <iq id="MX_26" type="set" xmlns="jabber:client"> <session xmlns="urn:ietf:params:xml:ns:xmpp-session" /> </iq>
  18. Receive : <iq type="result" id="MX_26" xmlns="jabber:client" />
  19. Send : <iq id="MX_27" type="get" xmlns="jabber:client"> <query xmlns="jabber:iq:roster" /> </iq>
  20. Receive : <iq to="testuserlivechat@gmail.com/MatriXD2245031" id="MX_27" type="result" xmlns="jabber:client"> <query xmlns="jabber:iq:roster"> <item jid="shamsher.savi@gmail.com" subscription="both" /> <item jid="shamsher.savi@jabber.org" subscription="both" name="Shamsher Singh Jabber" /> <item jid="banwariyadav2011@gmail.com" subscription="both" name="Banwari Yadav" /> </query> </iq>
  21. Send : <presence xmlns="jabber:client"> <status></status> <priority>0</priority> </presence>
  22. Receive : <presence from="testuserlivechat@gmail.com/MatriX61390F4C" to="testuserlivechat@gmail.com/MatriXD2245031" xmlns="jabber:client"> <status /> <priority>0</priority> <x xmlns="vcard-temp:x:update"> <photo /> </x> </presence>
  23. Receive : <presence from="banwariyadav2011@gmail.com/gmail.B0F2554A" to="testuserlivechat@gmail.com/MatriXD2245031" xmlns="jabber:client"> <priority>24</priority> <c node="http://mail.google.com/xmpp/client/caps" ver="1.1" ext="pmuc-v1 sms-v1 vavinvite-v1" xmlns="http://jabber.org/protocol/caps" /> <x xmlns="vcard-temp:x:update"> <photo>384533cf4f313ad76f8b8cc8696f300e6b06f90b</photo> </x> </presence>
  24. Receive : <presence from="shamsher.savi@jabber.org" to="testuserlivechat@gmail.com/MatriXD2245031" type="unavailable" xmlns="jabber:client" />
  25. Send : <message to="banwariyadav2011@gmail.com" type="chat" xmlns="jabber:client"> <body>Hello B</body> <composing xmlns="http://jabber.org/protocol/chatstates" /> </message>
  26. Receive : <message to="testuserlivechat@gmail.com/MatriXD2245031" type="chat" from="banwariyadav2011@gmail.com/gmail.B0F2554A" xmlns="jabber:client"> <composing xmlns="http://jabber.org/protocol/chatstates" /> <x value="disabled" xmlns="google:nosave" /> <record otr="false" xmlns="http://jabber.org/protocol/archive" /> </message>
  27. Receive : <message to="testuserlivechat@gmail.com/MatriXD2245031" type="chat" id="24E7746B3627EF2C_53" iconset="square" from="banwariyadav2011@gmail.com/gmail.B0F2554A" xmlns="jabber:client"> <body>HELLLO S</body> <google-mail-signature xmlns="google:metadata">4cHoYj0_yyBsDjI4fjKZJ_SRpBw</google-mail-signature> <active xmlns="http://jabber.org/protocol/chatstates" /> <x value="disabled" xmlns="google:nosave" /> <record otr="false" xmlns="http://jabber.org/protocol/archive" /> </message>
  28. Send :
  29. Send :
  30. Send :
  31. Receive : <message to="testuserlivechat@gmail.com/MatriXD2245031" type="chat" from="banwariyadav2011@gmail.com/gmail.B0F2554A" xmlns="jabber:client"> <inactive xmlns="http://jabber.org/protocol/chatstates" /> <x value="disabled" xmlns="google:nosave" /> <record otr="false" xmlns="http://jabber.org/protocol/archive" /> </message>
  32. Send :
  33. Receive : <presence from="banwariyadav2011@gmail.com/gmail.B0F2554A" to="testuserlivechat@gmail.com" xmlns="jabber:client"> <priority>24</priority> <c node="http://mail.google.com/xmpp/client/caps" ver="1.1" ext="pmuc-v1 sms-v1 vavinvite-v1" xmlns="http://jabber.org/protocol/caps" /> <x xmlns="vcard-temp:x:update"> <photo>384533cf4f313ad76f8b8cc8696f300e6b06f90b</photo> </x> </presence>
  34. Send :

//And the Events which fires

OnBeforeSendPresence
OnSendXml
OnSendXml
OnReceiveXml
OnReceiveXml
OnSendXml
OnReceiveXml
OnSendXml
OnReceiveXml
OnReceiveXml
OnBeforeSasl
OnSendXml
OnReceiveXml
OnLogin
OnSendXml
OnReceiveXml
OnReceiveXml
OnSendXml
OnReceiveXml
OnBind
OnSendXml
OnIq
OnReceiveXml
OnSendXml
OnIq
OnReceiveXml
OnRosterStart
OnRosterItem
OnRosterItem
OnRosterItem
OnRosterEnd
OnBeforeSendPresence
OnSendXml
OnIq
OnReceiveXml
OnPresence
OnReceiveXml
OnPresence
OnReceiveXml
OnPresence
OnSendXml
OnReceiveXml
OnMessage
OnReceiveXml
OnMessage
OnSendXml
OnSendXml
OnSendXml
OnReceiveXml
OnMessage
OnSendXml
OnReceiveXml
OnPresence
OnSendXml



Thanks

Regards,
Shamsher Singh
This post was edited 6 times, last on 2018-05-02, 10:35 by Alex.
Edit reason: removed password from log
Avatar
Alex #17
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you logs look fine. The subscription of your contacts is fine, you get all messages and the events in MatriX.
The problem must be in your SignalR code or SignalR connection. It does not forward the data to your browser.

Alex
Avatar
shamsher.savi #18
User title: Shamsher Singh
Member since Dec 2012 · 11 posts · Location: Gurgaon, Haryana, India
Group memberships: Members
Show profile · Link to this post
Dear Sir,

Thanks for your reply.
I have solved the problem. It was in call back function.

Regards,
Shamsher Singh
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