On Mon, Apr 19, 2010 at 10:56 AM, Ricardo Faria <[email protected]> wrote:
> I'm trying to create a simple XMPP client with Smack. My problem is this:
>
> // Create a MultiUserChat using an XMPPConnection for a room
> MultiUserChat muc = new MultiUserChat(conn1, "myr...@localhost");
>
> // 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));
>
>
> When I try to create the room I get an exception saying "No response from
> the server", and the server is running. Does this means that creating rooms
> isn't yet implemented in Vysper?
Creating rooms is implemented, but not forms. And, in addition, you
need to run MUC on a subdomain. So, let's say you run your server on
vysper.org, by default MUC will respond to stanzas sent to
chat.vysper.org (configurable using the MUCModule constructor). In
this case, the following code will work:
// Create a MultiUserChat using an XMPPConnection for a room
MultiUserChat muc = new MultiUserChat(client,
"[email protected]");
// Create the room
muc.create("testbot");
It will create a room with the default settings and add yourself as
testbot in the room.
/niklas