[jdev] Perl registration with Net::Jabber and RegisterSend
Hans Poo
hans at opensource.cl
Tue Nov 23 11:44:13 CST 2004
Hi
I have a Perl user registration application and i need to create the
coresponding jabber user accounts. I'am using mod_perl and Net::Jabber. This
is my test script.
my $c = new Net::Jabber::Client();
$c->Connect(hostname=>"localhost");
if ($c->Connected()) {
print "We are connected to the server...\n";
}
@result = $c->RegisterSend(
username => "winnie",
password => "secret",
email => "winnie\@fun.com",
name => "Winnie the Poh");
print join "\n", @result;
The connection succeed but the account is not created.
The server register correctly when using raw xml, this
is the test:
[root at marte root]# telnet localhost 5222
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
<stream:stream to='portalciudadano.cl' xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'>
<?xml version='1.0'?><stream:stream
xmlns:stream='http://etherx.jabber.org/streams' id='41A37DCA'
xmlns='jabber:client' from='portalciudadano.cl'>
<iq id='abcde' type='set'>
<query xmlns='jabber:iq:register'>
<username>Winnie</username>
<password>secret</password>
<name>Winnie the Poh</name>
<email>winie at fun.com</email>
</query>
</iq>
<iq id='abcde' type='result'/>
This telnet session create the apropriate xml account file in the
corresponding spool directory.
I've been searching a lot about it. I 'am not sure if what i'am doing is correct.
Hans
------------------------------------------------------------------------
El problema de fondo es diseñar soluciones elegantes e inteligentes, las
herramientas sólo son las herramientas.
Hans Poo, http://hans.opensource.cl, hans at opensource.cl, F: 09-319.93.05
Consultor Linux, Desarrollo Web OpenSource.
Santiago, Chile
More information about the JDev
mailing list