[JDEV] XDB (external modules)

David Waite dwaite at jabber.com
Mon Dec 11 18:21:31 CST 2000


Server modules must authenticate with the server. You send a
stream:stream header with appropriate namespace (jabber:component:accept
in this case, I believe), then the server responds with its own with an
'id' attribute embedded. Do a SHA1 of (id + secret) to get the handshake
value, then send this in a <handshake> tag. The server will respond with
an empty handshake tag if you authenticated correctly, and you are in.

For a Java example, see JabberBean (the DNS server for jabberbeans.org
seems to be having problems, try jabberbeans.sourceforge.net)
org.jabber.jabberbeans.serverside.Launcher contains the logic for
accept, connect, and exec. There is some code which uses this in the
src/jabberbeans-tests dir as well. (HelloWorldTransport)

- David Waite

Colin Madere wrote:

>
>
> was: [JDEV] FreeBSD and MIO
>
> I'm missing something.
>
> - Set up XDB tag like below
> - put in custom namespace
> - run jabberd
>
> all seems ok, "myxdbservice" shows up in the jabberd startup
>
> I thought that what I had to do now was write a program which connects
> via a socket to port 7001 and when a request gets routed to this xdb
> service due to the registered namespace it would send that request.
> The external module (Java program in this case) does a read operation
> on the socket and should wait until it gets data to continue.
>
> But... all I get is a timeout.  jabberd debug states it and my Java
> program gets a correctly formed XML "TimeOut" error message sent to it
> from jabberd.  Leaving input stream timeout to default in Java program
> (indefinite).
>
> Appears as though JabberD is waiting for something from the Java xdb
> module, but this seems backwards, what am I missing?
>
> Colin Madere
>
> -----Original Message-----
> From: Edward J Becker [mailto:Sauron at mediaone.net]
> Sent: Friday, December 08, 2000 6:18 PM
> To: jdev at jabber.org
> Subject: RE: [JDEV] FreeBSD and MIO
>
>
> Ah, thanks! That makes much more sense and sounds fun I am going to
> play
> with that tonight.
>
> Thanks!
>
> Edward
>
> -----Original Message-----
> From: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org]On Behalf Of
>
> Schuyler Heath
> Sent: Friday, December 08, 2000 7:28 AM
> To: jdev at jabber.org
> Subject: Re: [JDEV] FreeBSD and MIO
>
> Hello,
>
> On Fri, Dec 08, 2000 at 12:58:58PM -0500, Edward J Becker wrote:
> > Does this mean that in order to handle XDB by a custom component
> that some
> > code must be written natively as a .SO ?
>
> Nope.
>
> <xdb id="xdbjava.localhost">
>   <ns>jabber:iq:roster</ns>
>   <accept>
>     <ip/>
>     <port>7001</port>
>     <secret>test</secret>
>   </accept>
> </xdb>
>
> Here's a post I made which briefly outlines the XDB interface:
>
> http://mailman.jabber.org/pipermail/jdev/2000-November/003946.html
>
> Schuyler
>
> > I was hoping to have a separate (likely Java) component handle XDB
> and was
> > hoping sockets were used for communication. Is this possible? Am I
> missing
> > something?
> >
> > Edward
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20001211/13393ceb/attachment-0002.htm>


More information about the JDev mailing list