on 07-10-2012 3:28 PM
I am working on a custom login page for Infoview using the Java SDK. I am using the following code so far: <br><br>
//Begin code snippet <br><br>
<pre>
<code>
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr" %>
<%@ page import="com.crystaldecisions.sdk.occa.security.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.managedreports.*" %>
<%@ page import="java.util.Enumeration" %>
<%@ page import="com.businessobjects.infoview.common.CrystalIdentity" %>
<%
String cms = "myserver";
String username = "user";
String password = "xxxx";
String authentication = "secEnterprise";
try
{
IEnterpriseSession enterpriseSession = CrystalEnterprise.getSessionMgr().logon( username, password, cms, authentication);
//Grab the InfoStore from the httpsession
IInfoStore infoStore = (IInfoStore)enterpriseSession.getService("", "InfoStore");
session.setAttribute("EnterpriseSession", enterpriseSession);
session.setAttribute("InfoStore", infoStore);
session.setAttribute("CMS", logonform.cmsname);
String logonToken = enterpriseSession.getLogonTokenMgr().getDefaultToken();
Cookie cookie = new Cookie("LogonToken", logonToken);
response.addCookie(cookie);
session.setAttribute("token", logonToken);
//URL it works ...
String infoViewURL ="http://<ip>:<port>/businessobjects/enterprise115/desktoplaunch/InfoView/start.do?ivsLogonToken="+ logonToken;
response.sendRedirect(infoViewURL);
}
catch(SDKException e)
{
System.out.println(e.getMessage());
}
This code successfully logs me in automatically to Infoview, but don't let me view my
custom dashboard webapp, viewing the error window is "Description: Cannot load the corporate dashboard
from the repository."
If I navigate to the dashboard directly I am not able to view it,
nor am I able to create a new dashboard (error message "no sess")
This dashboard works perfectly well if I log in using the standard Infoview login. I have
viewed the ssion parameters that are has follow:
EnterpriseSession:
(EnterpriseSession:logon=(SecuritySession:userInfo=null,apsName=APPNAME.CASCC1.LOCAL,userURI=osca:iiop://APPNAME.CASCC1.LOCAL;SI_SESSIONID=4687358JZ6diXXvYlmXzpiR,service manager=com.crystaldecisions.enterprise.ocaframework.ServiceMgr@95acdc,pluginMgr=com.crystaldecision...)
docInstance : com.businessobjects.rebean.wi.DocumentInstanceImpl@127e5eb
Is there something else I need to pass to the redirected URL to create a
multilevel Dashboard Builder/Performance Management session?
Please help!
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.