[JDEV] XDB (external modules)

Keith Minkler keith at digix.dyndns.org
Mon Dec 11 20:29:45 CST 2000


yes, but you need to handshake first.. the jabberd server will not just send packets to anyone =]

here is a sample telnet session between me and a base_accept port:

keith at Flint:~$ telnet 24.48.71.2 6669
Trying 24.48.71.2...
Connected to 24.48.71.2.
Escape character is '^]'.
<stream:stream xmlns="jabber:component:accept" to="test" from="test">
<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' id='3A358CEB' xmlns='jabber:component:accept'>

<handshake>2ea6821f5afdaef01b212fa436a46a01b3cb6001</handshake>
<handshake/>


note that I first send data to the socket..

"test" is what is in my id attribute (i.e. <service id="test"> )

the handshake is created by sha hashing the session id...  (id='3A358CEB') concated with the password (foo in this case).  so in this case i do a SHA-1 hash of 3A358CEBfoo to get 2ea6821f5afdaef01b212fa436a46a01b3cb6001 for my handshake.

the server responds with <handshake/> if i have authed successfully...

at THIS point, your component will start to get packets from jabberd, never before it has authenticated.

Keith Minkler


On Mon, Dec 11, 2000 at 07:53:21PM -0600, 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




More information about the JDev mailing list