Enable http-bind in openfire

I am trying to enable a BOSH connection through Openfire so that I can create an XMPP client over the network. curretly I test it with strophe.js.

the problem is that I try to run the following url in the browser that I get

http://www.mydomain.com:7070/http-bind 

next mistake

 HTTP ERROR 400 Problem accessing /http-bind/. Reason: Bad Request Powered by Jetty:// 

here is my server setup, I saw several threads, but they do not fit

enter image description here

Update

I made a connection using strophe, but I get the following error in trance browser

enter image description here

+4
source share
5 answers

In your update, Strophe sends OPTIONS HTTP requests, which means it is negotiating cross-domain communications. Requests are colored red, which means that for some reason this does not work. Possibly the wrong configuration. There is a good article here: http://metajack.im/2010/01/19/crossdomain-ajax-for-xmpp-http-binding-made-easy/

Otherwise, when Strophe does its normal BOSH connection, it uses the POST method.

+2
source

Now it works on my system.

I think your error arose, maybe a configuration problem with openfire.

It is designed to respond using HTTP 400 Bad Request if there is no element in the request. You can verify this yourself by providing an item in your request.

Try using the following URL in your browser:

  http://www.servername:7070/http-bind/?<body rid="1"/> 
+6
source

Your installation is correct. The page displayed by the browser is also normal. The Openfires BOSH component is not designed to work in the browser with HTTP GET, only with BOSH clients such as strophe. Try connecting to the stanza.

0
source

You must use a proxy to resubmit the request to the openfire server. Since the js message cannot support cross domain.

Notes:
1. I am using jsjac, but I think it is not important.
2. If you are sure that your config is correct, restart the openfire server. This is my experience.

0
source

If the server is configured correctly, it should display

 HTTP ERROR: 404 Problem accessing /http-bind/. Reason: Not Found Powered by Jetty:// 

The bad request disappeared when I uninstall and reinstall Openfire as in here .

0
source

All Articles