I have setup my open fire(jabber server) on local machine with two user testuser1 and testuser2 .using Spark client both users perform chat without any issue,it\'s nice.
Use below code for sending and receiving message
@Override
public void processMessage(Chat chat, Message message) {
// Print out any messages we get back to standard out.
System.out.println("Received message: " + message);
}
});
chat.sendMessage("How are you dear !!");
System.out.println(" Send Message succesfully");
For full code example visit How to send message using smack api