powered by Jive Software

How to add new Feature

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.

public class SmackApiTest {
  static ServiceDiscoveryManager discoManager;   public static void main(String args[]) throws Throwable   {
     XMPPConnection connection;
     XMPPConnection.DEBUG_ENABLED = true;
     ConnectionConfiguration config = new ConnectionConfiguration("myhost", 5222);
     connection = new XMPPConnection(config);
     connection.login("admin@myhost", "password");
     discoManager = ServiceDiscoveryManager.getInstanceFor(connection);
     System.out.println("Feature added: " + discoManager.includesFeature("some:new:feature"));
   // connection.disconnect();

From PSI when I send an 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"/>

Any help?

any help?

Maybe there was no response because you posted this in the wrong group/forum. Moving from “Openfire Development” and to “Smack Development”.

Your code looks correct. You could try a smack nighlty and see if the behavior stays the same. Also make sure to get a trace of the stanza that is send as reply by Smack to rule out that the server is alterting somehow.

hmm just wondering if you have been able to solve this issue? Im facing the same problem now and I couldn’t figure out whats wrong