How can I get active rooms list from ejabberd?

I am writing a chat bot using gloox lib. I can not get room list, just receive StanzaErrorServiceUnavailable. I think this problem comes from mod_disco. With mod_disco, I try some values but there is nothing changed.

Here is my implementation:

I have my class:
ChatBotDiscoHandler_cl: public DiscoHandler
implementing
handleDiscoItems( const JID& from, const Disco::Items& items, int context );
Then I call
m_pClient->disco()->getDiscoItems(m_pClient->jid().server(), EmptyString, new ChatBotDiscoHandler_cl(), 0);
However, when I debug, in Disco::handleIqID method, I get StanzaErrorServiceUnavailable with my iq, then it does not run into my handleDiscoItems method.

Please show me how to fix it?

thuyentm@rocketmail.com

Syndicate content