amitmmc1 / xmpphp

Automatically exported from code.google.com/p/xmpphp
0 stars 0 forks source link

Don't called roster_iq_handler #44

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When call method $conn->getRoster() of XMPPHP class I get correct answer
from server like "<iq .. type='result'><query
xmlns='jabber:iq:roster'><item ..", but roster_iq_handler not executing.
May be because XMPPHP_XMLStream::addXPathHandler not correctly parse XPath
query "iq/{jabber:iq:roster}query". This problem exist in
cli_longrun_example.php, but because in example don't used class Roster it
imperceptible.

Original issue reported on code.google.com by swa...@gmail.com on 26 Jan 2009 at 5:13

GoogleCodeExporter commented 8 years ago
My solution.

Original comment by swa...@gmail.com on 26 Jan 2009 at 8:52

Attachments:

GoogleCodeExporter commented 8 years ago
I confirm that XMLStream::addXPathHandler does not interpret the pattern
iq/{jabber:iq:roster}query properly.

var_dump($xpath_array) yields the following:

array(1) {
  [0]=>
  array(2) {
    [0]=>
    string(16) "jabber:iq:roster"
    [1]=>
    string(5) "query"
  }
}

A temporary non-intrusive patch is attached but fixing addXPathHandler would be 
the
better approach.

Original comment by lorenz.s...@gmail.com on 14 Apr 2010 at 9:18

Attachments:

GoogleCodeExporter commented 8 years ago
The problem is not solved? Get a list of contacts impossible? 
I applied the patch and diff. When you try to call
           $ a = $ conn-> roster-> getRoster ();
          print_r ($ a);
           $ b = $ conn-> getRoster ();
          print_r ($ b);
In the first case did not issue at all, in the second empty array: array ()

Original comment by ojelem2...@gmail.com on 11 Jul 2011 at 12:38

GoogleCodeExporter commented 8 years ago
had the same problem with this, have any solution?

Original comment by fbrpit...@gmail.com on 28 Sep 2011 at 2:03

GoogleCodeExporter commented 8 years ago
great, thanks to swa...@gmail.com, thats all working, I trace line per line, 
and thats working, thanks :)

Original comment by fbrpit...@gmail.com on 2 Oct 2011 at 1:40

GoogleCodeExporter commented 8 years ago
Really Great!

Many Many Thanks!

Original comment by nishant8...@gmail.com on 28 Dec 2011 at 3:14

GoogleCodeExporter commented 8 years ago
Hey, I have been trying these patches and still can't make it get a Roster. Can 
anyone go step-by-step through how to how to fix XMPPPHP and make it grab this 
info?

Original comment by JohnGo...@gmail.com on 21 Mar 2012 at 9:50

GoogleCodeExporter commented 8 years ago
can anyone post the solution to get the roster info and message from the xmpp 
server?

Original comment by hamsalek...@gmail.com on 13 Aug 2012 at 10:03