1

我已经使用 java 编写了一个 SDK 来与 Cognos 集成。

这在正常使用 cognos 功能时工作正常。但是当我使用我的自定义命名空间直接登录到 cognos 并安排报告时,我遇到了一个异常(se 异常部分)

当我用谷歌搜索这个异常时,我知道我的 SDK 代码应该生成 TrustedCredentials 才能运行调度。我的 JDBCVisa 类中已经有该代码。但我仍然得到同样的例外。

请查看异常和 JDBCVisa 类代码(具体为 generateTrustedCredentials):

例外 =================================================== ================================= CM-CAM-4005 无法验证。检查您的安全目录服务器连接并确认登录时输入的凭据。errorcamAuthUnrecoverableCAM-AAA-0194 对命名空间“xxx”的身份验证失败。CAM-AAA-0180 第 3 方提供商返回用户可恢复异常。1提供的凭据无效。无法对用户进行身份验证。请联系您的安全管理员。

SOAP-ENC:arrayType="cm:baseClass[0]">

public ITrustedCredential generateTrustedCredential(
    IBiBusHeader theAuthRequest) throws UserRecoverableException,
    SystemRecoverableException, UnrecoverableException
{
    CreateLog.LogMsg("generateTrustedCredential: Called  ");
    boolean isValidCredentials = true;
    String[] theUsername = null;
    String[] thePassword = null;

    // 1 - Look for credentials coming from SDK request
    theUsername = theAuthRequest.getCredentialValue("username");
    thePassword = theAuthRequest.getCredentialValue("password");

    if (theUsername == null && thePassword == null)
    {
        // 2 - Look for credentials in formfield
        theUsername = theAuthRequest.getFormFieldValue("CAMUsername");
        thePassword = theAuthRequest.getFormFieldValue("CAMPassword");
    }

    if (theUsername != null && theUsername.length == 1
        && theUsername[0].equals(username) && thePassword.length == 1)
    {
        isValidCredentials = this.validateConnection(theUsername[0], thePassword[0]);
    }
    else
    {
        isValidCredentials = this.validateConnection(this.username, this.password);
    }

    if (!isValidCredentials)
    {
        CreateLog.LogMsg("generateTrustedCredential: Invalid credos  ");
        UserRecoverableException e = new UserRecoverableException(
            "Please type your credentials for authentication.",
            "The provided credentials are invalid.");

        e.addDisplayObject(new ReadOnlyDisplayObject("User ID:",
            "CAMUsername", this.username));
            e.addDisplayObject(new TextNoEchoDisplayObject("Password:",
            "CAMPassword"));

        throw e;
    }

    TrustedCredential tc = new TrustedCredential();
    //tc.addCredentialValue("username", username);
    //tc.addCredentialValue("password", password);
    CreateLog.LogMsg("generateTrustedCredential: Successful  ");
    return tc;
}
4

0 回答 0