powered by Jive Software

Looking for informaion on BOSH

Hello all, where can I find out more informaion on how to use BOSH? I am looking for informaion on how to implement it.



Hi Tim,

Did you get any support for your ?. We are trying to use Openfire w/Smack and running into some issues - any sample code that you can post will be appreciated.


You have to use a javascript library to use BOSH. strophe.js is a nice library for that and there is book explaining how to use that, named “Professional XMPP Programming with.JavaScript and.jQuery”.

In order no use BOSH you may have to make cross domain call from client side. you have 2 choices for that

  1. use of flash component (the book mentioned above uses this approch.)

  2. you can configure a reverse proxy in your server

I’ve had success using the approach Sudipta mentions.

You can enable BOSH through openfire:

Through the admin console, under the ‘Server Settings’ tab, select ‘HTTP Binding’.

You can enable http binding here and the default port will be 7070.

So, now when you connect to your domain through code, you will connect to ‘http://domainname:7070’.

However you are not in the clear yet, there is one more issue to resolve:

JavaScript has a restriction for security reasons called the same origin policy. This policy states that a piece of javascript code cannot communicate with external servers.

If you’re using the approach mentioned in ‘Professional XMPP Programming with JavaScript and jQuery’, then you’re probably using ‘Strophe.js’ to manage your connections.

Using Strophe you have two options (that I’m aware of) for getting around this policy.

1.) Use flensed::flXHR a flash plug-in that works with Strophe. Flash does not have the same restrictions as javascript and is used as a work around.

2.) Configure your web server to use ‘reverse proxies’ to allow your javascript to speak ‘cross-domain’.

Without getting too deep into it, I believe option #2 scales better than option #1.

support of BOSH (XEP-206) is not mentioned in the list of supported standards. Is this standard officially supported or not?

Thanks for answering the question.