[JDEV] JUD seraching with Net::Jabber question
jabber at sbprod.force9.co.uk
jabber at sbprod.force9.co.uk
Tue Jul 1 08:58:47 CDT 2003
I’m trying to search my JUD with Net::Jabber, Having looked back through the JDEV archives (all 23654 pages of it!) and browsed the netjabber CVS on jabber studio I can’t find any examples – and I’m getting a strange error.
“No query string specified at D:/Perl/site/lib/XML/Stream/XPath/Query.pm line 42 XML::Stream::XPath::Query::new('XML::Stream::XPath::Query', '') called at D:/Perl/site/lib/XML/Stream.pm line 1884”
Heres the code:
#! d:\perl\bin\perl.exe
use Net::Jabber qw(Client);
$con=Net::Jabber::Client->new(debuglevel=>0);
$con->Connect("hostname"=>"myserver.com");
my @result = $con->AuthSend("username" => "jabberbot","password"=>"jabberbot","resource"=>"bot");
if ($result[0] eq "ok"){
print "\nConnected OK\n";
}else{
die ("Can't auth");
}
%fields=$con->SearchRequest("to"=>"jud.myserver.com");
#error occurs here!
Setting the debug level to 1 shows that jabberd (1.4.2) has replied with searching instructions, but then the script crashes out with the above error message.
Has anyone got some example code of this working? Or can spot what I'm doing wrong?
Thanks in advance
-Adam
More information about the JDev
mailing list