Using a Paid support hour, Vlad worked with me.
TLDR - Tomcat was throwing a 403. Something in Tomcat config was messed up. We don't know what or why. Just replacing web.xml allowed connecting the first time.
What did I learn:
1) If I would have remembered, I could have checked the Tomcat Log (not Aware's Tomcat Output / Server Output) and I would have seen the 403 errors.
2) During the support call, Vlad altered some code to have more descriptive error msgs from the login process.
Part of the "phonegap build" is the creation of "the red" login screen (as seen in the Building Native Apps in Aware video).
After <Submit> another JS routine is called. That file is \AwareIM\aware_kendo\mobileNative.js
Vlad had already had me put some alert lines there so I could see 2 variables that were being sent to the server.
In the run() function, I added 2 alerts before the AJAX call:
Code: Select all
run : function ()
{
var xmlStr = this.buildRequest ();
var h = {};
h ["Content-Type"] = "application/x-www-form-urlencoded; charset=UTF-8";
kendo.ui.progress ($(document.body), true);
var me = this;
//alert ("url: " + this.m_serverURL + 'request.awmn');
//alert ("data :" + xmlStr);
$.ajax ({
... but nothing was learned from that.
So Vlad added this loop in the Failure code of the AJAX call.
This is where we saw the 403 being returned, and then verified that in the Tomcat logs.
Code: Select all
// default connection failure
failure : function (response, status)
{
kendo.ui.progress ($(document.body), false);
//alert ("Connection failed! Status: " + response);
if (! response)
alert("Response is null");
var property;
for (property in response) {
alert("Property " + property + " value: " + response[property]);
}
}
In retrospect, it would be more helpful if the Aware msg would have said something more that just "connection failure. Status:error". If it would have said "connection failure. Status 403 from server" then I'm sure it would have saved me 9 hours of frustration and $120. Well, not 100% sure. Because for whatever reason, Tomcat was rejecting the call from the phone, but not rejecting a login via Chrome. Chrome was coming in as a normal WEB connection, while the APK was an AJAX call to request.awmn.
Anyway, got it solved. I doubt someone else is going to have a corrupted/altered Tomcat config file that causes a similar failure. But hopefully this explanation will help someone else in the future.