i tought you will not able to  solve this problem about chat "just with
GWT". please consider to use commet to solve problem about chat

regards,
gede sutarsa

2009/3/2 frankCostello <[email protected]>

>
> Hi,
> In openfire I have registred 2 user : user1 and user2
> When the users connect to openfire with the method connect(), in the
> server the users are online.
>
> The problem is this :
>
> When I create a chat beetwen the users , the 2 users don't receive any
> messages.
>
> Do I do to set openfire server??
> The method connect() it's ok because in the openfire I've seen the
> user online!
> The only thing that I don't know is how do I create a chat between 2
> users.
>
>
> My Code:
>  public class SmackServiceImpl extends RemoteServiceServlet
> implements
>        SmackService {
>
>    public void connect(String l, int port, String service, String
> user, String pass) {
>        try {
>                ConnectionConfiguration config=new
> ConnectionConfiguration(l, port, service);
>                XMPPConnection connection =new XMPPConnection
> (config);
>                    connection.connect();
>                    connection.login( user, pass);
>                    Presence presence = new Presence
> (Presence.Type.available);
>                    connection.sendPacket(presence);
>      }
>        catch(Exception e) {
>            System.out.println(e.getLocalizedMessage());
>        }
>    }
>
> //I try to create a chat beetwen user1 and user2 ; but I don't receive
> any messages !!!!
>
>
>        ChatManager chatmanager = connection.getChatManager();
>
>         Chat newChat = chatmanager.createChat("user2", new
> MessageListener() {
>
>             public void processMessage(Chat chat, Message message) {
>
>                   System.out.println("Received message: " +
> message.getBody());
>
>             }
>
>         });
>
>         try {
>             newChat.sendMessage("Hello");
>         }
>         catch (XMPPException e) {}
>
>
>    }
>
>
> Thanks
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to