How to generate MYSAPSSO2 cookie?

Hello!
Is it possible to generate MYSAPSSO2 cookie in WebDynpro or J2EE/JSP applications? These apps running as standalone, not in the SAP Portal. Also WD apps not using sap.authentificate property since I have to use my own login algorithm for it.
If yes could you give a code snippets for this? I've tried to find it but found snippets only for reading such cookie.
P.S. I'm working with SAP Web AS 7.0
regards, Lev

hi Lev
check this
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/17be8b32-0a01-0010-51bc-8fe5e11d204e
http://help.sap.com/saphelp_nw04s/helpdata/en/ac/ce417acc9a4d48aa52fa562cb9b194/content.htm
http://www.scribd.com/doc/6558564/HOWTO-Create-Custom-Application-for-Handling-J2EE-Engine-Multi
let me know ami got it or not
bvr
Edited by: bvr on Apr 7, 2009 2:56 PM

Similar Messages

  • Information of the MYSAPSSO2 Cookie

    Hello everybody,
    I am working with SSO and I've instaled analyzer tool to look how the cookies are, on "Information of the MYSAPSSO2 Cookie". The other day worked but now it seems like doesn't works because all parameters shows as null.
    How can i known if my portal sends cookies or not?
    Thanks
    Guillermo

    Hi,
    Michael, my portal certificate has not expired the date shows from Mon Mar 06 20:30:28 CET 2006 to Thu Mar 06 20:30:28 CET 2008 (i didnt want to be rude, but the button was obvious one for me, thank you)
    I suspect my portal doesn't generates that cookie and probably I have anything wrong in the UM configuration...i've read that the parameter ume.usermapping.unsecure=FALSE has to be TRUE but this parameter is to do with the user mapping method isn't it?
    Maybe another thing in UM configuration that i dont realize?
    Thanks again.

  • MYSAPSSO2 Cookie not found in IE

    Hi Everyone,
    I am trying to implement SSO between a third party Java application and the SAP EP 7.0. As a test procedure, I log in to my portal and then run my code to see if I can retrieve and decrypt the MYSAPSSO2 cookie.
    My code works perfectly when I log in to the portal using Mozilla Firefox (2.0.0.1); I can see the MYSAPSSO2 cookie and decrypt it (Log file output below). However, when I use IE (6.0.3790.1830) to log in to the portal, I can not retrieve the MYSAPSSO2 cookie. It seems as if this cookie does not even exists. I am thinking the cookie is somehow hidden and therefore my code can't see it.
    Has anyone faced this issue before? I have tried to decrease the security settings on IE but that doesn't help things. Any help on this issue would be really appreciated!
    Pasted below is a snippet of my code.
    //request is a HttpServletRequest object
    Cookie[] allCookies = request.getCookies();
                        int allCookiesLength = allCookies.length;
                        for (int i = 0 ; i<allCookiesLength; i++)
                             Log.debug("Cookie Name at " + i + " = " + allCookies<i>.getName());
                             if(allCookies<i>.getName().compareToIgnoreCase("MYSAPSSO2")==0)
                                  SAP_SSO_COOKIE =  allCookies<i>;
                                                    Log.debug("Cookie Found!");
                                  cookieFound = true;
                                  break;
                                            Log.debug("Cookie NOT Found!");
                             cookieFound = false;
    <u><b>Log file Output with IE</b></u>
    2007.02.07 13:05:31 Cookie Name at 1 = saplb_*
    2007.02.07 13:05:31 Cookie Name at 2 = JSESSIONID
    2007.02.07 13:05:31 Cookie NOT Found!
    <u><b>Log file Output with Firefox</b></u>
    2007.02.07 13:54:15 Cookie Name at 0 = saplb_*
    2007.02.07 13:54:15 Cookie Name at 1 = PortalAlias
    2007.02.07 13:54:15 Cookie Name at 2 = JSESSIONID
    2007.02.07 13:54:15 Cookie Name at 3 = MYSAPSSO2
    2007.02.07 13:54:15 Cookie Found!
    Thanks
    MOY

    Michael,
    I changed the parameter "httponlycookie" to FALSE and this works. My issue was that when I set the parameter to FALSE, I restarted my J2EE engine. For some odd reason, after the restart this parameter was set back to TRUE. Whats even worse, or maybe even cool, depends how you look at it, is that this parameter is set back to TRUE even if I closed down Visual Admin and fire it up again (without restarting the server). However, in this case SSO still works because the J2EE settings are not updated with this TRUE value. Is there a security setting which sets back this parameter to TRUE every time the server is restarted or when Visual Admin is fired up?
    Thanks
    MOY

  • Calling an Abap Web Service from IBM WebSphere with a MYSAPSSO2 Cookie

    Hello,
    I have the following problem :
    I have to develop a proof of concept between IBM Web Sphere 5.1 and SAP AS JAVA 7.0.
    I have created an IBM sevlet in Web Sphere, I use a specific redirect from an SAP AS Java to call it, this way I can have a SAP Logon Ticket, and I manage to call an ABAP module function with JCO with SSO.
    Scenario 1 : browser  + authentication --> AS Java redirect servlet MYSAPSSO2 cookie -> IBM WebSphere servlet JCO -> Abap module function (ECC5)
    This scenario works fine.
    I have to do the same scenario with a Web Service and I don't know what to do.
    I try to use jax-rpc handlers but I don't know how to pass my cookie from my servlet to my handler.
    Scenario 2 : browser + authentication --> AS Java redirect servlet MYSAPSSO2 cookie -> IBM WebSphere servlet JCO -> Abap Web Service (ECC5)
    Has someone already done that  ?
    Regards,  Julien.

    Julien,
    Why are you using 5.1....go for 6.0 and its cake walk, i have integrated WebSphere 6.0 with R/3 uysing xi.....in a week.
    Scenario changed to:--
    Browser+ authentication --> WebSphere AS servlet request --> XI --> RFC/bapi --> abap webService
    Hope that helps
    Regards
    Ravi

  • MYSAPSSO2 cookie format in J2ee and ABAP - NW7

    Hello
    I installed NW7 with ABAP + Java with system id DV1. I was able to configure the java and abap to issue ticket and to be accepted by other systems (DV2).
    If I login to the DV1 abap host using webgui url(integrated ITS), I am getting the MYSAPSSO2 cookie in the browser IE.  With this I am able to login to DV2 j2ee and also to ABAP.
    If I login to DV1 j2ee engine using the portal link, I am not seeing the MYSAPSSO2 cookie in the browser, but seeing JSESSIONID and with it still I am able to login to DV2.
    My question : Is the JSESSIONID exactly equal to MYSAPSSO2 ? If not how can I make the DV1 J2ee to issue MYSAPSSO2 cookie ? Thanks.
    SAPLearner

    Hi
    I am able to test and able to login to the other j2ee or abap system. But still not able to see the MYSAPSSO2 cookie issued by EP j2ee.
    DV1 - NW7 SP12 system ABAP + J2ee(with portal on it)
    DV2 - NW7 SP12 system ABAP + J2ee(with BI java)
    I have exported DV1's java and abap certificate to DV2, made it trusted and the the connection is working.
    When I login to DV1 j2ee using the url  http://<DV1fullhostname>.com:52200/irj/portal
    and getting the below in my browser
    SignOnDefault=<windows id>; JSESSIONID=(DV1host_DV1_22)ID2068173650DB0050916542928689590End; SAPPORTALSDB0=urn%253Acom.sapportals.appdesigner%253Aframework%2526isPersonalizeMode%3Dfalse; GWS_AUTO_LOGIN=FALSE; AbxUserLocale=en_US_STAFF; PortalAlias=portal; saplb_*=(DV1host_DV1_22)613943650
    With this above cookie I am able to login to DV2 j2ee http://<DV2fullhostname>.com:52500/nwa
    or abap http://<DV2fullhostname>.com:8025/sap/bc/gui/sap/its/webgui
    without any issue. In my browser I do not see MYSAPSSO2 cookie. Why is that?
    My login stack in j2ee is defined as below.
               1. Evaluate ticket
               2. Basic login modele
               3. Create ticket
    At the same time if I login to DV1 abap http://<DV1fullhostname>.com:8022/sap/bc/gui/sap/its/webgui  I can see the cookie MYSAPSSO2 in the browser and still able to login to DV2.
    Dont understand why my DV1 j2ee is not issuing MYSAPSSO2 cookie and issueing JSESSIONID ?
    Appreciate your reply
    SAPLearner

  • Getting the MYSAPSSO2 cookie in the application running in tomcat server

    Hi All
    I am trying to integrate the java application running in tomcat in to portal ...for this i have developed a servlet and trying to get the MYSAPSSO2 cookie in this so that i can vlaidate this ticket...
    can any one plz help in solving this issue
    Thanks & Regards
    Ajay

    Hi Ajay,
    Did you solve this problem? how? I need to do this too.
    thanks,
    Daniel Arakawa

  • Write MYSAPSSO2 cookie

    Hi,
    I would like to write to the user's current browser session a MYSAPSSO2 cookie such as "MYSAPSSO2=AjExMDAgABBwb3". Is there any API I can use to do this?
    Thanks in advance

    Hi,
    hmm... so you already have a valid cookie and simply want to recreate it from inside the portal. I could think of the following if your system constantly kills the cookie:
    Store the cookie's value somewhere in the user's session and re-generate it with
    IPortalComponentResponse.addCookie()
    (see: https://media.sdn.sap.com/javadocs/preNW04/SP2/60_sp2_javadocs/runtime/com/sapportals/portal/prt/component/IPortalComponentResponse.html#addCookie(javax.servlet.http.Cookie)
    or similar.
    Alternatively, create an additional cookie with identical value but different name (hoping that only the cookie named "MYSAPSSO2" get killed).
    btw: Have you already found out why the cookie gets killed? This can usually only happen if you application generates a new cookie
    - that is also named MYSAPSSO2
    and
    - that shall be returned to the very same systems (check cookie's path attribute
    Some HTTP tracing might make sense here.
    Regards,
    Dominik

  • How do I use cookies to control which part of the timeline to play from?

    Hi there,
    I have created an animation with Adobe Edge. My site uses Concrete5 and I am pulling in the Edge content into an IFRAME on my home page (there my be a better way to do this and I'm open to suggestions). I want the animation to play from the start when someone first visits the site, but if during their browser session they navigate back to the home page, I want the animation to only play a shorter segment of frames near the end.
    My question is, how do I use cookies to acheive this? I'm new to javascript/jquery.
    I've included the following code on compositionReady, (found in another post on this forum) but don't have a clue how to continue...
    // insert code to be run when the composition is fully loaded here yepnope(   {     nope:[       '/js/jquery.cookie.js'     ],   complete: init   } ); function init() { //create your cookie's initial values here } 
    My temp site is here - http://79.170.40.43/nutcrackerdesign.co.uk/
    On revisting the homepage, I only want to play from when the green 'How can we help?' button drops in.
    Many thanks!
    Russ

    Hi, Russ-
    I found this article, which seemed really helpful in describing how cookies work in JavaScript:
    http://www.quirksmode.org/js/cookies.html
    Remember that JS works just fine within Animate, so on your compositionReady, you can read your cookie and then set the play based on that.  You should probably uncheck the autoplay for your Stage and control the play of your Stage from the compositionReady.
    Good luck!
    -Elaine

  • How do I add cookies to adobe muse site?

    Hello,
    I am creating a site in Adobe Muse, which I also host through the webbasic adobe business catalyst account.
    I want to add a cookies message onto my site and to that of client sites that I create.
    I searched the forum and there appears to be a guide showing how to get the cookies set up in adobe business catalyst itself. However, when I try to follow the instructions, I fall at the first hurdle because it tells me to go into Site Manager and then into Pages. However, I don't have anything that says Pages. Mine only has two options; Web Forms and System Emails. The only thing in the Web Forms folder is Contact Form.
    I have no idea how to get the cookies message onto my Adobe Muse site. Please...does anyone know the answer?
    Also, if someone from Adobe reads this, it would be great if Adobe Muse had a widget for this...considering it is now a requirement for all websites that use cookies to be able to get consent. I hope it's in the next update.
    Cheers
    Sebastian

    Refer to this thread for instructions on adding a Manage cookies form - http://forums.adobe.com/message/539301
    The online content editing is disabled by default for sites published through Muse to BC and hence the Pages tab doesn't appear for you under Site Manager. However, you can always enable the Online Content editing feature by logging into the site admin -> going to the My Details section (by hovering over your name at the top right) and enable the option as indicated in the screenshot below.
    Please refer to the following post for a reason as to why the option is incompatible with Muse (but doesn't affect any functionality as such if you enable it).
    http://forums.adobe.com/message/4385787.
    Thanks,
    Vinayak

  • How to generate jasper report in pdf format using swing

    hi all,
    im new to swing and jasper.. can anybody provide me some example on how to generate the jasper report in pdf format? i will call the reportManager from sessionBean.. below is my code:
    1)delegate:
    public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
    GenerateReportDto generateReportDto = getAuditTrailServiceRemote().generateIntoPdfReport(fileName, outputFileName, parameters);
    return generateReportDto;
    2)sessionBean:
    public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
    //Map parameters = new HashMap();
    ReportManager reportManager = new ReportManager();
    3)ReportManager()
    public void generateIntoPdfReport(String fileName, String outputFileName, Map parameters) {
              Connection conn = null;
              try {
                   conn = dataSource.getConnection();
                   //Generate the report to bytes
                   File reportFile = new File(fileName);               
                   byte[] bytes =
                        JasperRunManager.runReportToPdf(
                             reportFile.getPath(),
                             parameters,
                             conn
              //conn.close();
              //Write the bytes to a file
              ByteBuffer buf = ByteBuffer.wrap(bytes);
              File file = new File(outputFileName);
              // (if the file exists)
              boolean append = false;
              // Create a writable file channel
              FileChannel wChannel = new FileOutputStream(file, append).getChannel();
              // Write the ByteBuffer contents; the bytes between the ByteBuffer's
              // position and the limit is written to the file
              wChannel.write(buf);
              // Close the file
              wChannel.close();
              } finally {
                   if (conn != null) {
    conn.close();
    Any help would be highly appreciated. Thanks in advance

    Hi ,
    One 'simple' way is by using the DBMS_SCHEDULER db package and the procedure CREATE_JOB(....) using as job_type the value 'EXECUTABLE'...
    Read for further info in 'PL/SQL Packages and Types Reference'.
    If you have access to OEM ... you can configure this there using wizard.....
    Other way is to use the External Procedure call capabiblity of Oracle DB Server...:
    http://www.oracle.com/pls/db102/ranked?word=external+procedure+call&remark=federated_search
    My greetings,
    Sim

  • Best Practices:: How to generate XML file from a ResultSet

    Hi all,
    Could someone please suggest the best practices of how to generate an XML file from a resultset? I am developing a web application in Java with Oracle database and one of my tasks is to generate an XML file when the user, for example, click a "download as XML" button on the JSP. The application is basically like an Order with line items. I am using Struts and my first thought has been to have an action class which will extend struts's DownloadAction and through StAX's Iterator API to create an XML file. I intend to have a POJO which will have properties of all columns of my order and line items tables so that for each order I get all line items and:
    1. Write order details then
    2. Through an iterator write line items of that order to an XML file.
    I will greatly appreciate for comments or suggestions on the best way to do this through any pointers on the Web.
    alex

    Use a OracleWebRowSet in which an XML representation of the result set may be obtained.
    http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/oracle10g/webrowset/Readme.html
    http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/jcrowset.htm

  • How to Generate Statistic Graph in Report??

    Hi, i am developing an questionnaire program together with 19 question... i am able to get value for each value..
    Now my problem is how to generate a statistic graph whenever user can check their report ??
    Can anyone help?? Thank you very much......
    from bscs

    The easy way is to use your values to set the width or height of an image dynamically in HTML, but you can only do bar charts using this method.
    For real reports and measures have a look at
    http://www.jfree.org/jfreechart/index.php
    http://www.jfree.org/jfreereport/index.php

  • Issue while parsing the MYSAPSSO2 Cookie

    Hi All,
    We are trying to establish SSO with a non SAP web application using MYSAPSSO2 cookie.
    Plan is to write a java class which can parse out the MYSAPSSO2 cookie, extract the user Id and use it for single sign on.
    Following Libraries are used:
    logging.jar
    i18n_cp.jar
    iaik_jce.jar
    com.sap.security.api.jar
    com.sap.security.core.jar
    rscp4j.dll(this is downloaded from a SAP EP 7.0 instance running in windows 2003 server in our landscape).
    Our Source SAP EP 7.0 instance which will be issuing the cookie is running in Solaris.
    The target application in which the cookie is parsed, is running in Windos 2003 64 bit server.
    Following is the code which we are using.
    //Instantiate the rpovider
    IAIK provider = new IAIK();
    Security.addProvider(provider);
    //Instantiate the ticket
    tv  =   new com.sap.security.core.ticket.imp.Ticket();
    //set teh certificates
    tv.setCertificates(certificates);
    //set the MYSAPSSO2 cookie
    tv.setTicket(strCookie);
    if (!tv.isValid()){
         System.out.println("Ticket is not valid");
    //Verify the ticket
    tv.verify();
    isValid method is working fine - it is returning true or false exactly based on the validity.
    ISSUE:
    tv.verify();--->Raises the following exception:
    java.security.SignatureException-Certificate (Issuer="CN=SID,OU=XX,O=XYZ,L=LO,ST=ST,C=CO", S/N=1234567890) not found.
    When analyzed, it looks like the verify method is trying to compare the issuer's serial number in integer format
    but the portal is providing the serial number in hexadecimal format.
    So the keystore has the certificate with the same issuer and serial number but the serial number is in hexadecimal format.
    The certificate from SAP Enterprise Portal was imported to the local keystore using the keytool -import option.
    Could anyone help resolve this issue?
    Thanks in advance.

    Hi,
    im facing the exact same problem, and I think I found the reason for the behavior described above.
    The Problem seems to be located at
    [http://help.sap.com/javadocs/NW73/SPS01/CE/se/com.sap.se/com/sap/security/api/ticket/TicketVerifier.html#verify()]
    from com.sap.security.api.jar, just like mentioned.
    But the Problem seems to be the issuer, not the serial number.
    When decompiling  com.sap.security.api.jar with JD-GUI ([http://java.decompiler.free.fr/?q=jdgui]),
    you can see the following:
         public static java.security.cert.X509Certificate[] findCertificates(
                   java.security.cert.X509Certificate[] certificates, String issuer, BigInteger serial) {
              if ((certificates == null) || (certificates.length == 0)) {
                   return null;
              ArrayList certificateList = new ArrayList();
              for (int i = 0; i < certificates.length; i++) {
                   java.security.cert.X509Certificate certificate = certificates<i>;
                   if ((certificate.getIssuerDN().getName().equals(issuer)) && (certificate.getSerialNumber().equals(serial))) {
                        certificateList.add(certificate);
              if (certificateList.size() == 0) {
                   return null;
              java.security.cert.X509Certificate[] matchedCertificates = new java.security.cert.X509Certificate[certificateList
                        .size()];
              certificateList.toArray(matchedCertificates);
              return matchedCertificates;
    As you can see, the issuer-parameter is beeing compared with the issuer from the certificate. And here comes the weird stuff: While the  issuer-parameter contains an issuer like
    "OU=J2EE,CN=EXAMPLE"
    the issuer retrieved from the certificate is
    "OU=J2EE, CN=EXAMPLE"
    (see toString() of the java.security.cert.X509Certificate)
    You see the missing whitespace after the comma? This is the reason why the if-condition fails and you get something like
    java.security.SignatureException: Certificate (Issuer="OU=J2EE,CN=EXAMPLE", S/N=1234) not found.
    A workaround (a really UGLY one, I admit), is the following:
    1. Open  com.sap.security.api.jar with a ZIP-tool and delete
    /com/sap/security/api/ticket/TicketVerifier.class
    2. Copy the decompilied Version of TicketVerifier to Java-Class /com/sap/security/api/ticket/TicketVerifier.java
    3. Change
    for (int i = 0; i < certificates.length; i++) {
         java.security.cert.X509Certificate certificate = certificates<i>;
         if ((certificate.getIssuerDN().getName().equals(issuer)) && (certificate.getSerialNumber().equals(serial))) {
              certificateList.add(certificate);
    to
    for (int i = 0; i < certificates.length; i++) {
         X509Certificate certificate = certificates<i>;
         String dnNameFromCert = certificate.getIssuerDN().getName().replaceAll(", ", ",");
         BigInteger serialNumberFromCert = certificate.getSerialNumber();
         if ((dnNameFromCert.equals(issuer)) && (serialNumberFromCert.equals(serial))) {
              certificateList.add(certificate);
    4. Package this class into a jar and make it available in your classpath.
    5. Enjoy
    To me, this is a huge bug in the SAP-Library and has to be fixed.
    Regards
    Matthias
    Edited by: Matthias82 on Sep 29, 2011 12:47 PM

  • How to generate multiple output pdf's from one oracle reports

    how to generate multiple output pdf's from one oracle reports.
    I have a report where I have to generate more than one output files from the same report based on a parameter.
    Each output file is for each parameter.
    Is this possible in oracle reports, is so how ?

    You can better post your question in the reports forum instead of this pl/sql forum.

  • How to generate a row in report to compute total?

    Hi:
    I need help to generate a report. In an accounting report, I need to make sum for each client regarding outstanding balance. The format of report is following:
    invoice#, invoice date, invoice amount, paid amount paid date, write off, outstanding balance
    Client Name: Baker Express / Debtor Name: Kurt Weiss inc.
    137308001, 04/18/2012, 438.07, 537.07, 06/05/2012, , (99)
    137308002, 04/18/2012, 100, 90, 06/05/2012, 10,
    client Total: total payment:627.07, total outstanding balance: (99)
    another client and debtor pair
    My question is how to generate total payment and total outstanding balancefor every pair of client and debtor. And there are multiple pairs. I tried to use group by, but how can I display every invoice tuple as well in the report?
    Any help would be appreciated.
    Sam

    One method would be to use ROLLUP in your SQL
    http://www.oracle-base.com/articles/misc/rollup-cube-grouping-functions-and-grouping-sets.php

Maybe you are looking for

  • Hyperion Planning Not Opening Through Workspace

    Hi , We are facing problem in opening the EPMA planning application through workspace. After login into the workspace when we open planning application it is just getting hang and after so long time we get below message ==============================

  • Java code to access XML (with unknown SCHEMA)

    Dear participants, My name is Raghavendra , i have a requirement of reading XML files Dynamically and parse them and create java types for manipulation . i will not be provided with sxd files (no schema compilation )coz no one knows how many types of

  • AD password sync with SSL

    Hello everyone The following note is in AD Password sync.connector documentation: Note: It is strongly recommended that you configure SSL communication between the connector and Oracle Identity Manager in your production environment. However, the con

  • Frequency distribution on  ceiling(measure/100) not working always sums

    I'm trying to create a frequency distribution on a measure total time in secs in usage tracking and I can't seem to get the measure to not sum. I've tried: case (ceiling(measure/1000) as char(5)) setting the "Treat as an attribute column" in the colu

  • Pre-Version 10 Shadow Files migration

    Hi all, Anyone know whether its possible to use the shadow file encrypted passwords from and Version 9 and 6 system, and import into the Solaris 10 Environment ?? Have a requirement to migrate 300 users from a version 6 system and 150 users from an v