powered by Jive Software

Openfire setting for a Chat

Hi , I am trying to develop a simple chat…

The connect and login with openfire server are ok !!!

The only thing is that , I don’t know how do I do to send and receive a message from an other user.

I try to create a chat between two users in this way :

//Craete a chat beetwen user1 and user2 ;I Don't receive any messages !!!!         ChatManager chatmanager = connection.getChatManager(); //connection port 5222          Chat newChat = chatmanager.createChat("user2", **new** MessageListener() {              **public** **void** processMessage(Chat chat, Message message) {                    System.out.println("Received message: " + message.getBody());              }          });          **try** {
         **catch** (XMPPException e) {}