Xcelsius with Live Office - I don't want to authenticate!

Has anyone had any luck bypassing authentication in an Xcelsius dashboard with Live Office?

Is there any way to embed generic login info (a generic Enterprise account name and password) into a web page that serves up the .swf file, and pass that into the .swf file?


wtsees :us: (BOB member since 2009-09-08)

Yes that can be done quite easily using jsp for .net code. You simply create a web page, create a session to the BOE using the SDK and passing the session to the flash object using flash variables.


J0sh :australia: (BOB member since 2006-10-09)

I believe I’m really close to getting this to work, however I currently get an error when the dashboard loads :

“soapenv:Client: The service cannot be found for the endpoint reference (EPR) http://:/dswsbobje/services/session”

I do get a successful connection to the CMS. Any help anyone can provide is much appreciated!

Here is the code I’m using the JSP:

<%@ page import="com.crystaldecisions.sdk.exception.SDKException,
com.crystaldecisions.sdk.framework.*,
com.crystaldecisions.sdk.occa.infostore.*,
com.crystaldecisions.sdk.occa.security.*,
java.net.*,
com.crystaldecisions.Enterprise.*,
com.crystaldecisions.sdk.plugin.admin.*"
%>
<%@ page import="java.sql.*"%>  
<%


//-------------------------------------------------------------------Create BO Session and redirect to Infoview

IEnterpriseSession enterpriseSession;
String serializedSession = "";

/* * Set Enterprise Logon credentials. */
final String BO_CMS_NAME = "server";
final String BO_AUTH_TYPE = "secEnterprise";
final String BO_USERNAME = "username";
final String BO_PASSWORD = "password";

ILogonTokenMgr logonTokenMgr;
String defaultToken = "";

/* 
* Set Java InfoView start page URL 
*/

final String INFOVIEW_URL = "http://<server>:8080/InfoViewApp/logon/start.do";
/* 
* Log onto Enterprise and serialize the Enterprise Session. 
*/ 

boolean loggedIn = true;

try {
	enterpriseSession = CrystalEnterprise.getSessionMgr().logon(BO_USERNAME,BO_PASSWORD, BO_CMS_NAME, BO_AUTH_TYPE);
	serializedSession = enterpriseSession.getSerializedSession();

	logonTokenMgr = enterpriseSession.getLogonTokenMgr();
	defaultToken = logonTokenMgr.getDefaultToken();

}
catch (Exception error)
{
	loggedIn = false;
}

//-------------------------------------------------------------------If login successful

if(loggedIn) {  //only insert successful logins

String Flashvars="CELogonToken=" + defaultToken + "&amp;CEWebServiceURL=http://<server>::8080/dswsbobje/services/session";

String output = "";

output = output + "<PARAM NAME=movie VALUE='test.swf'>";

output = output + "<PARAM NAME=quality VALUE=high>";

output = output + "<PARAM NAME=FlashVars var='\"" + Flashvars + "\"'>";

output = output + "<EMBED src='test.swf' flashvars='\" " + Flashvars + "\"' quality=high bgcolor=#FFFFFF WIDTH='800' HEIGHT='600' NAME='myMovieName' 

ALIGN=\"\" TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED></OBJECT>";

out.println(output);

}

//-------------------------------------------------------------------If login failed
else {

out.println("Failed!");

}


%>

[Moderator Edit: Added code formatting - Andreas]


wtsees :us: (BOB member since 2009-09-08)

I believe the problem is with the token being passed from the JSP to the dashboard. The dashboard successfully loads, but fails when it tries to refresh the Live Office queries. If I remove the flashvars from the last output statement, the dashboard will load just fine, but still prompt for authentication.

Is there something I need to enable with the web server or services? Again, any help is hugely appreciated!


wtsees :us: (BOB member since 2009-09-08)

FYI to all, I was able to solve this problem. Below is working code to bypass the authentication popup in Xcelsius. This code logs onto the CMS using an Enterprise account, creates a connection token, then passes that token, along with the web services URL, to a new page created dynamically, which loads the dashboard.


