cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3507
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Scott Baumann on 09-12-2010 10:35:40 PM
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>

Subject: RE: Cannot connect to BOSH on the Finesse Server
Replied by: Harry Bui on 13-12-2010 06:53:17 PM
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.

Subject: RE: Cannot connect to BOSH on the Finesse Server
Replied by: Roopa Trivedi on 13-12-2010 08:53:54 PM
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>


Subject: RE: Cannot connect to BOSH on the Finesse Server
Replied by: Scott Baumann on 14-12-2010 08:08:11 PM
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"
 
 

Subject: RE: Cannot connect to BOSH on the Finesse Server
Replied by: Guna Sekhar Reddy on 18-05-2012 05:30:31 AM
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

Subject: RE: New Message from Guna Sekhar Reddy in 2385312 - General Questions: RE:
Replied by: David Lender on 21-05-2012 01:41:26 PM
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://developer.cisco.com/jabber/doc/api/deploymentGuide.html



Hope this helps!

Subject: RE: Cannot connect to BOSH on the Finesse Server
Replied by: David Lender on 16-08-2012 11:13:15 AM
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

Subject: RE: Cannot connect to BOSH on the Finesse Server
Replied by: Rami Makram on 08-10-2013 06:03:24 AM
Dears,

I am getting exactly same error and cannot solve it at all, can anyone help, below is the code trying to connect with c#:
            JabberClient jc = new JabberClient();
            jc.User = "1000";//@ef.lab.eg/cisco"; 
            jc.Server = "192.168.1.164"; //Finesse IP
            jc.Password = "123456";
            jc.Resource = "cisco";
            jc.Port = 5222;
            jc.KeepAlive = 1f;
              jc.OnError += new bedrock.ExceptionHandler(jc_OnError);
            jc.OnStreamError += new jabber.protocol.ProtocolHandler(jc_OnStreamError);
            jc.OnInvalidCertificate += new System.Net.Security.RemoteCertificateValidationCallback(jc_OnInvalidCertificate);
            jc[Options.POLL_URL] = "http://localhost:100/http-bind/";//boshURL; this URL is translated to http://192.168.1.164:7071/http-bind using rules
            jc[Options.CONNECTION_TYPE] = ConnectionType.HTTP_Binding;
            jc.AutoLogin = false;
            jc.Connect();
            jc.Login();
            jc.User = jID.User;
            jc.Server = jID.Server;

Below is the order of messages I send and receive on wireshark:
SEND:<User><state>LOGIN</state><extension>1000</extension></User>

RECV<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" authid="fea2729d" sid="fea2729d" secure="true" requests="2" inactivity="30" polling="5" wait="60"><stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features></body>

SEND<body content="text/xml; charset=utf-8" to="192.168.1.164" wait="60" hold="5" xml:lang="en-US" rid="180292373" xmlns="http://jabber.org/protocol/httpbind"><iq id="JN_1" type="get" to="192.168.1.164" xmlns="jabber:client"><query xmlns="jabber:iq:register"><username>1000</username></query></iq></body>

RECV<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" authid="fea2729d" sid="fea2729d" secure="true" requests="2" inactivity="30" polling="5" wait="60"><stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features></body>

POST:<body sid="73209ead" rid="427952710" xmlns="http://jabber.org/protocol/httpbind"><auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">ADEwMDAAMTIzNDU2</auth></body>
POST:<body sid="73209ead" rid="427952711" xmlns="http://jabber.org/protocol/httpbind" />

RECV:<body xmlns='http://jabber.org/protocol/httpbind' ack='427952711'><success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/></body>

SEND:<body sid="73209ead" rid="427952712" xmlns="http://jabber.org/protocol/httpbind"><iq id="JN_1" type="set" to="192.168.1.164" xmlns="jabber:client"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>cisco</resource></bind></iq></body>RECV:<body xmlns='http://jabber.org/protocol/httpbind' ack='427952712'><iq xmlns="jabber:client" type="error" id="JN_1" from="192.168.1.164" to="finesse911.ef.lab.eg/73209ead"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>cisco</resource></bind><error code="400" type="modify"><bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq></body>

Subject: RE: New Message from Rami Makram in Finesse - General Questions: RE: Cannot
Replied by: David Lender on 08-10-2013 09:48:28 AM
I am not familiar with C#, but You have to do an http PUT to login, you do not send messages over the BOSH connection other than subscription requests in an iq and Finesse automatically subscribes you to User and Dialog events so you should not need to send *any* requests over the BOSH connection.

Subject: RE: New Message from David Lender in Finesse - General Questions: RE: New M
Replied by: David Lender on 08-10-2013 10:07:28 AM
Also, there is a nonGadgetSample in html and javascript that you can Login to Finesse with and look at the http messages in the browser debugger.  Perhaps this will help you see what a successful BOSH connection looks like.   The nongadget sample does require a proxy be set up.  See the instructions.

Subject: Re: New Message from David Lender in Finesse - General Questions: RE: New M
Replied by: Rami Makram on 08-10-2013 12:21:38 PM
Thanks David for the reply..

The first request is a PUT ad you said, and the agent is logged in
successfully..

For the Sample Non Gadget, I have already installed it and tried it, and
compared the packets before, they are the same.

I don't know why it replies with bad request, I have tried many things but
I cannot detect where the problem is..

Also I tried to register the jabber client before login, but failed to
login after..

In brief, the agent authentication is successful, it is the jabber client
that fails, and that's why i do not receive any alert from BOSH server

On Tuesday, October 8, 2013, Cisco Developer Community Forums wrote:

> David Lender has created a new message in the forum "General Questions":
> -------------------------------------------------------------- Also, there
> is a nonGadgetSample in html and javascript that you can Login to Finesse
> with and look at the http messages in the browser debugger. Perhaps this
> will help you see what a successful BOSH connection looks like. The
> nongadget sample does require a proxy be set up. See the instructions.
> --
> To respond to this post, please click the following link:
> http://developer.cisco.com/web/finesse/community/-/message_boards/view_message/19980816or simply reply to this email.



--

--
Best Regards,
Rami Makram
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links