I am working on a mobile native application in Blackberry WebWorks. My application runs on Tomcat 5.5 which fetches data from an ASMX webservice running on IIS 7.5. I am getting timeout after a timeperiod of 2mins during data-fetching operation. I can not over come this problem please help me to overcome. I am setting the ajax time out and in the config file I have also mentioned the timeout, still I am getting the timed out. I am posting the code snippet here below for your reference.
$.ajax({
type: 'POST',
url: "http://myurl:port/projectpath.action",
data: formInput,
dataType: "TEXT",
timeout:600000,
async: true,
success:function(jqXHR, textStatus, errorThrown){
alert("error :" + textStatus);
alert("incoming Text :" + jqXHR.responseText);
alert("What ErrorThrown :" + errorThrown);
$('#loader').hide();
window.location.replace("paymentResult.html");
},
error:function(jqXHR, textStatus, errorThrown){
alert("error " + textStatus);
alert("incoming Text " + jqXHR.responseText);
alert("What ErrorThrown" +errorThrown);
$('#loader').hide();
}
});
return false;
});
I am getting the timeout through the below mentioned Ajax alert message.
alert("What ErrorThrown" +errorThrown);
In my config file, my parameters passed are:
"rim:connection timeout="600000""
"id"TCP_WIFI"/id"
"id"MDS"/id"
"id"BIS-B"/id"
"id"TCP_CELLULAR"/id"
"id"WAP2"/id"
"id"WAP"/id"
"/rim:connection"
Please help me.
Thanks in advance