【BO-SDK】SSO InfoView_1      (BOE SDK Java Applications @_2)

xiangjinling發表於2010-09-06

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】

[@more@]

初始介面;


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:
InfoView Start Page:

InfoView Start Page:

主要程式碼:

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));

/******or

String boURL = INFOVIEW_URL+"?ivsLogonToken="; //boURL:(=)
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(BO_USERNAME,
BO_PASSWORD, BO_CMS_NAME, BO_AUTH_TYPE);

String logonToken =enterpriseSession.getLogonTokenMgr().getDefaultToken();

String url = boURL + logonToken;

/*
* Redirect to InfoView, passing the serialized Enterprise Session.
*/

response.sendRedirect(url);

*****/

"%>"

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24167472/viewspace-1037957/,如需轉載,請註明出處,否則將追究法律責任。

相關文章