How to access Portal Logged in user in Web Service application

Hi Experts,
I have created one Deployable Proxy and based on that i have created Web Based (WAR) project. to consume the proxy i have created Servlet based java file which invokes Web services. Based on this WAR project i created EAR application which deploys on J2EE server.
I am facing issue while accessing Portal Logged in user in my Servlet Class in WAR project so can  you please provide inputs for how we can access Portal Logged in user in our Servlet class? also how we can access LDAP detailes of portal Logged inuser ?
I tried to fetch the Logged in user from servlet request but i can't access it giving me null value. Following is the method details that i am using in my servlet.
protected void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException                
IUser user = UMFactory.getAuthenticator().getLoggedInUser();
String strName = user.getFirstName();
         If I checked in LDAP values First name for logged in user is present but in my code its giving Null value.
Can you please provide your inputs on above issue.
Regards,
Rahul

have you found a solution this problem yet?

Similar Messages

  • How to accessing portal services

    Hi All
             I am saravanan. i have doubts. Can u plz solve my doubts?.
    1). How to Accessing Portal Services from a Webdynpro application?.
    2). Portal Eventing with Webdynpro and other Applications?.
    3). single signon from Webdynpro applications?.
         These are my doubts. Could u plz solve my problem.
    If u have any material or PPT or PDF files kindly send my mail.
    This is my mail id : [email protected]
    Thanking You
    Saravanan

    Hi Swathi
    I'm trying to do exactly the same, i have a webdynpro application and i'm trying to access KM libraries to get the full list of metadata properties. But i'm getting and error while trying to get the service on the following code:
    Property propertyAux = null;
    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);
    The error on the trace is this one:
    System.err#sap.com/KmmsListEAR#System.err#Guest#2####30a27fa0cbfa11dbace30018de0545f1#SAPEngine_Application_Thread[impl:3]_29##0#0#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]_29##0#0#Error##Plain###InitialConfigException: The configuration service locator could not be initialized for any of the environments. The configuration framework is not available.
    Could you please give me a hand on this one?
    Thanks in advance

  • How to get/capture log-on user name on PC (work station)

    Hi,
    Colud anyone give me how to get/capture log-on user name on my PC (work station)?
    I need to get the infomation by using a function module.
    Kind regards,
    Hisao

    Hi,
    TH_USER_INFO shows me terminal ID, IP address and other information. howerver it does't show me log-on user name of OS.
    Kind regards,
    Hisao

  • How to access internal table data from webdynpro to Flex application.

    Hi Connoisseur
    The data transfer from Abap WebDeypro to flex island works well. I followed , there is an example from Thomas Jung (by the way as always Great Work) and  Karthikeyan Venkatesan (Infosys) but this example covers simple type only.
    There is no example with complex types like arrayCollection which handle the transfer of data from flex to WebDynpro.
    i tried to do pass internal table value  to flex-datagrid.but its not work.
    i would like to know
    1.how to access internal table data from webdynpro to Flex application.
    2.how to pass the internal table to flex-datagrid.
    2.how to pass dynamically in ADOBE flex.
    3. how to do Flex is receiving the wd context data?
    4. how can we update WD context with FLEX data.
    Ple give me sample example and step by step procedure.
    Regards
    laxmikanth

    Hi Laxmikanth,
    Please refer this...
    Flash island: update complex type from flex
    Cheers..
    kris.

  • How to use a cascading LOV as a Web Services Consumer?

    How to use a cascading LOV as a Web Services Consumer?
    We are trying to populate a prompt programmatically.
    Our program is a Web Services Consumer.
    As an example we use Island Resorts Marketing
    The cascading LOV for City is
    Country -> Region -> City
    The City object is key-aware to the customer table
    The query is
    Customer | Revenue
    (where) City = [prompt]
    In order to make the key-awareness work, we must select the value (rowIndex) from the LOV
    When we run our program below, the LOV for City is not populated, as expected since we must first select the Country, then the Region.
    The code snippet below shows that the LOV for Country is populated. We have no idea how to go from there.
    Any hint will be immensely appreciated.
    Let us know if anything is unclear in the code.
    Source       
    RetrieveMustFillInfo retrieveMustFillInfo = RetrieveMustFillInfo.Factory.newInstance();
            RetrievePromptsInfo retrievePromptInfo = RetrievePromptsInfo.Factory.newInstance();
            retrievePromptInfo.setPromptLOVRetrievalMode(PromptLOVRetrievalMode.ALL);
            retrievePromptInfo.setRefreshReturnedLOVs(true);
            retrievePromptInfo.setReturnLOVOnMustFillPrompts(true);
            retrieveMustFillInfo.setRetrievePromptsInfo(retrievePromptInfo);
            // *-- need the "Refresh" action to get the .promptToBeFilled
            Action[] boActions = new Action[1];
            boActions[0] = Refresh.Factory.newInstance();
            try {
                documentInformation = reportEngine.getDocumentInformation(Integer.toString(infoObject.getID()), retrieveMustFillInfo, boActions, null, null);
                m_Token = documentInformation.getDocumentReference();
            } catch (Exception ex) {
                System.out.println(GetWSError(ex));
                return;
            if (documentInformation.getMustFillPrompts()) {
                PromptInfo[] promptInfoS = documentInformation.getPromptInfoArray();
                for (PromptInfo promptInfo : promptInfoS) {
                    System.out.println(String.format("Prompt '%1$s', hasLOV=%2$s", promptInfo.getName(), (promptInfo.getHasLOV() ? "Yes" : "No")));
                    if (promptInfo.getHasLOV()) {
                        LOV boLOV = promptInfo.getLOV();
                        for (Value boLOVValue : boLOV.getValuesArray()) {
                            System.out.println(String.format(" LOV item '%1$s' RowIndex=%2$s", boLOVValue.getColumnsArray(0), (boLOV.getRowIndexed() ? boLOVValue.getRowIndex() : "")));
                    System.out.println("--End LOV");
                    PromptInfo[] promptInfoS2 = promptInfo.getPromptToBeFilledArray();
                    if (promptInfoS2.length > 0) {
                        PromptInfo promptInfo2 = promptInfoS2[0];
                        System.out.println(String.format(" linked to %1$s", promptInfo2.getName()));
                        if (promptInfo2.getHasLOV()) {
                            LOV boLOV2 = promptInfo2.getLOV();
                            for (Value boLOVValue : boLOV2.getValuesArray()) {
                                System.out.println(String.format(" LOV item '%1$s' RowIndex=%2$s", boLOVValue.getColumnsArray(0), (boLOV2.getRowIndexed() ? boLOVValue.getRowIndex() : "")));
                            System.out.println("--End LOV");
    Result
    Prompt 'Enter value(s) for City:', hasLOV=Yes
    --End LOV
    linked to Enter value for Country of origin
    LOV item 'Australia' RowIndex=6
    LOV item 'France' RowIndex=2
    LOV item 'Germany' RowIndex=4
    LOV item 'Holland' RowIndex=7
    LOV item 'Japan' RowIndex=5
    LOV item 'UK' RowIndex=3
    LOV item 'US' RowIndex=1
    --End LOV

    Hi,
    Refer SAP Note 1278947. You would require a Service Market Place logon to access this article.
    Let me know if this helps.
    Regards,
    Shreyans Surana

  • How to keep multiple function modules under one Web service

    Hi Experts,
    I have Three RFC function modules and i need to create one web service for these three RFC function modules. I know How to crearte a web service for one function module.
    please suggest me How to keep multiple function modules under one Web service.
    Thanks in advance
    Lakshminarayana

    Hi Lakshmi,
    The best way to do it is to assign all the three RFC Enabled FM's to one function group. Later on the top menu in Utilities you get an option to Create a Webservice from a Function Group.
    You can create one single Webservice using all the the 3 FM's.
    I hope this helps.
    Thanks,
    Manu

  • Access to MySql Database in the Web Service

    Hi all,
    In my j2me web service project, i want to access to MySql database in the web service and
    my installation is
    Tomcat 5.0 for Java WSDP,
    Java Web Services Developer Pack 1.5,
    MySql Server 5.0 and environment variables are adjusted...
    server.xml where is in "C:\tomcat50-jwsdp\conf" is adjusted like this
    <!-- Replace the above Realm with one of the following to get a Realm
    stored in a database and accessed via JDBC -->
    <Realm className="org.apache.catalina.realm.JDBCRealm"
         debug="99"
         driverName="com.mysql.jdbc.Driver"
         connectionURL="jdbc:mysql://localhost:3306/erendb"
         connectionName="root"
         connectionPassword=""
    />
    but i have not access to MySql database in the web service yet...
    please help...

    Hi Luis,
    If you see closely, the productID is actually a concatenation of the areaID and the productID. The reasoning here is that a product can be in multiple nodes of the product catalog and one would need to specify the product on a particular node for the direct URL to work.
    On a client site, we came up with a better solution by creating a new FM to retrieve the specific areaID and productID for a product. This FM could be called by extending the webshop. Then a .NET program was written to re-direct a shortened form of the URL to the long URL and therefore the specific product in the product catalog. Eg.: http://yyyyy.com/b2c/b2c/product would be automatically redirected to http://yyyyy.com/b2c/b2c/init.do?shop=<shop name>&areaID=<area Guid>&productID=<product Guid>, something similar to the concept behind "tinyurl.com". A point to remember here is that this would work only for the B2C webshop.
    Hope this helps.
    Cheers,
    Ashok.

  • How to save my photo library in a web service.

    Hello:
    In first place sorry for my poor english...
    I would like to know how to secure my photo library in a web service. I have 100gb free with my internet provider and i would like to use it. The problem is that i don´t know wich is the folder that i have to duplicate in the web and where to find it.
    I´ve been looking in the apple help services but i only find help for mobile me or time machine.
    Thanks in advance...

    If you want to back up your Library to the Web then you need to back up the iPhoto Library in your Pictures Folder.
    However, many people complain that it can take days for the upload - and in the event of a problem - download to restore.
    Regards
    TD

  • Adding a user using web services

    Is it possible to add a user using web services? I am trying to do this using .net but I am getting errors. I was able to search and delete users!

    I will look into this. The only thing is, I was able to update, remove and search users using web services in .net, but I don't understand why can't I add a user using the same web service? The method of creating a local user is available in the web service! I even tried adding a user and I get the following error:
    org.xml.sax.SAXException: Unable to create JavaBean of type com.adobe.idp.um.api.infomodel.User.  Missing default constructor?  Error was: java.lang.InstantiationException: com.adobe.idp.um.api.infomodel.User.
    doesn't this mean it is trying to create a user?
    web service:
    https://DomainName/soap/services/DirectoryManagerService?wsdl
    Web service function:
    public stringcreateLocalUser(UserlocalUser, string password);
    <xsd:element name="createLocalUser">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element minOccurs="0" maxOccurs="1" name="localUser" type="impl:User" />
    <xsd:element minOccurs="0" maxOccurs="1" name="password" type="xsd:string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>

  • How to get current logged-in user name in data access driver or in universe

    In universe, to get the current log in user is via @Variable('BOUSER').
    Right now, I need to be able to get the user name in the data access driver. I am writing a customized data access driver because we need to patch some where clause on the the query generated by the universe based on the logged-in user info. I only think of using end_sql parameter or adding an universe level filter to patch the @Variable('BOUSER') to the query, which would not work if user want to use customized query.
    Can anyone tell me how to get currentBO user name from connection server ? or how @Variable('BOUSER') is translated into the logged-in user name in the universe?

    I do not know your EJB Service. But you should pass the credentials of the current logged on portal user to your service. That's not by default I think.
    I had a similar problem with CAF developed webservices. I had to turn on permission checks in my web service and passed the credentials via logon ticket.
    Regards, Bernd

  • How to see the logged in user on the portal EP6 SP2

    Hi All,
    I am using EP6.0 SP2 Patch 5.I want to know that which users are logged on.Can I see the user id of the logged in user inthe portal.
    Any suggestions.
    Paritosh

    Hi Paritosh,
    I think SAP Note 762004 should answer your question!
    Best regards,
    Robert

  • How to show current logged in user image in Master Page

    Hi,
    I am trying to show logged in user image next to his name, following this article 
    http://erikswenson.blogspot.in/2011/04/display-user-profile-picture-next-to.html
    I am trying to do this in SharePoint 2013, so i put Reference
    in .Master file & Control in . html file
    Picture is not visible and when i tried to find whether the control has been loaded or not, the control also hasn't been loaded.
    Please tell me, how could i do this?

    This is not that hard to do, simply go into your masterpage (Design Manager) and copy and paste this on the top of the page:
    <%@ Register tagprefix="SPSWC" namespace="Microsoft.SharePoint.Portal.WebControls" assembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    Once that is done, you can now add this:
    <SPSWC:ProfilePropertyLoader runat="server" />
    <SPSWC:ProfilePropertyImage PropertyName="PictureUrl" ResizeToFit="115" ShowPlaceholder="true" id="PictureUrlImage" runat="server"/>
    To the location where you want the image to be shown. If you have a custom HTML page that you built out, just add it the same way. Let me know if you have any questions.
    -G

  • How to access data of all users in a page?

    Hi all, I am new to APEX and have a query.
    I have installed APEX on my local machine, created a workspace, and added a few users with roles.
    I am creating an application, similar to a Library app, where I have a table that stores Books information (BOOK_ID, BOOK_NAME, etc). I'd like to create another table BOOK_USER with two columns, BOOK_ID and USER_ID. BOOK_ID would refer to the BOOKS table, and I want USER_ID to refer to the table that stores user details of the workspace that I am using. The data entry would happen from a page that has two LOVs, one for book name (using BOOK_ID as the value) and another for user name (USER_ID, or whatever field APEX uses to store user's ID). Can I do that in APEX? I've found ways to access and authenticate a user for a page, but how to get data of all users in the workspace? In other words, how to get all usernames in a LOV?
    As I am new to APEX, I'd appreciate if someone can guide me through the steps, or post links to tutorial, etc.

    Assuming that you are using the Application Express User Accounts for authentication, in that case you have to use built-in apex views
    selet * from APEX_WORKSPACE_APEX_USERSAnd use USER_NAME column instead of user_id
    See http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/priv_public001.htm#HTMDB25949

  • How to determine the logged in user - BI Publisher

    Hi,
    I am building a SQL based BI Publisher report. I am using BI Publisher integrated with the E-Business Suite so all ebiz users can log in to BI Publisher
    I have a requirement that my parameter LOV query is to be restricted based on the BI publisher logged in user. I have the necessary select statement which just requires the logged in user to be supplied. But I don't know if there is any standard BI variables which I can use in my SQL Query
    Thanks
    Shasik
    Edited by: Shasik on Sep 14, 2008 1:04 AM

    Hi Shashi,
    http://winrichman.blogspot.com/2008/09/how-to-get-logged-in-obiee.html
    Use the available XDO session variables like :xdo_user_name
    Select :xdo_user_name from dual wil fetch you , the Logged in USER :)

  • How do I determine logged-in user ID from syscall probe ?

    Hello All - I am trying to determine the actual logged in user ID for the process/thread that is making a syscall from within a dtrace syscall probe handler. If I use the dtrace variable curpsinfo->pr_uid or curpsinfo->pr_euid I can obtain the correct UID as long as that user is not SUed to another user or root. If the user is SUed to root, then both the pr_uid and pr_euid values are 0 (for root).
    Can someone please help me find another place in some dtrace or kernel data structure that there is access to that would contain the actual logged-in user ID? Maybe somewhere in an audit data structure or something?
    Any help is greatly appreciated !! Thanks!
    Edited by: AndyFanton on Oct 6, 2009 3:31 PM

    This will work but not the most slick....
    curthread->t_procp->p_parent->p_cred->cr_uid
    May have to go up multiple levels, eg
    curthread->t_procp->p_parent->p_parent->p_cred->cr_uid
    curthread->t_procp->p_parent->p_parent->p_parent->p_cred->cr_uid

Maybe you are looking for

  • Changed Apple ID  is not working with the appstore

    I have 2 iPads. Upon updating to iOS 6 I've been experiencing the following problems: On iPad number 1: My Apple ID works from the settings menu, however when loading into the appstore, it keeps on asking me for a password of an old apple ID that I d

  • Smart forms with barcode

    Hi Experts, I have requirement to create bar code in smart form, the barcode format will be 39 full ASCII . I have tried to create a character format with this font but it is not available in smartstyles. Can you please help me how Can I create this

  • Custom Sort with a merged dimension in webi report

    Hello, I have a merged dimension (Year/Month - APR 2010, FEB 2010, MAR 2010, JAN 2010, ...), I need to apply a custom sort, but with a merged dimension this feature is disabled. Why? How can I solve this problem? Thanks & Regards SU

  • Apporval Overview displays incorrect status on item level after ordering

    Hi all, I am on SRM 7.0 and using the process-controlled workflow. I am on SP2. I set up a schema which has 1 approval step for SC > $10.000. The decision set is for the entire document. When I am creating the SC, BEFORE I hit order, I click on the i

  • How can i connect skype acount with my web

    i need add skype chat button on my web as support. How can i do? This is my web: http://xn--blogthsn-sec2106e.vn/