[JDEV] Net::Jabber - XDB->GetData() returns undef?

Nicholas Perez nick at jabberstudio.org
Tue Aug 5 16:26:58 CDT 2003


You should contact the author of the library rather than bothering the 
list with this.


Chris Searle wrote:

>Net::Jabber 1.0024 on debian stable.
>
>Just starting in on XDB.
>
>OK - I have jabberd sending jabber:iq:auth through to my perl
>script. If I dump the incoming xdb object thus (the rest of the script
>is cribbed almost directly from component_accept.pl):
>
>sub xdbCB {
>  my $sid = shift;
>  my $xdb = shift;
>
>  print Dumper($xdb);
>}
>
>I get:
>
>$VAR1 = bless( {
>                 'CHILDREN' => {},
>                 'TAG' => 'xdb',
>                 'DATA' => {
>                             'id' => '62',
>                             'type' => 'get',
>                             'to' => bless( {
>                                              'RESOURCE' => '',
>                                              'JID' => 'chris at jabber.longship.org',
>                                              'USERID' => 'chris',
>                                              'VERSION' => '1.0024',
>                                              'SERVER' => 'jabber.longship.org'
>                                            }, 'Net::Jabber::JID' ),
>                             'from' => bless( {
>                                                'RESOURCE' => '',
>                                                'JID' => 'sessions',
>                                                'USERID' => '',
>                                                'VERSION' => '1.0024',
>                                                'SERVER' => 'sessions'
>                                              }, 'Net::Jabber::JID' ),
>                             'ns' => 'jabber:iq:auth'
>                           },
>                 'DEBUGHEADER' => 'XDB',
>                 'VERSION' => '1.0024'
>               }, 'Net::Jabber::XDB' );
>
>
>So - it looks like data is there.
>
>But - add the line:
>  my $reply = $xdb->Reply(type=>"result");
>
>and you get:
>
>Can't call method "GetXMLNS" on an undefined value at /usr/share/perl5/Net/Jabber/XDB.pm line 392.
>
>(the same happens if you call ->Reply() also).
>
>line 392 is trying to call:
>
>$reply->NewData($selfData->GetXMLNS());
>
>where $selfData is the return from $self->GetData();
>
>I also get undef if I try to access $xdb->GetData().
>
>What have I missed? 
>
>Thanks in advance
>
>  
>





More information about the JDev mailing list