MultiUserChat problem

hi,

i’'m building an IM client using the smack API and wildfire 3.0.0 server. As is illustrated in the documentation i try the following code but the server returns an error packet ERROR 400(Bad Request).

MultiUserChat muc = new MultiUserChat(myActiveXMPPConnection, roomAddy@mydomain);

try{

muc.create(“simple”); // i’'ve tested and i know the exception is thrown at this line

muc…//i submit default configuration form at this point

}

catch(Exception xex){

//

}

the server just sends me an error packet with the above error code

i also send invitations out with the muc instance, it doesn’'t send them it returns the same error packet with the above error code.

ps. i’'lld appreciate any help

thanks.

before i tried the MultiUserChat class, i tried to use the GroupChat class but i got the same response from the server (ERROR 400 – BAD REQUEST) so my guess is that its an issue with my server.

In addition to your domain, you need to specify the service name of the wifi muc.

2.7 defaulted to conference not sure about 3.0 so if you use conference.mydomain it may work.

MultiUserChat muc = new MultiUserChat(myActiveXMPPConnection, roomAddy@conference.mydomain);

HTH!

it conference, i tried it already and it didn’'t work (roomname@confernce.domain)

pls i’'ll appreciate any other suggestions

Hi,

To check if there is no configuration or server problem you can run a JUnit test. Running the org.jivesoftware.smackx.muc.MultiUserChatCreationTest should be enough.

If that works then this code must also work.

try {
               XMPPConnection conn = new XMPPConnection("domain");
               conn.login("user", "pass");                MultiUserChat muc = new MultiUserChat(conn, "myroom@conference.domain");                // Create the room
               muc.create("testbot");                // Send an empty room configuration form which indicates that we want
               // an instant room
               muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));                // Destroy the new room
               muc.destroy("The room has almost no activity...", null);
          } catch (XMPPException e) {
               e.printStackTrace();
          }

If it doesn’'t work then you may have a configuration problem. To check if it is a client problem try connecting to a public server, like jabber.org.

After this last test the problem causes are reduced, so if you want post the result and I’'ll try to help you.