Welcome!

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

Reply
Contributor
Posts: 12
Registered: ‎08-24-2011
My Device: /
My Carrier: /
Accepted Solution

BES5 BAAWS Core findGroups error

Hello,

 

I'm a developer on BES5, trying to build an interface to manage Blackberry users.

I'm trying to get the group list in order to get a groupID to addd a user account, but when I'm loading the findGroupd method I'm Getting an error:

 

FindGroupReturnStatus.code = "UNKNOWN"

FindGroupReturnStatus.actor = "SERVER"

FindGroupReturnStatus.codeSpecified = true;

FindGroupReturnStatus.returnvalue.groups = null;

 

by SERVER do you mean BES SERVER or my Server, IIS Server..

 

I'm using your documentation method, thrue a proxy...finding users works fine.

 

Here is a part of my code: (as on your documentation I guess)

findGroups fg = new findGroups();

fg.organizationId = 0;

fg.locale = locale;

findGroupsResponse fgresponse = coreWebService.findGroups(fg);

FindGroupsResult fgresult = fgresponse.returnValue;

 

(coreWebService works fine for findusers)

 

Another question

How can i find the organizationId on the webconsole ?

 

Regards,

 

Geoffroy Lemagny

Developer
Developer
Posts: 18
Registered: ‎06-01-2011
My Device: 9800
My Carrier: Rogers

Re: BES5 BAAWS Core findGroups error

Hi Geoffroy.

 

Your code looks good.  Just for comparison, here is what I use when I want to change a user's group:

for (int j = 0; j < serviceAttributes.Length; j++)

{

if (serviceAttributes[j].GetType().Equals(typeof BASUserSearchResultServiceAttributes)))

{

BASUserSearchResultServiceAttributesType basServiceResultAttributes = serviceAttributes[j] as BASUserSearchResultServiceAttributesType;

 

String locale = "en_US";

int newgroupid = 0;

int currentgroupid = 0;

 

findGroups request = new findGroups();

request.organizationId = 0;

request.locale = locale;

findGroupsResponse response2 = coreWebService.findGroups(request);

 FindGroupsResult result4 = response2.returnValue;

 

for (int i3 = 0; i3 < result4.groups.Length; i3++)

{

Console.WriteLine("Current group id: " + result4.groups[i3].groupId + " name: "+ result4.groups[i3].localeNameAndDescription[0].name);

currentgroupid = result4.groups[i3].groupId;

 }

}

 

 

Kevin

 

Click "Accept as Solution" if your problem is solved. To give thanks, click on the KUDOS STAR
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: BES5 BAAWS Core findGroups error

Hi Geoffroy ,

 

Welcome to the community forums!

 

Use '0' for the Organization ID.

 

The FindGroupsResult object will contain a list of Group objects which you can iterate through to find all of the Group IDs.

 

Regards,

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 12
Registered: ‎08-24-2011
My Device: /
My Carrier: /

Re: BES5 BAAWS Core findGroups error

Thanks but Why am I getting the error "UNKNOWN" instead of SUCCESS ? As i wrote, findusers returns "SUCCESS" but findgroups "UNKNOWN"
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: BES5 BAAWS Core findGroups error

To rule out the possibility of an account issue, do you have any other accounts your could try this call with?
Also, could you try logging in to the BAS console with this same user account and selecting "Manage Groups" to see if the command executes properly?

Regards,
Garett
@garettBeuk
--
Goodbye everybody!
Developer
Developer
Posts: 18
Registered: ‎06-01-2011
My Device: 9800
My Carrier: Rogers

Re: BES5 BAAWS Core findGroups error

 

Can you try adding these lines after your code just to see if it gets that far:

Console.WriteLine("find group returnstatus.code: " + fgresult.findGroupsReturnStatus.code);

 

Console.WriteLine("find group returnstatus.actor: " + gfresult.findGroupsReturnStatus.actor);

 

Console.WriteLine("find group returnstatus.codeSpecified: " + fgresult.findGroupsReturnStatus.codeSpecified);

Click "Accept as Solution" if your problem is solved. To give thanks, click on the KUDOS STAR
Contributor
Posts: 12
Registered: ‎08-24-2011
My Device: /
My Carrier: /

Re: BES5 BAAWS Core findGroups error

Thx for replies

Yes I can login to the console and see groups with my blackberry admin account.

code: UNKNOWN
actor: server
codespecified: true --> Where can I get the code (error ?)

..what else..
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: BES5 BAAWS Core findGroups error

You have it, code = UNKNOWN, it's not entirely useful in this case though.

Could you try this with a few other account credentials? Possibly one with full admin rights, and let us know if it was successful?
Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 12
Registered: ‎08-24-2011
My Device: /
My Carrier: /

Re: BES5 BAAWS Core findGroups error

The account is a blackberry admin account (and by the way also Exchange admin). I ll try to recreate it tomorow...

Thx again
Contributor
Posts: 12
Registered: ‎08-24-2011
My Device: /
My Carrier: /

Re: BES5 BAAWS Core findGroups error

Smiley Tongue looks the same..