Unable to access PCD's role properties from Java Web Dynpro  (Access Denied

Using the IPcdContext to access the portal roles does not produce the required list of roles due to the following error
Access denied (Object) .....
This occurs once I try to use the lookup() method
I have tried security zones, adding sharingReferences and permission, but no luck.
I have searched the SDN but again whatever I found still gave the same result. I now think that it's a configuration settings rather than code.
Sample code
Hashtable env = new Hashtable();
env.put(Context.SECURITY_PRINCIPAL, strCurrentUser);
  env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
  //DirContext ictx = new javax.naming.directory.InitialDirContext(env);
// InitialDirContext     ictx = new InitialDirContext(env);
  InitialContext ictx = new InitialContext(env);
  lookupObject = "portal_content";
  IPcdContext myPcdContext =      (IPcdContext) ictx.lookup(lookupObject);
Any suggestion will be appreciated

Rob,
The only thing I see different as per this [document |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941c70c9e401]  is following line of codes. Check if adding it resolves the issue:
env.put(com.sap.portal.directory.Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
lookupObject = "pcd:portal_content/"
... note the /
Chintan

Similar Messages

  • Nwdi-managed access of pcd-objects from java web dynpro

    Hi,
    im am trying to access portal pcd-objects from a java web dynpro component (namely getting and setting personalized iview properties). for locally managed web dynpro components this works fine with the code below.
    when i try the same with a nwdi managed web dynpro component i run into problems regarding references to used dcs. for instance, i need to reference used dc SAP_JTECHS/tc/epbc/pcm/adminapi/java because the build needs tcepbcpcmadminapijava.jar which is inside the mentioned dc. but access permissions of this dc don't allow the dependency. when i try to "add used dc ..." in nwds i get the error message: illegal dependency: access list does not allow use of ...
    has someone any solution for this problem? are there other ways of accessing pcd-objects from java web dynpro (nwdi managed!)?
    thanks
    heiko
    private static void savePersonalizationData(String value) {
         try {
              IAttributeSet attributeSet = (IAttributeSet) getIview(IVIEW);
              attributeSet.putAttribute(ATTRIBUTE, value);
              attributeSet.save();
         } catch (Exception e) {
    private static Object getIview(String pcdPath) throws Exception {
         Hashtable env = new Hashtable();
         env.put(
              com.sap.portal.directory.Constants.REQUESTED_ASPECT,
              com.sap.portal.pcm.admin.PcmConstants.ASPECT_SEMANTICS);
         env.put(
              Context.SECURITY_PRINCIPAL,
              WDClientUser.getCurrentUser().getSAPUser());
         env.put(
              IPcdContext.PCD_PERSONALIZATION_PRINCIPAL,
              WDClientUser.getCurrentUser().getSAPUser());
         InitialContext iCtx = new InitialContext(env);
         return iCtx.lookup(pcdPath);

    Hi Kust,
    To access the PCD objects the code you used looks ok for me but your main issues is related to the dc access permissions. This thread discussed about the similar issue. Please review this below thread.
    /message/979328#979328 [original link is broken]
    Regards
    Krishna Reddy

  • Append Data from Java Web Dynpro to an Internal Table in ECC

    Hi,
    Currently I am using AdaptiveRFCModels to creating/updating records from Java Web Dynbpro to FM in R/3. Users can add few records before they save the changes. The current design is Java Web Dynpro call RFC FM when user add/edit one record. The record will store in an global internal table in the Function Group. For example, I have added 3 records before I save the changes. It means that global internal table should have 3 records that I added before I save it. But in fact, the global internal table only store one record while I adding the third record. The global internal table not able to keep the previous records. The code below is how I code to execute the FM from Java Webdynpro. Is the code can work as I expected? Anything missing in the codes? Please advice. Thanks.
    wdContext.nodeZhr_abc_Input().bind((Zhr_abc_Input) model.createModelObject(Zhr_abc_Input.class));
    Zhr_abc_Input objReq = new Zhr_abc_Input();
    Zhr_Pad31 insUpdVer = new Zhr_Pad31();
    insUpdVer.setQ_Id(wdContext.currentContextElement().getQ_Id());
    insUpdVer.setZ_ce(wdContext.currentZhr_Detail_OutputElement().getZ_ce());
    objReq.addLt_Pad88(insUpdVer);
    wdContext.nodeZhr_abc_Input().bind(objReq);
    wdContext.currentZhr_abc_InputElement().modelObject().execute();

    According to your code you are setting only one record.
    You have to create 3 elements for each record and add all the three to the nodeZhr_abc_Input node.
    If I understand correctly, node currentZhr_Detail_Output is the one which is containing all the three records. Loop through this node, pick each record and set to the input node.
    wdContext.nodeZhr_abc_Input().bind((Zhr_abc_Input) model.createModelObject(Zhr_abc_Input.class));
    for(int i=0;i<wdContext.nodeZhr_Detail_Output().size();i++)
    Zhr_abc_Input objReq = new Zhr_abc_Input();
    Zhr_Pad31 insUpdVer = new Zhr_Pad31();
    insUpdVer.setQ_Id(wdContext.currentContextElement().getQ_Id());
    insUpdVer.setZ_ce(wdContext.nodeZhr_Detail_Output().getElementAt(i).getZ_ce());
    objReq.addLt_Pad88(insUpdVer);
    wdContext.nodeZhr_abc_Input().addElement(objReq); // Changed from bind to addElement
    }//for end
    wdContext.currentZhr_abc_InputElement().modelObject().execute();
    Note: I just typed the code. Syntax might be wrong here and there. Please correct it while coding.
    Regards,
    Jaya.

  • Access KM predefined property values from a Web Dynpro application

    Hi,
    I am trying to build a custom search interface in Web Dynpro which leverages the KMC Indexing and Search services.
    In this interface I would like to display value lists of predefined properties in KM (created using the Property Metadata Service) and bind each predefined property's value list to a checkbox group UI element.
    Which KM API should I use to retrieve the values of a specific predefined property ?
    When using the standard flexible user interface in the portal this can easily be achieved through configuration, but now I would like to know how to achieve this in Java code.
    Thanks in advance for your input.
    I have some idea on how to get the propertymap from a resource, but how can I access the metadata of a predefined property in KM directly ?

    Hi Theo, i'm working on something like this, i have a WD application that is accessing Km through a Webservice, on the webservice ejb i have this problem:
    IResourceFactory resFactory = ResourceFactory.getInstance();
    IRepositoryServiceFactory serFactory = resFactory.getServiceFactory();
    IPropertyConfigurationService propConfigService = (IPropertyConfigurationService) serFactory.getService("PropertyConfigurationService");
    IMetaNameListIterator i = propConfigService.getMetaModel().nameIterator();
         while (i.hasNext()) {
         IMetaName metaname = i.next();
         if ( metaname.getDocumentPatterns()!= null){
         propertyData.setId(metaname.getName());
         propertyData.setName(metaname.getLabel(locale));
         propertyData.setNamespace(metaname.getNamespace());
         propertyData.setDescription(metaname.getDescription(locale));
                    propertyList.add(propertyData);
    On this line serFactory.getService("PropertyConfigurationService") i get the following error on the trace:
    #System.err#sap.com/KmmsListEAR#System.err#Guest#2####30a27fa0cbfa11dbace30018de0545f1#SAPEngine_Application_Thread[impl:3]#Error##Plain###Configuration Framework error: unable to create an IConfigClientContext instance from an EP5 userInitialConfigException: The configuration service locator could not be initialized for any of the environments. The configuration framework is not available.#
    #System.err#sap.com/KmmsListEAR#System.err#Guest#2####30a27fa0cbfa11dbace30018de0545f1#SAPEngine_Application_Thread[impl:3]#Error##Plain###InitialConfigException: The configuration service locator could not be initialized for any of the environments. The configuration framework is not available.
    Do you have any idea of how to solve this? or if you accomplished in a different way, can you guide me a little bit.
    Thanks in advance Theo

  • Unable to download file from FileDownload UI Element - Java Web Dynpro

    Hello Experts,
    I am facing a strange issue.Scenario is:
    I created an java web Dynpro application (Please note that it is just a standalone WD app, not integrated in portal) with just one FileUpload UI Element ,one FileDownload UI element and one button (for triggering an action).
    I browse a file (e.g. text,pdf,doc etc.) and click on button. It uploads the file and when I click on download, there are two cases:
         1) Simply click on download does not downloads the file and shows error: "Unable to download <file name> from <server name>.  Unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later." Though it is opening the file,showing the content.
         2) I opened that portal URL in a new tab in same session and logged in with a portal user. Now if I click on download link of same WD app opened in different tab of same session, it downloads the file without any error.
    I am using portal 7.0
    Can somebody point what's going wrong with case 1?
    Helpful pointers will be appreciated.
    Thanks,
    Kirtiman

    Hi Sid,
    I did not gave any authentication of WD app as it is anonymous app. There is no parameter set in application properties.
    As I run the app, it is showing the initial screen with UI elemtns and till upload works fine,.It has to be an anonymous app, so cannot ask for credential from user.
    Thanks
    Kirtiman

  • Disable Java Security Warning: Allow access to the following application from this web site?

    Dear all,
    When I open web intelligence with BI launchpad, this warning has been shown:
    "The web site is requesting access and control of the Java application shown above. Allow access only if you trust the web site and know that the application is intended to run on this site.
    Allow access to the following application from this web site?"
    and it has just three button of "Yes", "No" and "Help".
    I go to Java Control Panel and Security tab, then set security level on the "Medium" and add my site in the Exception Site List but this warning is shown each time I open web intelligence.
    I have searched the internet very much but I haven't found any solutions for disabling of it. How can I disable this security warning?
    Java version 7 update 67
    windows XP
    SAP BusinessObject BI Platform 4.1 Support Pack 4 Patch 2
    best regards,

    Hello,
    We have the same issue with BI4.1 SP3 FP3.
    Can anyone help us ?
    Nawale.

  • Passing a parameter to an iView window from a Web Dynpro

    Hello all,
    I know very little about the portal, and haven't been using Web Dynpro for too horribly long, either, so I'm really not sure what part I'm having a problem with here, so I'm just going to explain the whole scenario the best I can.
    I have a Web Dynpro DC with two applications in it - SearchDevices and ShowDetail.  The idea is that there will be an iView created on the portal for each of these apps, and the user can navigate to the SearchDevices app, but the ShowDetail one will only show up by clicking on a result from the SearchDevices app.
    Because the user did not want to see the portal navigation when opening up the ShowDetail, we can't use the WDPortalNavigation.navigateAbsolute(), so it was suggested to me by a coworker that I do the following:
    String url = "http://localhost:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fJennifer!2fjava_fe_com_reg~search_cust_device_wdp_com_fecorp_wdp_ed_showdata_ShowData?sap-config-mode=true&application_parameter=EqNo=" + wdContext.currentResultsElement().getEqunr();
    String title = "Device Details";
    IWDWindow window=wdComponentAPI.getWindowManager().createNonModalExternalWindow(url,title);
    window.open();
    "http://localhost:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fJennifer!2fjava_fe_com_reg~search_cust_device_wdp_com_fecorp_wdp_ed_showdata_ShowData?sap-config-mode=true" is the url I see when I preview my iView in the portal (it's hard-coded now, but that will be fixed in my final production application)
    "EqNo" is the parameter that my ShowDetail app is looking for... but, when I try testing this, this part is obviously not working, as it's always null, even though I can see in the URL the value being passed.
    (as a side note, for me to continue testing other things until this is resolved, I HAVE done a WDPortalNavigation.navigateAbsolute() and sent the parameter that way, and it works FINE)
    Any suggestions would be appreciated, I <b>will</b> reward points for anything helpful.
    Thanks,
    Jennifer

    Hi ,
    For the first one ,
    Official Doc :
    <i>This class allows the access to the origin request. If Web Dynpro is used within the SAP Portal Runtime, the Web Dynpro application developer may use Portal services. For that, the origin request object is often needed to use a lot of the existing Portal services. In the Portal case, the origin request would be a IPortalComponentRequest object.
    </i>
    If, he has used portal services .. please do post the steps he had done..
    Second :
    Might sound silly , but what you can do is .. put both of them in the same view.. lilke add interface view of the showdetail in first one itself..
    hide when in search page.. .and when a user clicks on a search result.. enable that result.. and disable the other one..
    this way.. u hav the same tab in TLN .. and ur passing parameters prob wud also get solved..
    Regards
    Bharathwaj

  • Web Dynpro access Application Services directly?

    We're looking at implementing some processes using Guide Procedures, and I have a question about design 'style'.
    I'm creating a data layer using Entity Services.  The entity services will be utilized by the Application Services to create a business layer.  How to do this is clear, and straightforward.
    However, where I have a question is how the automatically generated Web Dynpro application (or any other Web Dynpro application, for that matter) can interact with Application Services.  I've seen sample applications where the Web Dynpro application interacts with application services via mapping from the Web Dynpro interface layer through the GP Runtime - from my perspective, this looks like a good way to deal with a small amount of data being passed between the steps in the GP.
    The primary Web Dynpro application will let the user interact with the data, massaging it until it's in a form where the next person needs to deal with it.  I was thinking of having the Web Dynpro application interact with the Application Services layer directly to move data from the database to the web dynpro application, and back again.  The only thing that would be passed between the steps in the GP would be the guid of the primary data structure.  I would also expose a method of the Application Service as a CO which would take the guid and return the entire business object, so viewing screens could be constructed - as well, PDF's could be generated, and so on.
    Is this considered bad form in a GP, specifically accessing Application Services directly, instead of through a step in the GP?  I understand that what I want to do ties the Web Dynpro application directly to the Application Services layer, but my thinking is that the CO that encompasses the Web Dynpro should be 'atomic', in that all operations related to that specific step should be contained in a single CO.  In other words, the action of creating the business object, fiddling with it, an then submitting it upstream should be contained in one CO.
    Comments, suggestions?

    Hi,
          In the Composite Application Framework scenario, you first create the Business Entities. These act as data holder. To fill the data within these entities the Application services are created. These application services are later exposed as a webservice and deployed.
                   These webservices can contain different methods along with the CRUD operations depending on the Process Flow and Design implemented. We can import the webservices as a model in the WebDynPro Component. The UI elements of the Views can be binded to the Model. So when we execute the model methods the data gets entered into the Business objects.
                   This WebDynPro component should be a callable object ( It requires some Dependencies to be added to the WebDynPro Component ). So that you can have Input/Output parameters and ResultStates. These parameters are useful if you have to pass some parameters from one view to other within the same component. So this WebDynPro Callable object includes the Application service calls and also the passing of data through the GP Input/Output Structures.
                   These callable objects are then included within the Process.
      This is how I think a Composite Application must be designed.

  • Send an event from Java Web Service to BPEL

    Hi,
    I have a requirement where from an Async BPEL service I have to call a Java Web Service. After the completion of its task Java Web Service will fire an event that has to be consumed by the BPEL to initiate further process. Can anybody help me with how to send an event from Java Web Service and at the same time consume it in BPEL?
    Thanks,
    Anuj

    See the following posts for your answer
    http://blogs.oracle.com/soabpm/entry/event_delivery_network_chapter
    http://blogs.oracle.com/soabpm/entry/using_the_event_api_to_publish
    http://guidoschmutz.wordpress.com/2010/01/12/using-the-event-api-to-publish-an-event-to-the-event-delivery-network-edn-the-spring-way/

  • How to execute a BI query/view from a web dynpro application?

    Hi all,
    I am trying to connect to a BI system from a Web Dynpro application. I have to execute a view/query and process the output in my application. Please guide me about how to establish the connection to the BI system from my web dynpro application and then execute the query/view.
    I have tried executing/modelling the BI query/view using Visual Composer but I get an error saying 'QueryView Instantiation failed' when I try to drag the view/query on to the design board.
    Please guide me and help me achieve this.
    Thanks & Regards,
    Kishan

    Hi Kishan,
    Define system for BI in portal and define JCo destination, then from WDJ application use can query BI.
    Create the Technical System and connect with JCO Destinations
    or
    Connecting through the BI Connecters (ex: XMLA Connecter)
    Refer below link:-
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60f35908-ecd4-2910-6c89-e75e1054d9d1?quicklink=index&overridelayout=true
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60f35908-ecd4-2910-6c89-e75e1054d9d1
    In this document you will get details related to connector and other admin activity.
    Hope this may help you.
    Deepak!!!

  • Consuming an outbound iDoc from a Java Web Dynpro application on EP front

    Hi,
    I am trying to consume an outbound iDoc from a SAP system into a Java Web Dynpro application. The result would be displayed on the Enterprise Portal. Could anyone help me with the process to be followed for the same.
    Regards,
    Chandrima.

    Hi,
    I am trying to consume an outbound iDoc from a SAP system into a Java Web Dynpro application. The result would be displayed on the Enterprise Portal. Could anyone help me with the process to be followed for the same.
    Regards,
    Chandrima.

  • Can anyone expalin to me the following properties in the Web Dynpro Iview P

    Hi all,
    Can anyone expalin to me the following properties in the Web Dynpro Iview Properties Editor--
    Authentication Scheme
    Can be Merged
    Default Entry for Folder
    Entry Point
    Show Debug Screen
    Tray Type
    Points assured for help

    Hi shobhendra srivastava,
    1) An authentication scheme is a definition of what is required for an authentication process. In the iView you can set what authentication process (UserName/Password, X.509 certificate, etc.) the iView requires. Find more information <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/90/52c43dac1bcf51e10000000a114084/frameset.htm">here</a>.
    2) The attribute "Can be Merged" allows you to merge certain objects (worksets, pages, iviews) under the same point in the portal navigation structure. All objects with the same value for attribute "Merge ID" are merged together. The object with the highest value for attribute "Merge Priority" provides the name displayed in the navigation elements (tabs in TLN and links in Detailed Navigation)
    3) Find a good explanation of the attribute Entry Point <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/4e/3e703e632c7937e10000000a114084/frameset.htm">here</a>.
    4) If this parameter is "true" a debugging screen is displayed before starting the WebDynpro application. Make sure that the parameter DebugMode in the service configuration (=>Applications=>com.sap.portal.appintegrator => Service => Common_Configuration) is not 'false' if you want to use this feature.
    5) The attribute Tray Type defines the design of the iView's frame. The attribute can take the following values:
    fill: The content area appears with a background color
    plain: The content area appears with a white background and a frame
    transparent: The background is transparent and the content area appears without a frame
    Hope I could help!
    Best regards,
    Martin

  • Parameter transfer from one Web Dynpro Application to another

    hi,
    Is it true that  only parameters with string type can be transfered from one Web dynpro application to another ?

    hi, Justin ,
    You are right , I can use inplug for the dest component , and can transfer referenced type , but now I met a problem , how I can transfer the parameter to the dest comp ? 
    I can use the following code to transfer a value from origin to dest , but how to transfer an object , can you give me some sample code ?
    CONCATENATE l_url '?'
                   '&guid=' lv_guid
                   into l_url.
    CALL METHOD window_manager->create_external_window
          EXPORTING
            url    = l_url
          RECEIVING
            window = lo_window.

  • Navigating from one Web Dynpro app to another not belonging to same project

    Hi All,
    I wanted to know is it possible to navigate from one Web Dynpro app to another which does not belong to the same project. if yes how.
    Regards
    Sid

    Hi Siddarth,
    If you want provide the interaction between two Web Dynpro applications then you must develop those projects as Development Components as DCs provides the reusability of the components created.
    You can  through these link to find out more information:
    Where to start DC creation  ?
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bd0e0401-0801-0010-aaab-d0e1742da383">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bd0e0401-0801-0010-aaab-d0e1742da383</a>
    Server Side Eventing:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/19e6e990-0201-0010-eca6-a62e342eaad3">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/19e6e990-0201-0010-eca6-a62e342eaad3</a>
    Regards,
    Jhansi

  • Calling java web dynpro from ABAP

    Hi!!
    I have a double problem!
    First I want to call a java web dynpro application from ABAP. I managed to do it using :
    call method cl_gui_frontend_services=>execute
      exporting
        document = url
      exceptions
        others   = 1.
    Where url is the java application url with parameters. It's working...
    ...but here comes the second problem : i need SSO So first solution is not sufficent.
    Can anybody help?

    Ok looking for the solution i figure out that it won't be possible anyway, i need a first log to the portal in order to issue a logon ticket before any attempt of SSO authentication.

