【BO-SDK】SSO InfoView_1 (BOE SDK Java A
时间:2010-09-06 来源:xiangjinling
Demonstrates how to Single Sign-On to XI 3.0 Java InfoView by logging onto BusinessObjects Enterprise and passing a serialized Enterprise Session.
【for JSP】
初始界面;
Demonstrates how to Single Sign-On to XI 3.0 Java InfoView by logging onto BusinessObjects Enterprise and passing a serialized Enterprise Session.
Required info | |
---|---|
CMS Name: | |
User Name: | |
Password: | |
Authentication Type: | Enterprise LDAP Windows AD |
InfoView Start Page: | |
InfoView Start Page:
http://host:port/InfoViewApp/listing/main.do
主要代码:
Import:
com.crystaldecisions.sdk.exception.SDKException,
com.crystaldecisions.sdk.framework.*,
com.crystaldecisions.sdk.occa.infostore.*"
...
"<%"
IEnterpriseSession enterpriseSession;
String serializedSession;
/*
* Retrieve Enterprise Logon credentials.
*/
final String BO_CMS_NAME = request.getParameter("cmsN");
final String BO_AUTH_TYPE = request.getParameter("bo_auth_type");
final String BO_USERNAME = request.getParameter("userN");
final String BO_PASSWORD = request.getParameter("pass");
/*
* Retrieve Java InfoView start page URL
*/
final String INFOVIEW_URL = request.getParameter("infoviewUrl");
/*
* Log onto Enterprise and serialize the Enterprise Session.
*/
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(BO_USERNAME,
BO_PASSWORD, BO_CMS_NAME, BO_AUTH_TYPE);
serializedSession = enterpriseSession.getSerializedSession();
/*
* Redirect to InfoView, passing the serialized Enterprise Session.
*/
response.sendRedirect(INFOVIEW_URL + "?ivsLogonSession=" + java.net.URLEncoder.encode(serializedSession));
"%>"