This action gets all the possible roles available to all users within the ExtraView database.
Input
Class |
Name |
Type |
Required |
Details |
GetAllUserRolesRequest |
userId |
String |
Yes |
The callers user name |
GetAllUserRolesRequest |
password |
String |
Yes |
The callers password |
Output
Class |
Name |
Type |
Required |
Details |
|
success |
boolean |
Yes |
True is succeeded False if failed |
|
returnCode |
String |
No |
See Appendix for details |
|
returnMessage |
String |
No |
Human readable message |
|
roles |
Array[] |
No |
A list of RoleBeans |
|
roleId |
String |
Yes |
|
|
currentRole |
boolean |
Yes |
|
|
roleName |
String |
Yes |
|
Example
public static void testGetUserRolesByUser(EVUserServiceStub stub) {
try {
GetAllUserRolesDocument reqEnvelope = GetAllUserRolesDocument.Factory.newInstance();
GetAllUserRolesRequest request = reqEnvelope.addNewGetAllUserRoles().addNewRequest();
request.setUserId(ServiceClientHelper.ADMIN_USER_ID);
request.setPassword(ServiceClientHelper.ADMIN_PASSWORD);
GetAllUserRolesResponseDocument resEnvelope = stub.getAllUserRoles(reqEnvelope);
GetAllUserRolesResponse response =
resEnvelope.getGetAllUserRolesResponse().getReturn();
if (response.getSuccess()) {
System.out.println("success: [" + response.getReturnCode() + "] : " +
response.getReturnMessage());
} else {
System.out.println("failure: [" + response.getReturnCode() + "] : " +
response.getReturnMessage());
}
} catch (Exception e) {
e.printStackTrace();
System.err.println("nnn");
}
}