I trying to write a function to remove all conference rooms on a jabber server.
When i try to run the following code
private static void removeAllRooms() {
try {
XMPPConnection con = new XMPPConnection(“xxx”);
con.login(“xxx”, “xxx”);
Collection c = MultiUserChat.getHostedRooms(con, “xxx”);
for (Iterator iter = c.iterator(); iter.hasNext() {
HostedRoom room = (HostedRoom) iter.next();
MultiUserChat muc = new MultiUserChat(con, room.getJid());
muc.destroy("", “”);
}
} catch (XMPPException e) {
e.printStackTrace();
}
}
i get the error message
No response from server.:
at org.jivesoftware.smackx.muc.MultiUserChat.destroy(MultiUserChat.java:665)
at RemoveConferenceRooms.removeAllRooms(RemoveConferenceRooms.java:27)
at RemoveConferenceRooms.main(RemoveConferenceRooms.java:12)
The exception is being throw at the line that calls destroy. I know that connection stuff works because calling other functions other than destroy work.
I am using Wildfire 2.6.2.
Does anybody know what i am doing wrong ?
Thanks