Blogs

Showing 1 - 5 of 22 results.
Items per Page 5
of 5

Forums

« Back to General Questions

Cannot connect to BOSH on the Finesse Server

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Cannot connect to BOSH on the Finesse Server
bosh xmpp finesse ajax cisco error 400 jetty library reference uri xmpp
Answer
12/10/10 4:35 AM
I'm trying to connect to BOSH on the Finesse Server. The Cisco AJAX XMPP Library reference states that to test the BOSH server, I should get an HTTP ERROR 400 when I navigate to 'http://some-bosh-server.com:7335/httpbinding'
When I navigate to http://<MyFinesseServerIP>:7335/httpbinding, the connection times out. Looking at the port section of the install guide, it looks like BOSH is open on port 7071. I tried to navigate to http://<MyFinesseServerIP>:7071/httpbinding and I am getting a 404. Does the BOSH server on the Finesse machine require a different URI?

<h2>HTTP ERROR: 404</h2>
<pre>NOT_FOUND</pre>
RequestURI=/httpbinding
<small>Powered by Jetty://</small>

I'm trying to connect to BOSH on the Finesse Server. The Cisco AJAX XMPP Library reference states that to test the BOSH server, I should get an HTTP ERROR 400 when I navigate to 'http://some-bosh-server.com:7335/httpbinding'
When I navigate to http://<MyFinesseServerIP>:7335/httpbinding, the connection times out. Looking at the port section of the install guide, it looks like BOSH is open on port 7071. I tried to navigate to http://<MyFinesseServerIP>:7071/httpbinding and I am getting a 404. Does the BOSH server on the Finesse machine require a different URI?

<h2>HTTP ERROR: 404</h2>
<pre>NOT_FOUND</pre>
RequestURI=/httpbinding
<small>Powered by Jetty://</small>

 
The URI bind specified by the CAXL documentation is different from the bind that Finesse uses. For Finesse, please use http://<MyFinesseServerIP>:7071/http-bind. The Developer Guide should mention the correct URI bind, as well as the README that came with the CDN samples.

Hi Scott,
The correct url to use for a BOSH connection for Finesse is -
http://<host>:7071/http-bind/
 
Let me know if this does not work.
Thanks,
Roopa
 
I'm trying to connect to BOSH on the Finesse Server. The Cisco AJAX XMPP Library reference states that to test the BOSH server, I should get an HTTP ERROR 400 when I navigate to 'http://some-bosh-server.com:7335/httpbinding'
When I navigate to http://<MyFinesseServerIP>:7335/httpbinding, the connection times out. Looking at the port section of the install guide, it looks like BOSH is open on port 7071. I tried to navigate to http://<MyFinesseServerIP>:7071/httpbinding and I am getting a 404. Does the BOSH server on the Finesse machine require a different URI?

<h2>HTTP ERROR: 404</h2>
<pre>NOT_FOUND</pre>
RequestURI=/httpbinding
<small>Powered by Jetty://</small>

Hi Scott,
The correct url to use for a BOSH connection for Finesse is -
http://<host>:7071/http-bind/

Thank you very much! -This worked perfectly.
 
FYI -  For those of you trying to use Apache mod_Proxy to proxy the BOSH connection, if you are not getting the 400 (BAD REQUEST) error, you may need to add  "ProxyErrorOverride On" to your proxy.conf, as well as run  "/usr/sbin/setsebool httpd_can_network_connect 1"
 
 

Hi Scott,

I'm new to this kind of development. And I'm trying to connect to finesse and login as an agent using XMPP library. Hre is the script I'm using

client = new jabberwerx.Client();

var arg = {
httpBindingURL: 'http://192.168.10.197:7071/finesse/api/User/1025',
successCallback: function() {
alert("agent is connected");
},
errorCallback: function(evt) {

alert("agent is not connected");
}
};

client.event("clientStatusChanged").bind(function(evt) {
if (evt.data.next == jabberwerx.Client.status_connected) {
alert("connected");
client.sendMessage("1025@192.168.10.197", "Hello XMPP User.");
}
else
{
alert(evt.data.next);
}
});

client.event("messageReceived").bind(function(evt) {
var message = evt.data;
var body = message.getBody();
if (body) {
alert("From " + message.getFrom() + ": " + body);
}
});

jabberwerx.$(document).bind("ready", function() {
client.connect("1025@192.168.10.197", "1025", arg);
});


which is taken from reference documents provided in the XMPP library. However I'm not able to login.

As you have worked on this, please help me to learn how to do this.

I would really appreciate your quick help.

Thanks in advance

Due to same-origin policy (https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript) in browsers, the JavaScript cannot perform JS connections to a host+domain that is different from where the page is being hosted on. There are a few solutions (all having pros and cons).

1. Create a proxy where a specific path is rerouted to the host:7071. This has a performance impact.
2. Using CORS (cross-origin resource sharing). This requires server support. http://enable-cors.org/
3. Create another IFRAME that loads a page with the JW connect code seen below. The IFRAME will then pass all the events and connection information through the iframe to other frames using HTML5 post-message. This is what Finesse does. It requires the use go post-message which is only supported in newer browsers which is one of the reasons Finesse is supported on IE8+ and not lower.

#1 and 2 above are described in the JW docs http://jabberwerx.cisco.com/jwa//trunk/doc/api/deploymentGuide.html <http://jabberwerx.cisco.com/jwa/trunk/doc/api/deploymentGuide.html>



Hope this helps!

A Finesse non-gadget sample is now available in the Tools section of the Finesse Documentation page here

http://developer.cisco.com/web/finesse/docs

Collateral


No files available