Access LDAP attribute from Webmail

Hi there,
We need to do some customizations on webmail.
One of the things we want to do is to be able to read and write an ldap attribute outside the multivalue attribute NSWMEXTENDEDUSERPREFS.
I've seen on "Webmail Express Customization Guide" that we can load on http startup other external attributes using a command like:
configutil -l -o service.http.extrauserldapattrs -v myattribute:w
on which the :w at the end means that webmail could have write access to the attribute. (Pag 71 of W.E.C. Guide)
I've done that, but the problem is that if I try to write a new value on the attribute, the value is created on the NSWMEXTENDEDUSERPREFS as myattribute=value
So .. It reads from one side but write to another! Any ideas how to write on the myattribute directly from webmail interface?!
Thanks,
Sergio Sousa

Hi,
have you allready tryed to read the attribute directly from the BOL in the implementation class of the view, without creating any new context node? Maybe this coding might help you:
DATA: lr_entity        TYPE REF TO cl_crm_bol_entity,
DATA: lv_collection TYPE REF TO if_bol_bo_col.
DATA: lv_cat type string.
lr_entity ?= me->typed_context->BTAdminH->collection_wrapper->get_current( ).
  TRY.
  lv_collection = lr_entity->get_related_entities( iv_relation_name = 'BTHeaderActivityExt' ).
   CATCH cx_sy_ref_is_initial.
ENDTRY.
      lr_entity ?= lv_collection->get_current( ).
  CALL METHOD lr_entity->if_bol_bo_property_access~get_property_as_string
    EXPORTING
      iv_attr_name = 'CATEGORY'
    RECEIVING
      rv_result    = lv_cat.
Best regards,
Oliver

