Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Web Services

New Developer
Posts: 15
Registered: ‎08-14-2013
My Device: Bold 9000
My Carrier: T-Mobile

Getting ITPolicy status via BWS for EA v5.0.3.24

Hey there,


I'm delepoing an application that get the users data from the server.

The server is installed with an old version so I'm forced to use the BWS Smiley Sad

but I'm learned to live with it Smiley Happy

I'm using this example as a template.

So my code is like this:



            const string methodName = "DisplayUserDetails()";

            if (user == null)
                // logging error

            GetUsersDetailRequest request = new GetUsersDetailRequest();
            request.metadata = BasicSettingData.Metadata;

            GetDevicesDetailRequest device_request = new GetDevicesDetailRequest();
            device_request.metadata = BasicSettingData.Metadata;

            List<User> users = new List<User>();

            List<Device> devices = new List<Device>();
            foreach (Device device in user.devices)

            request.loadAccounts = true;
            request.loadDevices = true;
            request.loadITPolicies = true;
            request.users = users.ToArray();

            device_request.loadReconciledITPolicy = true;
            device_request.loadServiceAttributes = true;
            device_request.devices = devices.ToArray();

            GetUsersDetailResponse response = null;
            GetDevicesDetailResponse device_response = null;
                response = BasicSettingData.bwsService.getUsersDetail(request);
                device_response = BasicSettingData.bwsService.getDevicesDetail(device_request);
            catch (Exception e)
                // Log and re-throw exception.
                throw e;


After this I insterted a break point to see why the nullReferenceException happened and see that the individualResponses of the device_response is null.


However in the response I see everything filled properly.


I don't really know what I messed up!?

New Developer
Posts: 15
Registered: ‎08-14-2013
My Device: Bold 9000
My Carrier: T-Mobile

Re: Getting ITPolicy status via BWS for EA v5.0.3.24

****** UPDATE


I runned the same code on a different server enviroment, that one is much faster, and everything work as it should be.

There are individularesponses and everything.


I'm wondering, if the experienced issue is because of the long delay of the server.

Is there any way to set the timeout paramtere? 


I know about one BasicSettingData.bwsUtilService.Timeout, however the change on this value has no affect.