Hi,
I am a newbie to XMPP and open fire server. I am trying to add new feature to my xmpp client. So in response to disco#info this new feature will be sent back.
Using http://www.igniterealtime.org/builds/smack/docs/latest/documentation/extensions/ disco.html
I have created a small app which adds new feature.
publicclass SmackApiTest { static ServiceDiscoveryManager discoManager; publicstaticvoid main(String args[]) throws Throwable { XMPPConnection connection; XMPPConnection.DEBUG_ENABLED = true; ConnectionConfiguration config = new ConnectionConfiguration("myhost", 5222); connection = new XMPPConnection(config); connection.connect(); connection.login("admin@myhost", "password"); discoManager = ServiceDiscoveryManager.getInstanceFor(connection); discoManager.addFeature("some:new:feature"); System.out.println("Feature added: " + discoManager.includesFeature("some:new:feature")); } // connection.disconnect();}
From PSI when I send an <iq /> stanz for discovering services, it does not show newly added feature.
<iq type="get" id="df3ff" xmlns="jabber:client" from="ad@localhost/PSI" to="admin@myhost"> <query xmlns="http://jabber.org/protocol/disco#info"/></iq>
Response:
<iq type="result" id="df3ff" xmlns="jabber:client" from="admin@myhost" to="ad@localhost/PSI"> <query xmlns="http://jabber.org/protocol/disco#info"> <identity category="account" type="registered"/> <identity category="pubsub" type="pep"/> <feature var="http://jabber.org/protocol/disco#info"/> </query></iq>
Any help?
Thanks