报告计划

时间:2013-01-03 08:41:44

标签: sdk scheduling cognos

我编写了一个使用java与Cognos集成的SDK。

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

当我搜索此异常时,我发现我的SDK代码应该生成TrustedCredentials以便运行scheudling。我在JDBCVisa类中读过那些代码。但我仍然得到同样的例外。

请参阅异常和JDBCVisa类代码(具体为generateTrustedCredentials):

  

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

SOAP-ENC:arrayType中= “厘米:基类[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;
}

0 个答案:

没有答案