Similar Messages

  • Accessing LDAP Directory from ABAP

    Hi all,
    is there an easy posibility to access LDAP Users with their orgnanizational data from ABAP? I also would need to access the roles that are created on the LDAP as it is the general UME.
    Thanks and best regards,
    Dennis Junker

    Hello Dennis,
    You can synchronize your data between LDAP and ABAP with certain limitations. For example, passwords cannot be synchronized. Refer to SAP  notes:                                                               
      793191 - FAQ: User master synchronization with LDAP directories     
      603208 - Passwords during the LDAP user master synchronization                                                                               
    If you are trying to use the LDAP for authenticating SAP users, this is not possible too. Have a look at SAP note 448360. An excerpt:  
    o  Logging on to the SAP system                                                                               
    The Application Server ABAP does not support the direct use of     
       the directory to authenticate a user.                              
    But you could use the LDAP to authenticate your users via portal.
    Regards,
    Désiré

  • Accessing user attributes from a pipeline component

    Hello,
    I'm using WLCS & WLPS 3.1. I use webflow and I have implemented the page
    transition myself to work with the portal. Everything is working fine.
    I'm planning to implement a complex step of a business process as a pipeline
    component. For various reasons, this PC will be implemented as an EJB. To
    perform its job, this PC needs to get information about the user that is
    currently logged in. More specifically, it needs to lookup custom attributes
    from the user profile (i.e. user property set).
    So my question is : is this possible directly from the PC, or do I have to
    populate the pipeline session with required information in the input
    processor?
    Thank you for your advice
    Nicolas

    Hello Ture,
    Thanks for both posts.
    Nicolas
    "Ture Hoefner" <[email protected]> wrote in message
    news:[email protected]..
    ... To perform its job, this PC needs to get information about the userthat
    is
    currently logged in. More specifically, it needs to lookup customattributes
    from the user profile (i.e. user property set).
    So my question is : is this possible directly from the PC, or do I haveto
    populate the pipeline session with required information in the input
    processor?Hello Nicolas,
    I have not tried this myself. I think that the disconnect between the
    pipeline session and the portal session is probably the fact that theattributes
    in the portal session have their keys "fixed up" by prepending the portal
    request URI. This is made possible by the
    com.beasys.commerce.foundation.flow.jsp.DefaultDestinationDeterminer,which the
    PortalDestinationDeterminer extends. It puts a "TRAFFIC.URI" attributeinto the
    each request that goes through the FlowManagerServlet for the portal. Inthe
    Acme exampleportal, the "SERVICEMANAGER.USER" attribute is put into theportal
    HttpSession as "exampleportal.SERVICEMANAGER.USER".
    If you want to get to the cached profile from your portal from yourpipeline
    component (PC) then you would have to know that the name is "fixed up" tobe
    "exampleportal.CACHED_PROFILE". There are probably several different waysyou
    could get the "TRAFFIC.URI" information to your PC.
    Ture Hoefner
    BEA Systems, Inc.
    2590 Pearl St.
    Suite 110
    Boulder, CO 80302
    www.bea.com

  • How to access the attributes from a method

    Hi,
    Thanks to all who replied to my previous thread. Please let me know how to access the attributes in method of component controller in the view.
    Let Component_method be my method in component controller which contrains few attributes like this
    method component_method.
    data : node1 type ref to if_wd_context_node,
            itab type standard type of mara.
    endmethod.
    I want to access the above attributes in method of view.
    method view1.
    wd_comp_controller->method_component( ).
    ????? how to access the data of the method_component?
    endmethod.
    Kindly help me out in the syntax.
    Rgrds
    Mahathi

    Hi mahathi
    You should define the parameters in the header, not in the body of the method:
    You can define it as importing, exporting, changing or returning, as you need. For example, in SE80
    Parameter             Cl.declar.          RefTo        Opt        Type ref
    node1                    importing            X                          if_wd_context_node
    itab                       exporting                                        mara
    method_component().
    " code here...
    endmethod.
    and when you have to call the method,
    wd_comp_controller->method_component(
                    EXPORTING     node1 = nodelocal   " not importing!!!
                    IMPORTING      itab   = itablocal      " not exporting!!!
    i think that it's this what you want, don't i?

  • Cannot access exchange attribute from java

    I have tried to access pwdLastSet attribute for a particular staff inside the Active Directory 2008, works fine. However when I try to access msDS-UserPasswordExpiryTimeComputed I get null pointer exception. The value associated with this attribute is available. Infact I am getting error for all msxxxx fields. I am unable to understand why I cannot, access these attributes.
    Attribute attr=attrs.get("pwdLastSet"); ---> works fine
    //Attribute attr=attrs.get("msDS-PrincipalName"); ---> throws an exception.
    Would appreciate help to resolve my problem.

    //Attribute attr=attrs.get("msDS-PrincipalName"); ---> throws an exception.If that throws a NullPointerException it can only be because attrs is null. Or else you need to post the stack trace here.

  • Access Global attribute from with the BSP code.

    I have an attribute created within the View controller implementation class. The attribute is called GV_COUNT.
    Within my BSP  code I want to access this global variable, but I'm getting an error when activating the code, having statements like CLEAR GV_COUNT. in my code.
    Is there a format that is required. At the moment I just receive an error saying that field GV_COUNT is unknown.
    I thought that anything defined in the controller class was available for anything below.
    Jason

    Thanks Christian.
    Of course the attribute has been made public, and now that you've mentioned 'CONTROLLER' I feel rather foolish, as I should have known this.
    Many thanks to yourself and others for the replies.
    Regards
    Jason

  • How do you access html attributes from an Event?

    Hi,
    Is there a way to access the VALUE of this html tag in the event code?
    Html:
    <input type="IMAGE" id="testId" src="images/sort_ascending.gif" name="event_Sort" value="ASC" />
    Event Code:
    public void onSort(DataActionContext ctx)
    // Code before executing the default action
    //if (ctx.getEventActionBinding() != null) ctx.getEventActionBinding().doIt();
    // Code after executing the default action
    }

    Duncan or anyone,
    Any Ideas why I can not get this to work?
    I do not get the value "ASC" in a prameter "event_Sort".
    I do get Two Parameters event_Sort.x & event_Sort.y.
    I believe they represent the coordinates on the image that I clicked?
    Here is all my code simple to the core:
    JSP Page:
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>untitled</title>
    </head>
    <body>
    <form action="action1.jsp">
    <input type="image" src="images/sort_ascending.gif" name="event_Sort" value="ASC"/>
    </form>
    </body>
    </html>
    Java Event Code:
    package mypackage3;
    import javax.servlet.http.HttpServletRequest;
    import oracle.adf.controller.struts.actions.DataForwardAction;
    import oracle.adf.controller.struts.actions.DataActionContext;
    public class Action1Action extends DataForwardAction
    // To handle an event named "yourname" add a method:
    // public void onYourname(DataActionContext ctx)
    // To override a method of the lifecycle, go to
    // the main menu "Tools/Override Methods...".
    public void onSort(DataActionContext ctx)
    // Code before executing the default action
    //if (ctx.getEventActionBinding() != null) ctx.getEventActionBinding().doIt();
    // Code after executing the default action
    HttpServletRequest request = ctx.getHttpServletRequest();
    String sortValue = request.getParameter("event_Sort");
    System.out.println(sortValue);
    }

  • How to get user attributes from LDAP authenticator

    I am using an LDAP authenticator and identity asserter to get user / group information.
    I would like to access LDAP attributes for the user in my ADF Taskflow (Deployed into webcenter spaces).
    Is there an available api to get all the user attributes through the established weblogic authenticator provider or do i have to directly connect to the LDAP server again?
    Any help would be appreciated

    Hi Julián,
    in fact, I've never worked with BSP iViews and so I don't know if there is a direct way to achieve what you want. Maybe you should ask within BSP forum...
    A possibility would be to create a proxy iView around the BSP iView (in fact: before the BSP AppIntegrator component) which reads the user names and passes this as application params to the BSP component. But this is
    Beginner
    Medium
    Advanced
    Also see http://help.sap.com/saphelp_nw04/helpdata/en/16/1e0541a407f06fe10000000a1550b0/frameset.htm
    Hope it helps
    Detlev

  • How to access Business object type attribute from a method/function modul ?

    Hello,
    i have created a business object type object along with attributes and methods. Now inside the method i want to access the attributes. inside the method i am writing:
    data a type XXX.
    a = me->attribute
    this is creating a compilation error.
    Now the method is defined as a function module in some package, so can anyone inform me how to access object attributes from the function module ?
    pointes are awarded
    Regards

    Hello,
    thanks for your answer, but this too did not work, "=>" is for static attributes and the attributes i have are not static. Moreover, i tried it but it gave the same error :
    the abap error was when i was checking the code is :
    the type me=>documenttype is unknown
    as you know in SWO1 i created an object and when i create a method you link it to a function module and this is where you have the implementation of the method, so from this method how can i access the attributes on the main object that i created in SWO1
    regards

  • Read Implementation class attribute from context node

    Hello all,
    I have a global atttribute in my Implementation class. How can I access this attribute from the getter setter method of an attribute in my Context node?
    Regards,
    Debolina

    hi ,
    I discovered that we cannot access the child nodes from parent class,so instead I am using custom controllers

  • Accessing custom attributes in LDAP using WD Java - UME APIs

    Hello Friends,
    I am trying to access a custom attribute from LDAP in WebDynpro Java. I am using bellow code.
    IWDClientUser clientUser = WDClientUser.getCurrentUser();
    IUser sapUser = clientUser.getSAPUser();
    if (sapUser != null) {
    String[] str_emp = sapUser.getAttribute(<Name Space>,"Attribute Name");
    if (str_emp == null || str_emp.length == 0) {
    wdComponentAPI.getMessageManager().reportSuccess(" NULL ");
    return;
    } else {
    strEmpID = str_emp[0];
    wdComponentAPI.getMessageManager().reportSuccess(strEmpID);
    The name space is "$usermapping$". I am not sure why it is like that only for this attribute i am trying to access.
    I am getting null value if i run this code.
    Can any one help
    thanks
    Shobhan

    Hi,
    Are you sure this is the right namespace? The default namespace is com.sap.security.core.usermanagement.
    You can get all namespaces and the names of all attributes defined for a user using methods getAttributeNamespaces and getAttributeNames : [Interface IPrincipal|http://help.sap.com/javadocs/NW04S/current/se/index.html].
    Regards,
    Pierre

  • Getting User Attributes from an Active Directory LDAP

    Hello all.
    I want to extract attributes assigned to a user in the Active Directory LDAP and make them available through the getPropertyValue property in Javascript. I know that a user's System Attributes can be accessed with getPropertyValue but I have not found a way to get specific attributes from the LDAP and make them available as specific attributes in xMII. System attributes like "EmailAddress1" seem to transfer from the LDAP but others don't. Anyone have any ideas?
    Thanks.
    ...Sparks

    Sparks,
    If you're using 11.5 or 12 actually they should all map into the system as session properties.  You can use the following URL to verify your session properties:
    http://<xMIIServer>/Lighthammer/PropertyAccessServlet?Mode=List
    If you are not seeing the attributes you expect then your Attribute Query for User or Role is incorrect for your LDAP system and you need to change the LDAP configuration queries.
    -Sam

  • Editing LDAP User attributes from UME interface

    Hi Gurus,
    We want to develop a solution with user management screens in WD. These screens will provide password reset and unlock functionality for users. Our users are stored in LDAP. Current connection to LDAP is in Read Only manner.
    I want to know
    1. How to enable the connection from UME to LDAP in read/write manner?
    2. What certificates need to be exchanged for write access? if any?
    3. What changes needs to be done in config file of UME?
    4. Which permissions should be granted for communication user to edit LDAP user attributes?
    Even after performing the change to read LDAP in read/write manner, will it be sure: If we lock user from UME, it will lock LDAP user? please comment.
    regards
    Kedar Kulkarni

    Hi,
    We are half way into our application between UME and LDAP. We have developed screens and tested in our internal server. In internal landscape, UME is connected to LDAP in read only fashion. So when we try to create User, it gets created in UME.
    But when we deploy same application into client landscape, we receive error as below:
    No data source feels responsible for principal. Please check the data source configuration
    Now we are not sure why this error is getting displayed.
    In client landscape there are 2 LDAPs connected to UME, with only one LDAP in read/ write access.
    Is there any way we can check which LDAP is being accessed by our code? Is there any concept of Default LDAP?
    Any code to access LDAP details will help us lot.
    regards
    Kedar Kulkarni

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • Unable to Retrieve Attributes from LDAP Server

    I have a problem. I was wondering if anyone can assist me. I am new to LDAP servers and JNDI. I cannot retrieve any attributes from the users listed in my data entry. Any assistance would be greatly appreciated! Thanks.
    I created an entry in the LDAP server that looks like this:
    �o=somedn�
    |
    �ou=people, o=somedn�
    The �ou=people, o=somedn� entry contains fictitious users. The LDAP server is connected to a MySQL database. When I write Java code to read the attributes of a given user whose fullname (cn) is �Vinny Luigi�, as listed in the database, I receive an error that starts with the following:
    javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'cn=Vinny Luigi,ou=people'
    The code I used is based on the Sun JNDI tutorial. Sun�s code is at http://java.sun.com/products/jndi/tutorial/basics/directory/src/GetattrsAll.java. My version of the code is below:
    * @(#)GetattrsAll.java     1.5 00/04/28
    * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
    * Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free,
    * license to use, modify and redistribute this software in source and
    * binary code form, provided that i) this copyright notice and license
    * appear on all copies of the software; and ii) Licensee does not
    * utilize the software in a manner which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any
    * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
    * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
    * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE
    * HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE
    * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
    * MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN
    * NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
    * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
    * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT
    * OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS
    * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line
    * control of aircraft, air traffic, aircraft navigation or aircraft
    * communications; or in the design, construction, operation or
    * maintenance of any nuclear facility. Licensee represents and warrants
    * that it will not use or redistribute the Software for such purposes.
    import javax.naming.*;
    import javax.naming.directory.*;
    import java.util.Hashtable;
    * Demonstrates how to retrieve all attributes of a named object.
    * usage: java GetattrsAll
    class GetattrsAll
         static void printAttrs(Attributes attrs)
              if (attrs == null)
                   System.out.println("No attributes");
              else
                   /* Print each attribute */
                   try
                        for (NamingEnumeration ae = attrs.getAll(); ae.hasMore();)
                             Attribute attr = (Attribute) ae.next();
                             System.out.println("attribute: " + attr.getID());
                             /* print each value */
                             for (NamingEnumeration e = attr.getAll(); e.hasMore(); System.out.println("value: " + e.next()) )
                   } catch (NamingException e) {
                        e.printStackTrace();
         public static void main(String[] args) {
              // Set up the environment for creating the initial context
              Hashtable env = new Hashtable(100);
              env.put(Context.INITIAL_CONTEXT_FACTORY,
                        "com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL, "ldap://localhost:10389/o=somedn");
              try {
                   // Create the initial context
                   DirContext ctx = new InitialDirContext(env);
                   // Get all the attributes of named object
                   System.out.println("About to use ctx.getAttributes()");
                   Attributes answer = ctx.getAttributes("cn=Vinny Luigi,ou=people");
                   // Print the answer
                   printAttrs(answer);
                   // Close the context when we're done
                   ctx.close();
              } catch (Exception e) {
                   e.printStackTrace();
    The primary key of the database is id_pk. Below is a copy of the mapping.xml file which maps the LDAP server entry to the database:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE mapping PUBLIC "-//Penrose/DTD Mapping 1.2//EN" "http://penrose.safehaus.org/dtd/mapping.dtd">
    <mapping>
    <entry dn="o=somedn">
    <oc>organization</oc>
    <oc>top</oc>
    <at name="o" rdn="true">
    <constant>somedn</constant>
    </at>
    <aci>
    <permission>rs</permission>
    </aci>
    </entry>
    <entry dn="ou=people,o=somedn">
    <oc>inetOrgPerson</oc>
    <oc>organizationalPerson</oc>
    <oc>organizationalUnit</oc>
    <oc>person</oc>
    <oc>top</oc>
    <at name="cn">
    <constant>"fullname"</constant>
    </at>
    <at name="ou" rdn="true">
    <constant>people</constant>
    </at>
    <at name="sn">
    <constant>"lastname"</constant>
    </at>
    </entry>
    <entry dn="id_pk=...,ou=people,o=somedn">
    <oc>inetOrgPerson</oc>
    <oc>organizationalPerson</oc>
    <oc>person</oc>
    <oc>top</oc>
    <at name="Position_">
    <variable>usertable9.Position_</variable>
    </at>
    <at name="id_pk" rdn="true">
    <variable>usertable9.id_pk</variable>
    </at>
    <at name="fullname">
    <variable>usertable9.fullname</variable>
    </at>
    <at name="lastname">
    <variable>usertable9.lastname</variable>
    </at>
    <at name="cn">
    <variable>usertable9.fullname</variable>
    </at>
    <at name="sn">
    <variable>usertable9.lastname</variable>
    </at>
    <source name="usertable9">
    <source-name>usertable9</source-name>
    <field name="Position_">
    <variable>Position_</variable>
    </field>
    <field name="id_pk">
    <variable>id_pk</variable>
    </field>
    <field name="fullname">
    <variable>cn</variable>
    </field>
    <field name="lastname">
    <variable>sn</variable>
    </field>
    </source>
    </entry>
    </mapping>
    Thanks.

    The complete name (Distinguished Name) of the user you're searching is 'cn=Vinny Luigi,ou=people,o=somedn'.
    Regards,
    Ludovic.

Maybe you are looking for