|
List Info
Thread: Jabber::Connection and Rosters
|
|
| Jabber::Connection and Rosters |
  United Kingdom |
2007-07-12 06:46:36 |
I'm trying to get the roster off a Jabber server and ... I
can't get it
to work.
I've attached the script I've but I just never seem to get
an IQ
messages.
Any ideas what I'm doing wrong?
Pointers to other modules with code hints also appreciated.
Simon
#!/usr/bin/perl -w
use strict;
use Jabber::Connection;
use Jabber::NodeFactory;
use Jabber::NS;
use Data: umper;
my $server = 'livejournal.com';
my $user = 'xxxx';
my $pass = 'xxxx';
my $port = 5222;
my $resource = time().$$.rand();
my $nf = Jabber::NodeFactory->new;
my $c = Jabber::Connection->new(server =>
$server.':'.$port, log => 0);
$c->connect || die $c->lastError;
$c->register_handler('iq', &on_iq_message );
$c->auth($user, $pass, $resource);
my $iq = $nf->newNode('iq');
$iq->attr('type', Jabber::NS::IQ_GET());
$iq->insertTag('query', Jabber::NS::NS_ROSTER());
$c->send('<presence/>');
$c->send($iq);
$c->start;
$c->disconnect;
sub on_iq_message {
print "Got an iq messagen";
print Dumper( _);
}
|
|
| Re: Jabber::Connection and Rosters |
  United Kingdom |
2007-07-12 11:03:30 |
Simon Wistow wrote:
> I'm trying to get the roster off a Jabber server and
... I can't get it
> to work.
>
> I've attached the script I've but I just never seem to
get an IQ
> messages.
>
> Any ideas what I'm doing wrong?
Apparently the Jabber: code isn't
very good (that's what I've heard,
don't meant to offend anyone). Try looking at the code in
DJabberd instead.
Matt.
____________________________________________________________
__________
This email has been scanned by the MessageLabs Email
Security System.
For more information please visit http://www.messagela
bs.com/email
____________________________________________________________
__________
|
|
| Re: Jabber::Connection and Rosters |

|
2007-07-12 11:43:20 |
On 12/07/07, Matt Sergeant <msergeant messagelabs.com> wrote:
>
> Apparently the Jabber: code isn't
very good (that's what I've heard,
> don't meant to offend anyone). Try looking at the code
in DJabberd instead.
>
or net: mpp::
roster (and indeed net: mpp:<
img src='http://www.archivesat.com/images/kiss.gif'>)
cheers,
pedro
--
http://pedrofigueiredo.or
g/
bgp is for those who can't keep it static long enough
|
|
| Re: Jabber::Connection and Rosters |
  United Kingdom |
2007-07-12 11:50:37 |
On Thu, Jul 12, 2007 at 12:03:30PM -0400, Matt Sergeant
said:
> Apparently the Jabber: code isn't
very good (that's what I've heard,
> don't meant to offend anyone). Try looking at the code
in DJabberd instead.
In an interesting twist I switched the example server away
from being
livejournal.com (and hence DJabberD) and ... it all started
working.
I was kind of hoping not have to go spelunking into server
code to make
a client but it's looking like it's what I may have to do
:(
|
|
| Re: Jabber::Connection and Rosters |
  United Kingdom |
2007-07-12 11:52:50 |
On Thu, Jul 12, 2007 at 05:50:36PM +0100, me said:
> In an interesting twist I switched the example server
away from being
> livejournal.com (and hence DJabberD) and ... it all
started working.
>
> I was kind of hoping not have to go spelunking into
server code to make
> a client but it's looking like it's what I may have to
do :(
Then I found this.
Which also has non-broken client code. Hurrah.
|
|
| Re: Jabber::Connection and Rosters |
  United Kingdom |
2007-07-12 15:15:40 |
On Thu, Jul 12, 2007 at 05:43:20PM +0100, Pedro Figueiredo
said:
> or net: mpp::
roster (and indeed net: mpp:<
img src='http://www.archivesat.com/images/kiss.gif'>)
I couldn't get those to work for roughly the same reasons as
Jabber::Connect unfortunately.
|
|
| Re: Jabber::Connection and Rosters |
  United Kingdom |
2007-07-12 15:17:10 |
On Thu, Jul 12, 2007 at 05:52:50PM +0100, me said:
> Then I found this.
Err, this, even
http://lists.danga.com/pipermail/djabberd/2007-May
/000333.html
|
|
[1-7]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|