SDK sample demonstrating how to set up a cam_passport cookie

转自:http://www-01.ibm.com/support/docview.wss?uid=swg21344220

Question

How can you use the SDK to set up a cam_passport cookie?

Answer

The attached code will log on to the IBM Cognos Service, extract the CAMPassport from the biBusHeader, set a CAM_Passport cookie with the value extracted from the biBusHeader and redirect to Cognos Connection's Public Folders area.

Note: The CAM_Passport cookie which is set by the Java Servlet Page (JSP) is a temporary session cookie which will be deleted when the browser is closed.

Steps:

To run the sample:

  1. Start the IBM Cognos Service, this can be version 8 or 10.
  2. Copy setCookie.jsp under \webapps\samples.
  3. Edit the hard coded values at the top of the Java Servlet Page like endPoint, namespaceID, userID and password, to reflect your own environment.
  4. Enter the following URL in a browser:
http://localhost:9300/samples/setCookie.jsp
Depending on your installation, the server name and / or port number on the URL may need to be changed.

Beginning with IBM Cognos 8.4 additional cookie values must also be set , or the following errors may occur:
  • required capability is missing
  • You are not allowed to launch QueryStudio
  • The request is not valid
  • RSV-SRV-0063 An error occurred while executing the 'promptPagingForward_Request' command. CCL_ASSERT (pUserSessionID);

A new userCapabilities cookie was added since C8.4 and must also be set.
Note that Web Session parameters needed for IBM Cognos can change over the different versions.
Best practice is to set all the cookies available in the bibusheader after this logon. See the attachment under cognos8_4 and cognos10_1 for these examples.

For those new to the SDK, please refer to the following document under Software Development Kit documentation: IBM Cognos 8 Software Development Kit Getting Started.
The SDK and its manuals are a licensed product, and are not directly available from the IBM Cognos Support site.

VERSIONS:
/cognos8Compatible = CRN deprecated methods compatible with Cognos 8.1 & 8.2, NOT 8.3
/cognos8 = Cognos 8.1 and Cognos 8.2
/cognos8_3 = Cognos8.3 (tested with Java 1.4.x)
/cognos8_4 = Cognos 8.4
/cognos10_1 = Cognos 10.1

Historical Number

1008286

你可能感兴趣的:(SDK sample demonstrating how to set up a cam_passport cookie)