WSO2用户自行注册

时间:2014-07-18 09:16:14

标签: wso2 wso2is

我正在尝试使用Java客户端调用WSO2 Identity Server Web服务。

public static void main(String[] args) {
    UserInformationRecoveryService service = new UserInformationRecoveryService();
    UserInformationRecoveryServicePortType port = service
            .getUserInformationRecoveryServiceHttpsSoap11Endpoint();

    BindingProvider prov = (BindingProvider) port;

    prov.getRequestContext()
            .put(BindingProvider.USERNAME_PROPERTY, "admin");
    prov.getRequestContext()
            .put(BindingProvider.PASSWORD_PROPERTY, "admin");

    try {

        List<UserIdentityClaimDTO> list = port
                .getUserIdentitySupportedClaims("http://schemas.xmlsoap.org/ws/2005/05/identity");
        System.out.println(port
                .registerUser("user96", "Asdf@234", list, "profile", "")
                .getUserId().getValue());

    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

}

当我传入的密码与密码标准不符时,我可以在WSO2日志中看到错误消息:

  

违反了密码模式政策。密码应包含一个数字[0-9],一个小写字母[a-z],一个大写字母[A-Z],一个!@#$%&amp; *字符

但是当密码兼容时,我只是收到错误

  

org.wso2.carbon.identity.mgt.services.UserInformationRecoveryServiceIdentityMgtServiceException_Exception:添加用户时出错:user96

WSO2日志中没有任何内容,并且未添加用户。关于这里有什么问题的任何线索?

1 个答案:

答案 0 :(得分:0)

更好地在日志配置文件中启用调试日志。 [IS_Home] /repository/conf/log4j.properties 添加以下条目 log4j.logger.org.wso2.carbon.user.core = DEBUG

这将提供有助于理解问题的调试日志

相关问题