You may find what you need by this link:
Java - trying to prebind converse.js using bosh but not able to get the sid and rid...using the smack bosh
Other way, if you can use javascript to get jid, sid and rid, you can refer below:
You can use strophe.js
to create a bosh bind first, then get them from the connection.
//I user local openfire here
var BOSH_SERVICE = 'http://127.0.0.1:7070/http-bind/';
var connection = null;
//you can get your usr and pwd in other way
var jid = 'admin@127.0.0.1';
var password = 'admin';
connection = new Strophe.Connection(BOSH_SERVICE);
connection.connect(jid,
password,
onConnect);
and then get the detail from onConnect()
function like this:
function onConnect(status)
{
if (status == Strophe.Status.CONNECTED) {
//then you can get what you want
console.log("---SID[" + connection._proto.sid + "] RID[" + connection._proto.rid + "] JID[" + jid + "]");
}
}
good luck!