Accessing anonymous user in web dynpro application

Hi All,
  I have created one web dynpro application for internet site (Anonymous user). While trying to retrieve the Iuser through web dynpro application, it is coming <b>null</b> coz user is Anonymous if i am not wrong.
So I am not able to read the property file from the KM and based on the value coming from the property file i am setting in the drop down.
Regards,
Nelly
Message was edited by: Nelly
        nelly khare

hi,
i did the same thing den code is working and values are coming from the property file but i m going to place this application in the Internet.
There i can't ask user to enter User-Id and PWD.
I tried to use IWDClient's object and through this i m accessing getSAPUser().
here is the code that i m using:-
<b>wdClientUser = WDClientUser.getCurrentUser();
manager.reportSuccess("wdclientuser-"+wdClientUser);-value is coming for that
sapUser = wdClientUser.getSAPUser();
manager.reportSuccess("sapUser -"+sapUser );Null is coming for that
//create an ep5 user from the retrieved user
ep5User = WPUMFactory.getUserFactory().getEP5User(sapUser);
resourseContext = new ResourceContext(ep5User);
resourseFactory = ResourceFactory.getInstance();
pathRID =RID.getRID(/documents/IDBDevelopments/Propertyfiles/JobOpportunity/DateofBirth.properties");
resource =     (IResource) resourseFactory.getResource(pathRID,resourseContext);</b>
In that point i m getting Null as value.coz it's description says that if user is Anopnymous this function will return Null.
Coz of that i m not able to create Resource context for reading the property file.
Regards,
Deepak

Similar Messages

  • Unable to map the portal user with back end user through web dynpro coding

    Hi All,
    I 've a portal user which is mapped to back end user by  system in the portal.
    i 'm able to get the portal user from web dynpro application.
    But unable to get the mapped back end user
    this is my code
    String systemalias = "SAP_CRM_PROD";
    Map mapattr = new HashMap();
              //     IPrincipal principal = (IPrincipal) request.getUser();
    //   get user user mapping information
    IUserMappingData userMapping =
                   //(IUserMappingData) UMFactory.getUserMapping().getUserMappingData(systemalias, principal, mapattr);
                   (IUserMappingData) UMFactory.getUserMapping().getUserMappingData(systemalias,principal,mapattr );
    //                  For testing purposes only
                   //mappingData = userMapping;
                   HashMap map = new HashMap();
                   userMapping.enrich(map);
                   mappedPassword = map.get(UMAP_KEY_PASSWORD).toString(); //String "user"
                   mappedUserId = map.get(UMAP_KEY_USER).toString(); /
    following is the error reported .
    The project was not built since its classpath is incomplete. Cannot find the class file for javax.xml.soap.SOAPMessage. Fix the classpath then try rebuilding this project.
    please help.

    Hi Sanjay,
       request component need to be initialized before using it. Include these lines before ur code.
    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
    String mappedPassword = null;
    String mappedUserId = null;
    Also check these threads for ur help.
    Accessing Mapped Username / Password
    How to access user id and password via UserMapping ?
    Reward points for helpful answers.
    Regards,
    Harini S

  • Access users in a Web Dynpro application on different WAS ??????

    Hi,
    Scenario - I have a local WAS on which i have deployed a Web Dynpro Based application.
    There is another WAS on which I have portal installed. I need to access the roles assigned to a particular user in my Web Dynpro application.
    Query -
    I need to know can i access the roles assigned to a user on a different WAS in a Web Dynpro based application running on a different WAS.
    Thanks and Regards,
    Amol Ghodekar.

    Amol,
    as this questions existed twice, I've deleted one.
    As roles are in the UME, you can access them. But why do you want to do this? You could login to that user, but then the question is what you want to do....
    Regards,
    Benny

  • Error - Creating a Web Dynpro Application Accessing ABAP Functions

    Dear All,
    we are trying to implement a web dynpro application with accessing ABAP functions.
    Previous tasks:
    -     insert the ABAP system into the SLD from the NWDI System (Transaction RZ70; the ABAP system is correctly insert into the SLD => technical systems)
    -     equipped the JCO connections with the web dynpro content manager (ping and test = OK)
    It’s the standard tutorial out of the SDN called “Creating a Web Dynpro Application Accessing ABAP Functions”.
    Some hints:
    -     There are no errors after the implementation and the “rebuild” of the project in the NWDS
    -     The auto deployment works fine to the development runtime system. The application is shown in the Web Dynpro content manager
    -     The In the build log I found these entries:
    System.err] [Invoked from  com.sap.s2x.tools.GUID.getnodeaddress(GUID.java:585)]
    [System.err] java.net.UnknownHostException: FRASAPP562: FRASAPP562
    [System.err]      at java.net.InetAddress.getLocalHost(InetAddress.java:1191)
    [System.err]      at com.sap.s2x.tools.GUID.getnodeaddress(GUID.java:575)
    [System.err]      at com.sap.s2x.tools.GUID.<clinit>(GUID.java:179)
    [System.err]      at com.sap.s2x.tools.S2XGUID.getGUID(S2XGUID.java:19)
    [System.err]      at com.sap.ide.metamodel.core.i18n.LanguageState.createS2XID(LanguageState.java:191)
    [System.err]      at com.sap.ide.metamodel.core.i18n.S2XLanguageUnmarshaller.unmarshal(S2XLanguageUnmarshaller.java:52)
    [System.err]      at com.sap.ide.metamodel.core.i18n.TextPoolProxy.loadLanguageState(TextPoolProxy.java:703)
    [System.err]      at com.sap.ide.metamodel.core.i18n.TextPoolProxy.prepareLanguageForRead(TextPoolProxy.java:646)
    [System.err]      at com.sap.ide.metamodel.core.i18n.TextPoolProxy.isEmpty(TextPoolProxy.java:222)
    [System.err]      at com.sap.ide.webdynpro.checklayer.MDOChecker.check(MDOChecker.java:23)
    [System.err]      at com.sap.ide.webdynpro.checklayer.view.ViewChecker.check(ViewChecker.java:52)
    [System.err]      at com.sap.ide.webdynpro.checklayer.controller.ViewControllerChecker.check(ViewControllerChecker.java:96)
    [System.err]      at com.sap.ide.webdynpro.checklayer.controller.ControllerChecker.check(ControllerChecker.java:119)
    [System.err]      at com.sap.ide.webdynpro.checklayer.controller.ControllerChecker.check(ControllerChecker.java:56)
    [System.err]      at com.sap.ide.webdynpro.checklayer.component.ComponentChecker.check(ComponentChecker.java:181)
    [System.err]      at com.sap.ide.webdynpro.checklayer.component.ComponentChecker.check(ComponentChecker.java:56)
    [System.err]      at com.sap.ide.webdynpro.generation.Generation.check(Generation.java:2039)
    [System.err]      at com.sap.ide.webdynpro.generation.Generation.generatePersistentComponent(Generation.java:1296)
    [System.err]      at com.sap.ide.webdynpro.generation.console.GenerationConsole.generate(GenerationConsole.java:175)
    [System.err]      at com.sap.webdynpro.generation.ant.GenerationAnt.main(GenerationAnt.java:50)
    [System.err]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [System.err]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [System.err]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [System.err]      at java.lang.reflect.Method.invoke(Method.java:324)
    [System.err]      at com.sap.webdynpro.generation.ant.WDGenAntTask.execute(WDGenAntTask.java:219)
    [System.err]      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [System.err]      at org.apache.tools.ant.Task.perform(Task.java:364)
    [System.err]      at org.apache.tools.ant.Target.execute(Target.java:341)
    [System.err]      at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [System.err]      at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
    [System.err]      at com.sap.tc.buildplugin.techdev.ant.util.AntRunner.run(AntRunner.java:112)
    [System.err]      at com.sap.tc.buildplugin.DefaultAntBuildAction.execute(DefaultAntBuildAction.java:61)
    [System.err]      at com.sap.tc.buildplugin.DefaultPlugin.handleBuildStepSequence(DefaultPlugin.java:213)
    [System.err]      at com.sap.tc.buildplugin.DefaultPlugin.performBuild(DefaultPlugin.java:190)
    [System.err]      at com.sap.tc.buildplugin.DefaultPluginV3Delegate$BuildRequestHandler.handle(DefaultPluginV3Delegate.java:66)
    [System.err]      at com.sap.tc.buildplugin.DefaultPluginV3Delegate.requestV3(DefaultPluginV3Delegate.java:48)
    [System.err]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [System.err]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [System.err]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [System.err]      at java.lang.reflect.Method.invoke(Method.java:324)
    [System.err]      at com.sap.tc.buildtool.v2.impl.PluginHandler2.maybeInvoke(PluginHandler2.java:350)
    [System.err]      at com.sap.tc.buildtool.v2.impl.PluginHandler2.request(PluginHandler2.java:102)
    [System.err]      at com.sap.tc.buildtool.v2.impl.PluginHandler2.build(PluginHandler2.java:76)
    [System.err]      at com.sap.tc.buildtool.PluginHandler2Wrapper.execute(PluginHandler2Wrapper.java:58)
    [System.err]      at com.sap.tc.devconf.impl.DCProxy.make(DCProxy.java:1723)
    [System.err]      at com.sap.tc.devconf.impl.DCProxy.make(DCProxy.java:1495)
    [System.err]      at com.sap.tc.buildcontroller.CBSBuildController.build(CBSBuildController.java:727)
    [System.err]      at com.sap.tc.buildcontroller.CBSBuildController.execCommand(CBSBuildController.java:503)
    [System.err]      at com.sap.tc.buildcontroller.CBSBuildController.evalCmdLine(CBSBuildController.java:442)
    [System.err]      at com.sap.tc.buildcontroller.CBSBuildController.run(CBSBuildController.java:314)
    [System.err]      at com.sap.tc.buildcontroller.CBSBuildController.exec(CBSBuildController.java:252)
    [System.err]      at com.sap.tc.buildcontroller.CBSBuildController.mainLoop(CBSBuildController.java:207)
    -     I’m able to start the application out of the Web Dynpro content manager with “run” => only the user interface is displayed without any functionality
    -     The “normal” start over the NWDS fails => error text
    “com.sap.tc.webdynpro.services.sal.core.DispatcherException: The requested deployable object 'local/J08_Flugdat_Daventdcflight~xxx.com' and application 'FlightListApp' are not deployed on the server. Please check the used URL for typos.”
    There two different URLs in use.
    Start via NWDS:
    http://frasapp562:50000/webdynpro/dispatcher/J08_Flugdat_Daventdcflight~xxx.com/FlightListApp
    Start via web dynpro content manager:
    http://frasapp562:50000/webdynpro/dispatcher/xxx.com/aventdc~flight/FlightListApp
    For test purposes, we started the BAPI (BAPI_Flight_Getlist) on the ABAP system directly. It works.
    Any ideas about the system behaviours (different URLs and missing functionality)?
    Thanks a lot in advanced!
    Best regards
    Christoph

    The Error has been solved – The implementation of a method was missing....
    Thx
    Christoph

  • Access Web Dynpro application on different WAS ??????????

    Hi All,
    Current Scenario -
    We have deployed ESS & MSS Business package on one WAS and the iviews are present on another WAS.We have created a Dedicated R/3 system which is pointing to the WAS where these packages are deployed.
    All these things are working fine i.e. once the user maps the id pswd it directly runs the Web Dynpro applications in the iviews.
    That means, even if application is running on one WAS, and the user personalises data on another WAS, it still retrieves the credentials and shows the appropriate results for ESS MSS Packages.
    Query-
    Now i need to implement the same scenario in my Web Dynpro application
    Steps
    1) I have the WD application running on one WAS and portal on another
    2) In portal there is a R/3 system created
    3) The Web Dynpro application needs to know if the user has personalised mapping against that system created on portal(other WAS)
    4) If yes show him the home page else take him to the login page.
    Just as it is implemented for ESS MSS Packages.
    How can i pass the mapped data to the Web Dynpro iview ?
    Thanks and Regards,
    Samta Nichani

    Amol,
    as this questions existed twice, I've deleted one.
    As roles are in the UME, you can access them. But why do you want to do this? You could login to that user, but then the question is what you want to do....
    Regards,
    Benny

  • Restrict simultaneous login to a web dynpro application by the same user

    I have a stand alone web dynpro application and used the sap.authentication for user to login into the application. How can i restrict a user from accessing the application from two different browsers using the same userid?

    Hi,
       You can try the following approach:
    1. Create an outbound plug to some dummy view which shows the message to the user that he/she is already logged in. Let's call this plug "ToMessageView".
    2. In the "wdDoInit" method of the component controller write the following code:
    String loggedInUserID = WDClientUser.getLoggedInClientUser().getClientUserID();
    String[] apps = WDServerState.getActualApplications(loggedInUserID);
    //All entries of apps will look like <application-name>/<application-id>
    boolean isRunningParallely = false;
    for (String app : apps) {
         if(app.split("/")[0].equals(wdComponentAPI.getApplication().getName())){
              isRunningParallely = true;
              break;
    if(isRunningParallely)
    //fire the plug to message view here
    FYI, I haven't tested this but do try it out.
    Regards,
    Satyajit

  • Required dependencies for Web Dynpro Application accessing KM

    Hi all,
    I need to implement a Web Dynpro application that access km documents (NW 2004s). But i'm having problems to find one required api. I read several tutorials acording to which I need the EP5 user api (com.sap.security.api.ep5.jar).
    The problem is that the application I need to make has to be a development component in NWDI (not a plain proyect).
    What I need to know is which Siftware Component dependencies I should add to my siftware component in order to be able to access the EP5 user api.
    I found the SC required for KM api is KMC-CM, but this doesnot include the EP5 user api.
    Any ideas ?
    Thanks,
    Diego.

    Hi Check this link below , you can understand what you require
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/1282b176a341e1e10000000a1553f6/frameset.htm
    Points are welcome if it is helful
    Koti Reddy

  • Access UME information in Web Dynpro for ABAP application

    We have an WDA iView deployed in a NW2004 Enterprise Portal. We have mapped the Enterprise Portal UME to our corporate LDAP. How do we access this UME information within the WDA iView ? Besides the user id there are specific security flags that the WDA application needs.
    Any help is appreciated!

    Hi Venkat ,
    Please refer to this link,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/using knowledge management functionality in web dynpro applications.pdf
    Thanks,
    Raj.

  • How to get User Id in Web dynpro application

    Hi Experts,
    I am running web dynpro application with authentication checkbox set. I want to display user id of the user in my application. I am using following code in Init method of component controller.
    IWDClientUser wdUser = WDClientUser.getCurrentUser();
    WdContext.currentContextElement().setUserName           (wdUser.getClientUserID());
    Here I am getting some integer value as userId.
    I am not using Portals, so solutions suggested for portal are not useful for me .
    Is there any way to get this uset id.
    Thanks in advance

    hi
    try this piece of code
              IWDClientUser wdUser = WDClientUser.getCurrentUser();
              IUser user = wdUser.getSAPUser();
              if (user != null)
                        IUserAccount[] acct = user.getUserAccounts();
                        if(acct[0] != null)
                                  String strUserid = acct[0].getLogonUid();
    wdContext.currentZtms_Fm_Regupdate_InputElement().setAssoid(new String(strUserid));
    Note: Defining the IUser will show an error. To resolve this, within the properties of
    the project, choose Java build path -> Libraries -> Add external jars ->
    com.sap.securities -> lib -> com.sap.security.api. Open this file and retype the code.

  • Need info on Accessing portal services within a Web Dynpro application

    Hi,
    I need information on Accessing portal services within a Web Dynpro application.I want to explore this topic.Can anyone give useful links?
    Thanks in advance.
    Rajani N

    Hi
    how to reference  a portal service with web dyn pro ?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/how%20to/how%20to%20access%20a%20portal%20service%20within%20a%20web%20dynpro%20java%20application.pdf
    http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/portal/WDPortalUtils.html
    Best Regards
    Jakub Krecicki

  • Storing user defaults of Web Dynpro application on portal

    Hi folks,
    I am trying to develop Web Dynpro application that runs in an iView on a portal. I would like to remember certain user defaults for this application (e.g., user default plant). User also has control over this value, so whenever they change it, the value should be update on a backend as well.
    My first thought was to use PCD, but I am not sure how to do that - all the code examples for I found for PCD looked like they were created for portal application, not Web Dynpro ones.
    Anybody here actually done anything similar?
    Edited by: Alexei Isaev on Jan 29, 2008 8:20 PM

    Hi Alexei,
    If you need to store default values for a portal application, you may consider your development in Web Dynpro for ABAP.  I have not come across application level personalisation yet in Web Dynpro for Java, unless someone else can throw some light here.
    Regards,
    Subramanian V.

  • Getting error "Access via null" when running the web dynpro application

    Hi experts,
    I am getting the below error while executing my web dynpro application
    500 SAP Internal Server Error
    ERROR: Access via 'NULL' object reference not possible. (termination: RABAX_STATE)
    I am getting the error only when I am calling a method create manufacturer from my web dynpro program. If i comment this code my application works fine
    CALL METHOD wd_this->mo_ch_instance->create_manufacturer
      EXPORTING
        gi_manufacturer = ls_manufacturer
      IMPORTING
        lv_message      = lv_status
    i have created a attribute mo_ch_instance of type YSRM70CL_CH_SW_MD  where YSRM70CL_CH_SW_MD is the class which has the create_manufacturer method that i am using in my code.
    Kindly let me know whats the issue.
    Regards,
    Vinod

    Hi,
    if   wd_this->mo_ch_instance is not initial.
    CALL METHOD wd_this->mo_ch_instance->create_manufacturer
    EXPORTING
    gi_manufacturer = ls_manufacturer
    IMPORTING
    lv_message = lv_status
    endif.
    Check wether you have created the object for that class r not.
    Regards,
    Lekha.

  • Web Dynpro Application Accessing ABAP Functions

    I wrote the example application for Web Dynpro Application Accessing ABAP Functions, as described in the tutorials for NWDS. But when I run, it only show me a blank blue page nothing else, how to fix this issue?
    Thanks,
    Jawed Ali

    Hi Jawed,
    Again, I'll insist you to please check if your view is embeded in the Window.
    write some output message in the view to ensure that not only gui's, even the messages in the view are not coming.
    if there is another issue, Please share with us.
    Thank & Regards,
    Namrta Mahajan

  • Creating a Web Dynpro Application Accessing ABAP Functions

    Hi all,
                I implemented Creating a Web Dynpro Application Accessing ABAP Functions .But recently i heared a new word BW query.Is it not wat i did in the above application or is this a new backend sytem , does  it have a new procedure to create model for BW Query in webdynpro rather than what i did in the above app
    Regards
    Padma N

    The Error has been solved – The implementation of a method was missing....
    Thx
    Christoph

  • Maintain user session in web dynpro application

    Hello Experts,
    I have a web dynpro application. Whenever user presses F5 or refreshes the application, user is made available with login page. Instead, I want to maintain the session for that particular logged on user, so, whenever he refreshes he lands on the same page if his session is active.
    As far as I read some discussions on scn, I got to know that there is no such thing in WD ABAP. Still, is there any way to accomplish this type of requirement?
    PDN.
    Regards,
    Harsh

    Hi Harsh,
         My assumption of your requiremnt:
    The application is suppose to bypass SAP authentication and should prompt the user with a custom view .
    So when the user logs in using the custom view (input details), then user shouldnt be prompted with login screen again if he presses f5 .
    A very different requirement .. but may be you can try using a static flag which will be raised when you login using the custom view.
    This flag value can be used to determine if the user has logged in earlier during the session.
    Thanks & Regards,
    Tashi

Maybe you are looking for

  • Possible to install old ram cards?

    In our home there were 2 iMacs where the memory cards can be removed from the bottom. My computer went in for repair as the screen went white with purple lines. They said for me to get a new computer.This was not an Apple store as there isn't one her

  • Problems with slideshows on iphoto and Apple TV (no sound)

    I have encountered a problem with iPhoto slideshows when streaming to Apple TV (using mirroring).  The slideshow plays ok, as far as the photos are concerned, but no sound is coming through.  When I play the slideshow on the iMac, the slideshow is fi

  • Why can't TLD files be shared?

    First, a disclaimer: I'm an absolute newbie to JSP programming, so I may easily be overlooking something. If so, please point me in the right direction. :) Second, a complaint (and I have a hard time believing that I'm the only one that's ever had th

  • How does application connect/commincate to Message Broker + JMS

    With reference to JMS, I am wondering how does my application (consumer or producer) communicate to Message Broker(in my case it is ActiveMQ). if the consumer is at HostA, producer is at HostB and ActiveMQ=message broker is at HostC ???

  • WLC 5508 - Set SNMP traps differently per AP

    Hey All, We have a controller with multiple remote AP's connected to it.  A couple of the AP's are at branch offices connected to very low quality DSL connections (which is all that is available) and because of this those AP's cut SNMP traps constant