hi members,
when i ran the program below i got the following error
Creation failed - Missing acknowledge of room creation.:
please reply soon.
import org.jivesoftware.smackx.*;
import org.jivesoftware.smackx.muc.*;
import org.jivesoftware.smack.*;
import java.util.*;
public class testresr{
public static void main(String args[])
{
try{
XMPPConnection conn1 = new XMPPConnection(“tsscc-197”);
conn1.login(“vimal”,“vimal”);
MultiUserChat muc = new MultiUserChat(conn1, “newroom@conference.tsscc-197”);
// Create the room
muc.create(“vimal”);
// Get the the room’'s configuration form
Form form = muc.getConfigurationForm();
// Create a new form to submit based on the original form
Form submitForm = form.createAnswerForm();
// Add default answers to the form to submit
for (Iterator fields = form.getFields(); fields.hasNext() {
FormField field = (FormField) fields.next();
if (!FormField.TYPE_HIDDEN.equals(field.getType()) && field.getVariable() != null) {
// Sets the default value as the answer
submitForm.setDefaultAnswer(field.getVariable());
}
}
// Sets the new owner of the room
List owners = new ArrayList();
owners.add(“ravindran@tsscc-197”);
submitForm.setAnswer(“muc#roomconfig_roomowners”, owners);
// Send the completed form (with default values) to the server to configure the room
muc.sendConfigurationForm(submitForm);
}
catch(Exception e)
{
System.out.println(e);
}
}
}
regards,
vimalkumar