cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Please note that Remote Expert Mobile announced end-of-life and support will end on February 28, 2022.
2466
Views
0
Helpful
2
Replies
Cisco Employee

Jabber Connect Error: Not Authorized

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

Everyone's tags (5)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Contributor

Re: Jabber Connect Error: Not Authorized

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
Highlighted
Cisco Employee

Re: Jabber Connect Error: Not Authorized


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.

Highlighted
Contributor

Re: Jabber Connect Error: Not Authorized

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

CreatePlease to create content
This widget could not be displayed.