04-14-2014 12:02 PM
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, "<");
data = data.replace(/>/g, ">");
$("#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
Solved! Go to Solution.
05-08-2014 09:16 AM
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
04-14-2014 12:37 PM
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.
05-08-2014 09:16 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide