Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

Smack and Fastpath

$
0
0

Beginner smack question here

 

I'm trying to connect to an Openserver 3.8.1. with Fastpath with a simple java application with Smack 3.2.2

 

I got to send chat messages and change the presence in the server but I could not get to join Fastpath queues.

 

 

when I get to w.joinQueue

 

I get this packet

 

<iq id="yUygz-4" to="alex@servername.com/Smack" from="demo@workgroup.servername.com" type="error"><error code="503" type="CANCEL"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

 

is there any step I've not seen?

 

thank you in advance

 

 

Code

 

ConnectionConfiguration cc = new ConnectionConfiguration("192.168.22.180", 5222, "servername.com");

 

        con = new XMPPConnection(cc);

 

        try {

            con.connect();

        } catch (XMPPException e) {

            // TODO Auto-generated catch block

            e.printStackTrace();

        }

        con.addPacketListener(new ChatListener(), new PacketFilter() {

 

            @Override

            public boolean accept(Packet arg0) {

                // TODO Auto-generated method stub

                return true;

            }

        });

 

        try {

            con.login("alex", "alex");

        } catch (XMPPException e) {

            // TODO Auto-generated catch block

            e.printStackTrace();

        }

        con.getChatManager().addChatListener(new ChatManagerListener() {

            @Override

            public void chatCreated(Chat chat, boolean createdLocally) {

                if (!createdLocally)

                    chat.addMessageListener(new MessageListener() {

 

                        @Override

                        public void processMessage(Chat arg0, Message arg1) {

                            // TODO Auto-generated method stub

                            System.out.println(arg1.toXML());

                        }

                    });

                ;

            }

 

        });

 

        Workgroup wg = new Workgroup("demo@workgroup.servername.com", con);

        Form f = new Form(Form.TYPE_RESULT);

 

        try {

            wg.joinQueue(f);

        } catch (XMPPException e) {

            // TODO Auto-generated catch block

            e.printStackTrace();

        }


Viewing all articles
Browse latest Browse all 10742

Trending Articles