Maybe you are looking for

  • IPod Click Wheel Not Responding to Anything

    I have the iPod click wheel 40 GB and it is not responding to anything. When I hit any of the buttons, an apple appears on the screen and then changes to a picture of an iPod with a sad face and an exclamation mark. This website also appears at the b

  • A few questions on my "new" PowerBook G4 12" 1.5GHz

    Bought a very nice PowerBook G4 on eBay last week and want to update it a bit.  The seller only used it about 2.75 years.  It came with all of the books (including Apple decals!), install disc and two different display adapters for $130! The seller d

  • Instrument I/O assistant isn't installed properly under windows 2000 and xp

    after the complete installation of Labview 7express (FDS),the instrument I/O assistant does not work. An error mesage pops up saying that the assistant is not completely installed and that labview 7 should be installed prior to the assistant and that

  • Nqserror 36001 Error DLL essapinu.dll

    Hi, When I try to connect Oracle BI Administration Tool with Essbase I have this error: "nQSError 36001: Unable to load the essapinu.dll". I have Essbase 11.1.1.2 and OBIEE 10.1.3.4. All software is installed in Solaris 10. Essbase and OBIEE are 64 b

  • Standby redo logs status

    Hi, I see following status from my standby redo logs SQL> select GROUP#, status from V$STANDBY_LOG; GROUP# STATUS 5 UNASSIGNED 6 UNASSIGNED 7 UNASSIGNED 8 UNASSIGNED What could be reason for this.