on 09-23-2015 1:53 AM
有朋友说类似opendocment的SDK的URL连接带TOKEN,想问下具体是什么样的,有知道的朋友么?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
我的意思是是哪样的URL,比如http://server:8080/OpenDocument/1409111437/OpenDocument/opendoc/opendocument.faces,类似这种,怎么在后面带了TOKEN只是到BI启动板的主页,而不是进入某张报表。
下面的jsp代码你参考下:
<%IEnterpriseSession sess = CrystalEnterprise.getSesionMgr().logon("administrator","password","localhost:6400", "secEnterprise");
String token = sess.getLogonTokenMgr().createLogonToken("", 120, 100);
sess.logoff();
String myUrl = ("http://localhost:8080/BOE/Opendocument/opendoc/openDocument.jsp?iDocID=adbceFGHijk&sIDType=CUID&toke...=" + token);
response.sendRedirect (myUrl);
%>
不是这个。这个的话我弄出来了的,是这样的,我已经把整个的报表查看,提示对象等都开发出来了,但是那个界面里没有首选项,我已经把权限控制好了,需要用户登陆到http://server:8080/BOE/BI里倒首选项去自己修改密码,设置查看WEBI的方式,以及在界面上修改自己的个人收藏夹信息等,但是当用户使用java登陆到报表界面的时候,再通过跳转的方式到http://server:8080/BOE/BI后没有保存第一次登陆的那个TOKEN,好像不是同一个域的感觉,也是用上面的代码吗?
奥。如果涉及到页面跳转还要记录登录信息的话,应该是Mophi说的把token放到session里保存。但是你说的http://server:8080/BOE/BI是BI产品的标准登录画面而不是你们自己的做的吧?
貌似我已经保存到SESSION里了,我发下代码。sessionMgr = CrystalEnterprise.getSessionMgr();
IEnterpriseSession enterprisesession = sessionMgr.logon(username,password,cms,authentication);
ILogonTokenMgr mgr = enterprisesession.getLogonMgr.logonTokenMgr();
String tokenStr = mgr.createLogonToken("",24*60,Integer.MAX_VALUE);
req.getSession().setAttribute("token",tokenStr);
你能看到KBA1601486吗?里面提到可以用 "http://<hostname>:<port>/BOE/BI/logon/start.do?ivsLogonToken="+logonTokenValue的格式用sdk的token登录BI Launchpad。
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.