0

I have installed open fire server and http://domain.com/http-bind is also fine. And strophe is also working fine.Tried to setup using this setup guide: [Candy Setup Guide][1].

I am stucked in Connecting .

Candy Installation Guide[1]: http://candy-chat.github.io/candy/#setup "Candy Setup Guide"

  Strophe is connecting.
  SENT: <body rid='797907051' xmlns='http://jabber.org/protocol/httpbind'       to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8'  ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>

SENT: <body rid='797907051' xmlns='http://jabber.org/protocol/httpbind' to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
SENT: <body rid='797907051' xmlns='http://jabber.org/protocol/httpbind' to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
SENT: <body rid='797907051' xmlns='http://jabber.org/protocol/httpbind' to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
Strophe is disconnecting.

Above is the display output of strophe, I have changed my domian to example.com

   $(document).ready(function() {
   Candy.init('http://example.com/http-bind/', {
   core: {
   debug: true,
   autojoin: ['example@conference.example.com', 'hrirks@conference.example.com']
   },
   view: { resources: 'res/' }
   });

   Candy.Core.connect();
});

I copied index.html to candy root directory. I got following message in firebug console,Response

  <html>
  <head><title>Openfire HTTP Binding Service</title></head>
  <body><font face="Arial, Helvetica"><b>Openfire <a href="http://www.xmpp.org/extensions/xep-0124.html">HTTP Binding</a> Service</b></font></body>
  </html>
 And got this in POST
  <body rid='3334381189' xmlns='http://jabber.org/protocol/httpbind' to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
hrirks
  • 25
  • 2
  • 10

3 Answers3

0

You need to call Candy.Core.attach or Candy.Core.connect after init AND include the parameters.

Candy.Core.connect(jidOrHost, password, nick);
Mark S
  • 869
  • 6
  • 11
  • oops i forget to paste in my question, i called Candy.Core.connect after init – hrirks Mar 28 '14 at 15:55
  • Are you using connect or attach? Are you sure the credentials are valid? What's the first response? Can you connect to the jabber server using another client such as pidgin? – Mark S Mar 28 '14 at 21:13
  • ya i can connect using pidgim , and i connected using strophejs example too – hrirks Mar 29 '14 at 06:02
  • You are not connecting to the jabber server. Are you using connect or attach? Also, add "debug:true" to the core: {} and check the console and report back. – Mark S Mar 31 '14 at 17:43
  • You're missing something. It's probably failing due to the script error you're getting. You need to step into the debugger and find out what's missing. In order to figure this out, please update your original question with your code that contains your init, the attach or connect and the onconnect callback. Without seeing it, we're just guessing. Also, are you using the latest versions of Candy and Strophe? – Mark S Apr 01 '14 at 20:18
  • i got following response : Openfire HTTP Binding Service Openfire HTTP Binding Service – hrirks Apr 01 '14 at 21:15
  • yes , i am using latest version of CAndy and strophe ,ok i will update the question – hrirks Apr 01 '14 at 21:16
  • i got the following error: ReferenceError: admin is not defined Candy.Core.connect(admin , password , hrirks); – hrirks Apr 02 '14 at 09:38
  • Did you define admin in your script? If it's a user, it should be the full jid. (var admin='user@jabberservername.com') – Mark S Apr 02 '14 at 12:43
  • Looks like the Openfire server is not configured correctly or you have the wrong path maybe. – Mark S Apr 02 '14 at 18:04
  • thank you , you are atleast trying to help me :) , but i could not figure out what's the problem – hrirks Apr 02 '14 at 18:15
  • Can you connect to the rooms you have listed in pidgin? Try only auto connecting to one. If that doesn't work, set autojoin: [] and see what that does – Mark S Apr 02 '14 at 18:26
0

please check if u r missing the exact port , for my case it is domain_name:5280/bosh

0

There's a plugin for Openfire that supplies an integrated version of Candy. There's nothing that you need to configure for that to work, after you installed the plugin.

Side note: Candy has gone unmaintained for a long while. As a result, various important issues are not addressed. You're probably better of using Converse (which similar to the 'candy' plugin, can be added to Openfire by using the 'inVerse' plugin for Openfire)

Guus
  • 2,986
  • 2
  • 21
  • 32