03-13-2012 02:00 PM
I am seeing this error on a device model 9850. The web service call findDeviceForUser is being made in asynchronous mode and always fails. The error message is "Runtime exception occurred."
What could cause the API to fail with one device? The API is working fine with other devices, including several of the same model.
Any suggestions on further debugging this issue?
03-13-2012 02:43 PM
Could you provide a code snippet with values filled in?
How does the device appear in the BAS?
Could you clarify what you mean by "asynchronous"? This call should be synchronous.
Regards,
03-13-2012 03:42 PM
Here is a sample of how we use the async methods to process a batch of devices. We initiate N find device requests, wait on the async handles, then query for each response.
for (int j = 0; j < asyncCnt; j++)
{
findDeviceForUser request = new findDeviceForUser();
request.loadDeviceServiceAttributes = true;
request.locale = _locale;
request.userId = userIds[i + j];
// make the async calls
findDeviceResponses[j] = _coreWebService.BeginfindDeviceForUser(request, null, null);
hFindDevices[j] = findDeviceResponses[j].AsyncWaitHandle;
}
if (System.Threading.WaitHandle.WaitAll(hFindDevices, nTimeout, false))
{
// write the data from async calls to respective output files
for (int j = 0; j < asyncCnt; j++)
{
try
{
FindDeviceForUserResult result =_coreWebService.EndfindDeviceForUser(findDeviceRe
...
The EndfindDeviceForUser only returns the error status for a single device, and the same device fails each time.
All properties for this device appear normal and up to date in the BAS view.
03-13-2012 03:44 PM
Could you provide the data being used for the call for this particular device call?
03-13-2012 04:58 PM
For the request in question:
request.loadDeviceServiceAttributes = true;
request.locale = "en_US"
request.userId = "777"
03-14-2012 09:20 AM
It sounds like an issue with the data on the BES/BAS. BWS only relays this information. I would suggest investigating the BAS-AS logs and/or opening a ticket to get this investigated from a server-side team (help@blackberry.com).
Regards,
03-14-2012 09:34 AM
Thanks!