0

I have an HTML file in which I am including these lines.

<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.conversejs.org/css/converse.min.css">
<script src="https://cdn.conversejs.org/dist/converse.min.js"></script>
<script src="index.js"></script>

and my index.js contains this code.

converse.initialize({
    bosh_service_url: 'http://localhost:7070/http-bind/',
    console.log(bosh_service_url)    
    jid: 'admin@localhost',
    password:'root'
});

so can anybody tell me what I am doing wrong here. I am getting no response message on console(not even error). I think there is some problem with this bosh url. I am not getting any active client session in openfire.

yam
  • 27
  • 7

1 Answers1

1

I'm pretty sure that that console.log() statement messes up your configuration object. I'd remove that.

Also, this assumes that the browser can reach your instance of Openfire on 'localhost' (port 7070) which will only work in browsers that are opened on the same machine as where Openfire is running.

Finally, your JID includes 'localhost'. Is that the XMPP domain name that you have configured in Openfire (which, at best, is a very confusing value to use)?

You can lookup the configured values for the XMPP domain (which you need to use as part of the JID), but also the fully qualified domain name of the server (which you should use as part of the BOSH service URL) on the first page (after login) of the Openfire Admin Console.

Guus
  • 2,986
  • 2
  • 21
  • 32