If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

JSP cam_passport Cookie ?

Started by pw, 27 Feb 2006 11:31:03 AM

Previous topic - Next topic

pw

Hi Folks,

i am using following example code for a customized login screen:


<%@ page import="com.cognos.developer.schemas.bibus._2.*"%>
<%
        // connection to the ReportNet service
        String endPoint = "http://localhost/crn/cgi-bin/cognos.cgi";
        String namespaceID = "AD";
        String userID = "Admin";
        String password = "XXXX";

       CognosReportNetServiceLocator service = new CognosReportNetServiceLocator();
       CognosReportNetPortType oCrn = service.getCognosReportNetPort(new java.net.URL(endPoint));

StringBuffer credentialXML = new StringBuffer();
credentialXML.append("<credential>");


credentialXML.append("<namespace>").append(namespaceID).append("</namespace>");
credentialXML.append("<username>").append(userID).append("</username>");
credentialXML.append("<password>").append(password).append("</password>");
credentialXML.append("</credential>"); String encodedCredentials = credentialXML.toString();

    oCrn.logon(encodedCredentials, new String[0]);

    // get the cam_passport from the biBusHeader
    BiBusHeader bibus = (BiBusHeader)((CognosReportNetBindingStub)oCrn).getHeaderObject("", "biBusHeader");
    String passport = bibus.getCAM().getCAMPassport().getId();

    // set the cam_passport cookie
    Cookie camPassport = new Cookie("cam_passport", passport);
    camPassport.setMaxAge(-1);
        camPassport.setPath("/"); response.addCookie(camPassport);

        String reportURL = endPoint + "?b_action=xts.run&m=portal/cc.xts&m_tab=w";
        response.sendRedirect(response.encodeRedirectURL(reportURL));

%>


Somehow i wonÃ,´t see any cookie after logging in. After processing this code, the original ReportNet Login Screen appears, but there should be the ReportNet Main page....

I enabled cookies on IE 6. Same problem comes up in Firefox...... i canÃ,´t figure it out.

Thanks in advance.
pw