cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4053
Views
0
Helpful
2
Replies

Jabber Connect Error: Not Authorized

jmennear
Cisco Employee
Cisco Employee

I have having trouble identifying why the XML API is returning an error on "Connect".

The code I am using is pretty simple:

<script src="http://code.jquery.com/jquery-1.4.2.js"></script>

        <script type="text/javascript" src="caxl/jabberwerx.js"></script>

        <script type="text/javascript">

           var client = new jabberwerx.Client('safeway');

            var connectArgs = {

                // the proxy url to the BOSH server

                httpBindingURL: 'https://cisco ACE cup server:7335/httpbinding',

                // onConnected is the success callback method

                successCallback: onConnected,

                // onClientError is the error callback method

                errorCallback: onClientError

            };

        function login() {

            var username = document.getElementById("username").value;

            var password = document.getElementById("password").value;

            client.connect(username, password, connectArgs);

            $("#log").append( "<br>attempting to connect");

        }

        function onConnected(event) {

            $("#log").append( "<br>connection successful");

            client.sendPresence('away', 'gone to lunch');

            $("#log").append("<br>set as away");

        }

        function onClientError(event) {

            var data = event.xml;

            data = data.replace(/</g, "&lt;");

            data = data.replace(/>/g, "&gt;");

            $("#log").append( "<br>connection not ssuccessful: " + data);

        }

        </script>

My Jabber server is a 9.7 and the jabberwerx.js file has a version stamp of 8.7.6.

Could this be a version issue?

-john

1 Accepted Solution

Accepted Solutions

It turned out the problem was that

The end user was assigned to different CUPS node that is not the same as the BOSH URL we are trying to request.

Assign the end user to the corresponding node has fixed the problem

Regards,

Howard

View solution in original post

2 Replies 2

jmennear
Cisco Employee
Cisco Employee


Based on some of the other comments I see in the forum I have replaced the server name with the ipaddress of the server.


"<stream:error xmlns:stream="http://etherx.jabber.org/streams"><xml-not-well-formed xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error>"

This change has made it so that a previous error of "Not Authorized" has been replaced with this new error of "xml-not-well-formed".


I am using sample code to run against an ACE program server within Cisco IT.

It turned out the problem was that

The end user was assigned to different CUPS node that is not the same as the BOSH URL we are trying to request.

Assign the end user to the corresponding node has fixed the problem

Regards,

Howard

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: