strophe - Can't connect to XMPP server (openfire) with HTTP binding -


i'm trying learn xmpp protocol make web applications using it.

so, i've installed xmpp daemon called openfire, configured support http-bind, can connect using pidgin , default xmpp protocol.

the problem can't connect using http-binding. in pidgin have options when i'm connecting specify method whici want use connect server. if set connect using http-bind fails message: no session id given.

at client side, i'd use strophejs try make connection, doesn't work too. have this:

var conn = new strophe.connection("http://chat.dev/http-bind"); 

where http://chat.dev/http-bind location xmpp daemon. i've been forwarded location set on port in apache virtualhost, http://chat.dev/http-bind point same thing http: / / 127.0.0.1:7070.

conn.connect("test5", "test5", some_callback);  function some_callback(status) { if (status == strophe.status.connecting) {     console.log('strophe connecting.'); } else if (status == strophe.status.connfail) {     console.log('strophe failed connect.');   } else if (status == strophe.status.disconnecting) {     console.log('strophe disconnecting.'); } else if (status == strophe.status.disconnected) {     console.log('strophe disconnected.'); } else if (status == strophe.status.connected) {     console.log('strophe connected.');  // connection.disconnect(); } }  

this return: "strophe connecting."

well, don't know answer, i've been reading book xmpp , strophe, book doesn't cover aspect , documentation i've found doesn't me.

thanks.

try this- var conn = new strophe.connection("http://chat.dev/http-bind/");

need put '/' in end. worked me.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -