This action sets the Business Area and Project for the current user within the database.
Class |
Name |
Type |
Required |
Details |
SetWorkingProjectAreaRequest |
userId |
String |
Yes |
The callers user name |
SetWorkingProjectAreaRequest |
password |
String |
Yes |
The callers password |
SetWorkingProjectAreaRequest |
areaId |
Integer |
Yes |
The area id to be set as the current area for the user |
SetWorkingProjectAreaRequest |
projectId |
Integer |
Yes |
The project id to be set as the current project for the user |
Class |
Name |
Type |
Required |
Details |
SetWorkingProjectAreaResponse |
success |
boolean |
Yes |
True is succeeded False if failed |
SetWorkingProjectAreaResponse |
returnCode |
String |
No |
See Appendix for details |
SetWorkingProjectAreaResponse |
returnMessage |
String |
No |
Human readable message |
public static void testSetWorkingProjectArea(EVSystemServiceStub stub) {
try {
SetWorkingProjectAreaDocument reqEnvelope =
SetWorkingProjectAreaDocument.Factory.newInstance();
SetWorkingProjectAreaRequest request =
reqEnvelope.addNewSetWorkingProjectArea().addNewParam0();
request.setUserId(ServiceClientHelper.ADMIN_USER_ID);
request.setPassword(ServiceClientHelper.ADMIN_PASSWORD);
request.setAreaId(0);
// GLOBAL AREA
request.setProjectId(0);
// MASTER PROJECT
SetWorkingProjectAreaResponseDocument resEnvelope =
stub.setWorkingProjectArea(reqEnvelope);
SetWorkingProjectAreaResponse response =
resEnvelope.getSetWorkingProjectAreaResponse().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");
}
}