Disco info request

0down votefavorite

Hello, I’m developping an Android application in which I need to implement XMPP, so I’m using asmack.

I need to response to disco#info request from server. I want to create a response like that :

<iq id="123" type="result" to="x" from="y"> <xmlns="[http://jabber.org/protocol/disco#info](http://jabber.org/protocol/disco#info)"> <identity category="client" type="bot" name="oo" uid="{1111-2222-3333}"/> <feature var="urn:xmpp:ping"/> <feature var="jabber:iq:version"> <feature var="bb" version="123"/> </iq>

The problem is that I don’t know how to add uid in the identity and the version in the last feature. I have already do something :

ServiceDiscoveryManager discoManager= ServiceDiscoveryManager.getInstanceFor(connection);

discoManager.setIdentityName(``"oo"``);

discoManager.setIdentityType(``"bot"``);

discoManager.addFeature(``"urn:xmpp:ping"``);

discoManager.addFeature(``"jabber:iq:version"``);

discoManager.addFeature(``"bb"``);

Please, help me.

There is neither a ‘uid’ attribute specified for nor is there a ‘version’ attribute for the .

So I guess, this is not possible, since it would be invalid XML. (The specification does not allow it).

See http://xmpp.org/extensions/xep-0030.html#schemas-info

1 Like