public boolean processPasswordRecoveryLink(String userId, String userKey) throws AxisFault {
   try {
     return stub.processPasswordRecovery(userId, userKey, "EMAIL");
   } catch (Exception e) {
     handleException(e.getMessage(), e);
   }
   return false;
 }
  public VerificationBean confirmLink(String confirmationKey) throws AxisFault {
    try {
      return stub.confirmUserAccount(confirmationKey);
    } catch (Exception e) {
      handleException(e.getMessage(), e);
    }

    return null;
  }
  public UserChallengesDTO[] getChallengeQuestionsOfUser(String userId, String userKey)
      throws AxisFault {
    try {
      return stub.getChallengeQuestionsForUser(userId, userKey);
    } catch (Exception e) {
      handleException(e.getMessage(), e);
    }

    return new UserChallengesDTO[0];
  }
 public boolean updateCredential(
     String userId, String userKey, String password, CaptchaInfoBean captchaInfoBean)
     throws AxisFault {
   try {
     VerificationBean bean = stub.updateCredential(userId, userKey, password, captchaInfoBean);
     return bean.getVerified();
   } catch (Exception e) {
     handleException(e.getMessage(), e);
   }
   return false;
 }
  public VerificationBean verifyChallengeQuestion(
      String userId, String userKey, String question, String answer) throws AxisFault {
    try {
      UserChallengesDTO dto = new UserChallengesDTO();
      dto.setQuestion(question);
      dto.setAnswer(answer);
      return stub.verifyChallengeQuestion(userId, userKey, new UserChallengesDTO[] {dto});
    } catch (Exception e) {
      handleException(e.getMessage(), e);
    }

    return null;
  }
 public IdentityManagementClient(String cookie, String url, ConfigurationContext configContext)
     throws Exception {
   try {
     stub =
         new UserIdentityManagementServiceStub(
             configContext, url + "UserIdentityManagementService");
     ServiceClient client = stub._getServiceClient();
     Options option = client.getOptions();
     option.setManageSession(true);
     option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
   } catch (Exception e) {
     handleException(e.getMessage(), e);
   }
 }