on 09-18-2014 12:01 PM
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?
Ciao Roberto,
Not sure if I can help you much but if I were you I would create log messages so you know what is really null.
What's really strange is:
->>>> enterpriseSession.logoff();
Why do you logoff before you even call the redirect?
Anyhow I would add debug information so I know what is really null and where it is happening.
Or you debug the request?
Hth.
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andreas. Thank you for your support. Also for me it's strange the logoff but in the guide http://help.sap.com/businessobject/product_guides/boexir4/en/xi4_opendocument_en.pdf there is a script on how to obtain the token. In that script there is the logoff. However I tried to remove this action without success. Really I don't know how I can debug the response because in the jsp page the redirect is formally correct. Regards
Yes I'm agree with you .... The problem, from my point of view, is related to the response.sendRedirect(bo_cms_url + "&token="+tokenEncode); Formally the url is correct: http://NTBO4:8080/BOE/OpenDocument/opendoc/openDocument.jsp?iDocID=Ab3R7uNJ0F9Ot6Bg4mLhjaQ&sIDType=C... Is there a trace on BO that I can check?
Hmm there should be, since its using REST-WS.
But another question:
Did you try the serialized session aswell?
I would do it like this:
1. Try sending the URL without the token - if you receive a promtp - you should be fine.
-> if not - Problem is the Token
2. Try using the serialized session - if it works -decide wether to use sS or figure out the token problem.
3. Analyse the token problem. Since the token is using an additional licence, you should be able to verify the token ID - or even get the encoded URL.
Let me know.
Cheers,.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.