1

私はJavaを使用してCognosと統合するSDKを作成しました。

これは、通常cognos機能を使用している場合は正常に機能しています。しかし、カスタム名前空間を使用してcognosに直接ログインし、レポートをスケジュールすると、例外が発生します(例外セクションを参照)。

この例外についてググったとき、Scheudlingを実行するためにSDKコードがTrustedCredentialsを生成する必要があることがわかりました。私はすでにそのコードをJDBCVisaクラスに持っています。しかし、それでも私は同じ例外を受け取っています。

例外とJDBCVisaクラスコード(具体的にはgenerateTrustedCredentials)を参照してください。

例外================================================= ================================CM-CAM-4005認証できません。セキュリティディレクトリサーバーの接続を確認し、login.errorcamAuthUnrecoverableCAM-AAA-0194名前空間「xxx」への認証に失敗しました。CAM-AAA-0180サードパーティプロバイダーがユーザー回復可能な例外を返しました。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