<%@ page import="com.crystaldecisions.sdk.exception.SDKException,
com.crystaldecisions.sdk.framework.*,
com.crystaldecisions.sdk.occa.infostore.*,
com.crystaldecisions.sdk.occa.security.*,
java.net.*,
com.crystaldecisions.Enterprise.*,
com.crystaldecisions.sdk.plugin.admin.*,
com.businessobjects.webutil.Encoder"
%>
<%@ page import="java.sql.*"%>  
<%


//-------------------------------------------------------------------Create BO Session and redirect to Infoview

IEnterpriseSession enterpriseSession;

/* * Set Enterprise Logon credentials. */
final String BO_CMS_NAME = "[server]";
final String BO_AUTH_TYPE = "secEnterprise";
final String BO_USERNAME = "[username]";
final String BO_PASSWORD = "[password]";

ILogonTokenMgr logonTokenMgr;
String defaultToken = "";

final String INFOVIEW_URL = "http://[server]:[port]/InfoViewApp/logon/start.do";
/* 
* Log onto Enterprise  
*/ 

boolean loggedIn = true;

try {
	enterpriseSession = CrystalEnterprise.getSessionMgr().logon(BO_USERNAME,BO_PASSWORD, BO_CMS_NAME, BO_AUTH_TYPE);
	
	logonTokenMgr = enterpriseSession.getLogonTokenMgr();
	
	defaultToken = logonTokenMgr.createWCAToken("", 20, 1);
	

}
catch (Exception error)
{
	loggedIn = false;
}

//-------------------------------------------------------------------If login successful

if(loggedIn) {  

String Flashvars="&amp;CELogonToken=" + Encoder.encodeURL(defaultToken);
Flashvars += "&amp;CEWebServiceURL=" + Encoder.encodeURL("http://[server]:[port]/dswsbobje/services/session");

String output = ""; 

output = output + "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 

codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' id='myMovieName' style='width: 355px; height: 237px'> \r\r";
        
output = output + "<PARAM NAME=movie VALUE='System_Standards.swf'> \r\r";  //( \r = carriage return to make output more legible )

output = output + "<PARAM NAME=quality VALUE=high> \r\r";

output = output + "<PARAM NAME=FlashVars value=\"" + Flashvars + "\">\r\r";

output = output + "<EMBED src='System_Standards.swf' flashvars=\" " + Flashvars + "\" quality=high bgcolor=#FFFFFF WIDTH='1000' HEIGHT='600' 

NAME='myMovieName' ALIGN=\"\" TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED></OBJECT>\r\r";

out.println(output);


}

//-------------------------------------------------------------------If login failed
else {

out.println("Login to Business Objects Failed.");

}


%>

wtsees :us: (BOB member since 2009-09-08)

hi,

could you please help me with this, im create a jsp file but i cant connect bypass login
is another steps in xcelsius?? after create jsp file?

best regards

MAx


rey_killer (BOB member since 2009-07-08)

Thanks for your post.I have couple of questions on this.Do we need to export dashboard to infoview then create a jsp page and launch it from there.Or somethign else.Also do we need any setting in the Xcelcius dashboard for this to work.I would appreciate the reply.


DataGenius (BOB member since 2006-06-13)

Hi Pros!

We are also stuck at the authentication step :hb:

Currently we have an xcelsius output with Live Office connection which comes up with a authentication pop-up window :cuss:

Can anybody please share steps to bypass the Live Office authentication :smiley:

Thanks in Advance :slight_smile:
LS


luckysoul30 (BOB member since 2006-07-13)

Guys,

Finally we made it work :o
But there seems to be a timeout issue… any idea how to change the Timeout parameter for the session made through the JSP file??

We have already increased the timeout for all the possible apps in web.xml files.

Any help would be greatly appreciated :smiley:

LS


luckysoul30 (BOB member since 2006-07-13)

Resolved :mrgreen: :mrgreen:

In addition to other timeouts we missed the CMS connection timeout which is set at the Windows Registry Level :smiley:

Please go through this link for detailed steps - http://sunsethill.ca/articles/id/8/infoview-timeout-issues.aspx

LS


luckysoul30 (BOB member since 2006-07-13)


vinaykumar.beri (BOB member since 2012-06-25)