How to add to list of features in disco#info

I have 2 XMPP clients (both written in smack) connected to Openfire. First client creates a connection, adds a feature and logins.

        XMPPTCPConnectionConfiguration.Builder builder = XMPPTCPConnectionConfiguration.builder().setSecurityMode(ConnectionConfiguration.SecurityMode.disabled).setUsernameAndPassword("user", "pass");

        XMPPTCPConnection connection = new XMPPTCPConnection(;

        // Get the service discovery manager
        ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection);


The second client does disco#info request to Openfire. I was hoping that this new feature would be listed in the response

<query xmlns=''>
<feature var=''/>

but it’s not the case.

So my question is how to expand/add new feature to the response from openfire to include the new feature or am I missing something here?

I believe my initial question was kinda wrong. It seems that to expand the disco#info, one needs to write a Openfire plugin. Something in the lines of

public class MyPlugin implements Plugin {

    public MyPlugin() {

    public void initializePlugin(PluginManager manager, File pluginDirectory) {
        XMPPServer server = XMPPServer.getInstance();
        server.getIQDiscoInfoHandler().addServerFeature("my custom feature");
        // etc
// etc etc

Service Discovery is used to query for the features that a particular target entity offers. It is not extraordinary to perform a Service Discovery request at a(nother) client, nor is to perform one at the XMPP server that you’re connected to. It all boils down to the question: of what entity do you want to know if it supports a particular feature: a(nother) client, or the server?