Service discovery

Hi all,

I’'ve just played with Smatck. I used ServiceDiscoveryManager to add some features to my client. But when I want to discovery these features using the code below :

ServiceDiscoveryManager sdisc = ServiceDiscoveryManager.getInstanceFor(connection);

DiscoverInfo discoverInfo = sdisc.discoverInfo("lemon@mychat.com");

The debugger gived out the errors :

With this error message, my clients can’'t negotiate to one another. Any suggestions for this problem ?

regards.

Nick.

Hey Nick,

Are you trying to discover features of another client? If so you will need to specify the resource of the user. Bare JIDs (no resource) will be handled by the server and not delivered to the client.

Regards,

– Gato

Hi Gato,

I try to discovery another client with full JID like this :

DiscoverInfo discoverInfo = sdisc.discoverInfo("lemon123@mychat.com/Smatck");

But it still gives out the error XML stanza like above. According to JEP-0030 (Service Discovery), each entity MUST support at least “http://jabber.org/protocol/disco#info” feature. Do I need to implement this feature on client ?

Do u have any idea about this ?

regards,

Nick.

Hey Nick,

Are you sure you are giving a valid JID address? In your example the resource is Smatck and not Smack. If you are sending the disco request to a Smack client you should get the client information. Make sure that you are giving a real & valid full JID address. BTW, what server are you using?

Regards,

– Gato

Hey Gato,

I am playing with it for a while and it’'s done. The server I am using is Jive.

Thanks for your advice.

Regards,

Nick.