Hi all, we are trying to call a report via openDocument URL managing the logon with a jsp page on BO XI 4.
We create in the JSP the logon token
//Create session token enterpriseSession = CrystalEnterprise.getSessionMgr() .logon(bo_username, bo_password, BO_CMS_NAME, BO_AUTH_TYPE); logonTokenMgr = enterpriseSession.getLogonTokenMgr(); defaultToken = logonTokenMgr.createLogonToken("",120,100); String tokenEncode = URLEncoder.encode(defaultToken, "UTF-8"); enterpriseSession.logoff();
Then we do the redirect ....
sDocNameStr = IDOCID_NAME_PARAMETER + "=" + "Ab3R7uNJ0F9Ot6Bg4mLhjaQ" +"&"+ IDOCTYPE_NAME_PARAMETER; bo_cms_url = BO_CMS_PROTOCOL + BO_CMS_NAME + ":"+ BO_CMS_PORT + "/" + BO_CMS_PATH + "?"+ sDocNameStr; response.sendRedirect(bo_cms_url + "&token="+tokenEncode);
But from the server we receive the following error : java.lang.NullPointerException (see the attachment IMG1) This is the output.println ...
Seems that the token is not valid or correct to open the report but if we open a CMC session then we are able to load the report (see the attachment IMG2)
May you help me?