Esteban Manchado Velázquez
06-05-2008, 12:12 AM
Hi,
I would like to do something that I thought it would be very simple, but I
can't figure out how to do it: I want access to user rosters from a component.
The idea is customising the response to user requests depending (e.g. service
discovery) on the contents of that user's roster.
I have tried with the examples in the book "Jabber Developer's Handbook"
(both trying with routing and with direct xdb requests), but I only get errors
back. I guess that maybe those requests are outdated (the book is quite old),
but I can't figure out how to do it correctly.
My attempt with routing is:
<route from='tada.localhost' to='estebanm@localhost/hunter'>
<iq id='1426' type='get'>
<query xmlns='jabber:iq:roster'/>
</iq>
</route>
and I get this back:
<route from='estebanm@localhost/hunter' to='tada.localhost' type='error'
xmlns='jabber:client'>
<iq id='1426' type='get'>
<query xmlns='jabber:iq:roster'/>
</iq>
<error code='400' type='modify'>
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</route>
My attempt with direct xdb is:
<xdb from='sessions' id='1225' to='estebanm@localhost' type='get'
xmlns='jabber:iq:roster'/>
but I get this back:
<xdb from='estebanm@localhost' to='sessions' id='1225' type='error'
xmlns='jabber:client'>
<error code='400' type='modify'>
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</xdb>
So, any ideas? Pointer to component development documentation maybe? I haven't
been able to find much about that. I am using ejabberd 2 BTW. TIA,
--
Esteban Manchado Velázquez <emanchado (AT) demiurgo (DOT) org>
_______________________________________________
JDev mailing list
FAQ: http://www.jabber.org/discussion-lists/jdev-faq
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: JDev-unsubscribe (AT) jabber (DOT) org
_______________________________________________
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iD8DBQFIRxL8hYgK5b1UDsERAgeOAJ9H3VGxQSzFFg4O7hVJVC 4prHQOmwCeMGJV
O2LXv0QapoTahxYKoeAq8/Y=
=jy34
-----END PGP SIGNATURE-----
I would like to do something that I thought it would be very simple, but I
can't figure out how to do it: I want access to user rosters from a component.
The idea is customising the response to user requests depending (e.g. service
discovery) on the contents of that user's roster.
I have tried with the examples in the book "Jabber Developer's Handbook"
(both trying with routing and with direct xdb requests), but I only get errors
back. I guess that maybe those requests are outdated (the book is quite old),
but I can't figure out how to do it correctly.
My attempt with routing is:
<route from='tada.localhost' to='estebanm@localhost/hunter'>
<iq id='1426' type='get'>
<query xmlns='jabber:iq:roster'/>
</iq>
</route>
and I get this back:
<route from='estebanm@localhost/hunter' to='tada.localhost' type='error'
xmlns='jabber:client'>
<iq id='1426' type='get'>
<query xmlns='jabber:iq:roster'/>
</iq>
<error code='400' type='modify'>
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</route>
My attempt with direct xdb is:
<xdb from='sessions' id='1225' to='estebanm@localhost' type='get'
xmlns='jabber:iq:roster'/>
but I get this back:
<xdb from='estebanm@localhost' to='sessions' id='1225' type='error'
xmlns='jabber:client'>
<error code='400' type='modify'>
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</xdb>
So, any ideas? Pointer to component development documentation maybe? I haven't
been able to find much about that. I am using ejabberd 2 BTW. TIA,
--
Esteban Manchado Velázquez <emanchado (AT) demiurgo (DOT) org>
_______________________________________________
JDev mailing list
FAQ: http://www.jabber.org/discussion-lists/jdev-faq
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: JDev-unsubscribe (AT) jabber (DOT) org
_______________________________________________
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iD8DBQFIRxL8hYgK5b1UDsERAgeOAJ9H3VGxQSzFFg4O7hVJVC 4prHQOmwCeMGJV
O2LXv0QapoTahxYKoeAq8/Y=
=jy34
-----END PGP SIGNATURE-----