AddUsersRequestType req = reqDoc.addNewAddUsersRequest();
UserType params = req.addNewCatalogUser();
params.setUserId(adminDN);
params.setUserName(userDN);
OperationResponseDocument responce = stub.addUsers(reqDoc);
if (null == responce || null == responce.getOperationResponse()) {
throw new MyLeadException("Invalid responce");
}
OperationResponseType outputType = responce.getOperationResponse();
Enum status = outputType.getStatus();
String queryResult = null;
if (status.equals(StatusEnumType.SUCCESS)) {
if (outputType.isSetMessage()) {
queryResult = outputType.getMessage();
}
} else {
if (outputType.isSetMessage()) {
logger.finest("faultMessage: " + outputType.getMessage());
throw new MyLeadException(outputType.getMessage());
}
}
if (status == StatusEnumType.FAILURE) {
throw new MyLeadException("Failed adding user:"
+ responce.toString());
}
logger.finest("queryResult: " + queryResult);
return queryResult;
} catch (RuntimeException e) {