How Java connect to LDAP?

Hi guys
Does anybody know how Java connect to LDAP server. Thanks in advance.
Regards,
Mark.

http://www.java-pro.com/code/2000/JP0012.zip is the source code for the December 2000 issue of Java Pro magazine, which had an article about this. Inside you will find JP0012JB.zip which is the source code for working with LDAP. You don't get a copy of the articles in this zip file, only the code.

Similar Messages

  • How to connect to LDAP?

    Hi,
    where may I find information/documentatio/toturials of how to connect to LDAP from java classes?
    Please help.
    Thankyou,
    Nadir.

    Nadir,
    Here:
    http://java.sun.com/products/jndi/docs.html
    You can find many things there and the tutorial is good.
    Follow the links in http://java.sun.com/products/jndi/index.html#DOWNLOAD12, you can get many useful examples (great!).
    Some code work fine in my app:
    import javax.naming.*;
    import javax.naming.directory.*;
    env = new Hashtable(5, 0.75f);
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, URL);
    env.put(Context.REFERRAL, "ignore");
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, DN); //use your own one
    env.put(Context.SECURITY_CREDENTIALS, PassWord); //use your own one
    try {
    ctx = new InitialDirContext(env);
    } catch (NamingException e) {
    e.printStackTrace();
    Hope this helps.
    Cheers,
    George

  • How we connect OPEN LDAP to weblogic server

    Hi All,
    How we connect OPEN LDAP to weblogic server

    There are several blogs for how you set up Open LDAP as a security provider:
    http://biemond.blogspot.com/2008/10/using-openldap-as-security-provider-in.html
    http://blogs.oracle.com/jamesbayer/2007/08/using_openldap_with_weblogic_s.html

  • How to Connect to LDAP through SOA is it possible using BPEL

    Hi Guys,
    I have a requirement that how to access to LDAP system using BPEL process.
    do we need to write any java code to perform a few operations in to LDAP.
    Can you please tell me any one across this sceneario.
    Thanks in advance.
    Your help is more appreciate. this is urgent for us.
    Thanks.
    Chandrasekhar

    Hi Chandrasekhar
    1. Yes, there are many ways you can integrate AD with BPEL kind of indirectly. See some of the posts given below.
    oracle soa and active directory integration
    Weblogic administrator account is inactive after enabling DB Authenticator
    Also, once AD is integrated with Weblogic, using Admin Console etc, you can use the out of box REST services for quick testing. You can pretty much get and read all the stuff for any user/role/group/mappings etc. But its just ReadOnly and you cannot modify data on LDAP side. The below link should work for any security provider configured with your weblogic like DefaultAuthenticator or External AD integrated.
    http://soaserverhost:soaserverport/integration/services/IdentityService/identity
    Thanks
    Ravi Jegga

  • How to connect a LDAP Server?

    When creating the LDAP Data Server in Topology Manager using the Sunopsis LDAP Open Connector, the following message is displayed:
    "A NamingException occured saying: [LDAP: error code 49 - Invalid Credentials]"
    I use the sunopsis JDBC driver:
    com.sunopsis.ldap.jdbc.driver.SnpsLdapDriver
    and set the parameters:
    jdbc:snps:ldap?ldap_url=ldap://10.182.255.38:389/&ldap_basedn=cn=Users,dc=cn,dc=oracle,dc=com
    the user is set to:
    cn=orcladmin,cn=Users,dc=cn,dc=oracle,dc=com OR cn=orcladmin OR orcladmin, the error is the same.
    Could anyone tell me how to solve this issue?

    I can't connect to the ldap server.
    Using a simple java program, no problem, ODI, no go.
    Some code I found on the internet to connect to the ldap server
    Note the comments on SECURITY_PRINCIPAL and SECURITY_CREDENTIALS.
    This works fine for me.
    If I try to do the same with ODI, it doesn't work.
    Why?
    Kinde regards,
    Frans.
    public static void main( String[] args ) {
    // set up environment to access the server
    Properties env = new Properties();
    env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
    env.put( Context.PROVIDER_URL, "ldap://" + ldapServerName + "/" + rootContext);
    //env.put( Context.SECURITY_PRINCIPAL, rootdn );
    //env.put( Context.SECURITY_CREDENTIALS, rootpass );
    try {
    // obtain initial directory context using the environment
    DirContext ctx = new InitialDirContext( env );
    // now, create the root context, which is just a subcontext
    // of this initial directory context.
    //ctx.createSubcontext( rootContext );
    Attributes attr = ctx.getAttributes("");
    NamingEnumeration allAttr = attr.getAll();
    while (allAttr.hasMore()) {
    Attribute a = (Attribute)allAttr.next();
    System.out.println("attr: " + a.getID());
    NamingEnumeration values = attr.getAll();
    while (values.hasMore()) {
    System.out.println("value: " + values.next());
    catch ( NameAlreadyBoundException nabe ) {
    System.err.println( rootContext + " has already been bound!" );
    catch ( Exception e ) {
    System.err.println( e );
    }

  • How java will identifies LDAP user groups to admin/normal users -BOXIi3.1

    Hi all,
    We have successfully implemented Java interface with BOXI3.1.Now our client wants to move to LDAP Configuration in CMC.
    If we use LDAP configuration, is java login page will identify the user role(wether user is admin group/normal group).
    we have used below API for enterprise authentication:
      IEnterpriseSession enterpriseSession;
      ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
      enterpriseSession = sessionMgr.logon(userID, password, CMS, auth);
      auth=<secEnterprise>  is it enough to use auth=<secLDAP>
    or do we need to add any code/API for this requirement.
    Thanks,
    Subash

    Use secLDAP as the authentication type, and ensure both the CMS and your Java Web App Server machines can connect to the LDAP server.
    Sincerely,
    Ted Ueda

  • How to connect OpenLDAP WAS Java, EP?

    Hello experts,
    did anyone succed to connect an OpenLDAP to WAS Java?
    I think a OpenLDAP libary need to be installed/configured in order to use it for the user management in the EP.
    I would appreciate to get information how to realize the connection?
    Where I can get the libary?
    Is there any step-by-step-guide?
    Thanks in advance.
    Thomas

    Thank you for your reply.
    I would like to connect an OpenLDAP to our EP7.0 with Web Application Server Java.
    However all experts just inform me that it is possible to use LDAP as a datasource. I know this already and I know where to find general information about using LDAP for identity management.
    But I need information how to connect especially an OpenLDAP to EP7.0 with WAS Java, Win2k3 64bit; Connection should be writeable and in a Flathierachy.
    I think I just have to adjust one of the LDAP-configuration XML-files to the OpenLDAP requirements.
    In the standard delivery there are already Configuration-XML-Files for Microsoft AD, Novell, Sun etc.
    Is there already an Configuration-XML-File which I can use for OpenLDAP?
    If not how I can use and adjust the exisiting files to make the OpenLDAP connection work (Access writeable, Flathierachy)?
    Thanks in advance for your help.
    Thomas

  • How to connect from XI to LDAP

    Hi
    How to integrate XI and LDAP server.I know there is no LDAP adapter is available in XI. Can i use java proxy to connect to LDAP or is ther any other way to do the integration
    Regards
    Ravi Shankar B

    Hi
    You use a java proxy for doing XI <-> LDAP
    Helpful blogs.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7d4db211-0d01-0010-1e8e-9b07fc2113ab
    There is some config within XI (3.0 - SP5 onwards).
    Run transaction spro > Sap web Application Server > System Administration > Directory Integration > configure LDAP Connector, Define LDAP Users Confgure LDAP Server.
    Probably this could help you.
    Thanks
    Swarup

  • How 2 connect webdynpro for java to R/3 system

    could any one tell me . how 2 connect web Dyn pro for java to connect to R/3 system????

    Hi,
    Pls check threads like
    Read R/3 table in Webdynpro
    Changing R/3 data in webdynpro
    or go via Jco
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/frameset.htm
    JCO
    Eddy
    PS. Reward useful answers and earn points yourself

  • How to connect CRM 7 to Java Backend? Test?

    Hi All:
    How do I connect the CRM ABAP stack to an installed standalone (as per install guide) stack? I have followed the install manual but I still do not see how the connection is made!
    How do I test this connection to know whether it is working or not? (ABAP CRM calling something in Java CRM component)
    Also how do I attach my installed TREX?
    Thanks
    Tony.
    PS: I have already followed the respective install guides as well as post install section of the guides.

    Hello ,
    Please check the guide from the link http://service.sap.com/instguides
    Installation Guide
    SAP CRM 7.0 Java on Windows: Oracle
    Based on SAP NetWeaver 7.0 including Enhancement Package 1
    PUBLIC Document version: 1.1 ‒ 02/05/2009
    Section:  Page 98
    5.20 Checking the Availability of Back-End Systems for CRM Java Components
    After the installation, you have to check the availability of back-end systems as follows:
    1. To test the connection to the ABAP back-end system, you create a back-end user [page 99].
    2. Depending on various business processes, you check the following back-end systems:
    ABAP system [page 100]
    TREX Server [page 102]
    http access to eBay (selling via eBay processes only) [page 102].

  • How to connect Java and Microsoft SQL Server 2000

    hi,
    could anyone please teach me how to connect Java and SQL Sever 2000?? if possible could you guys provide me with an example??? i could hardly find any relevant resources about it...
    Thanks ~!

    thanks for the information...
    by the way hv any working module on it?? i'm new to
    both Java and Microsoft SQL Server... Thanks againFirst things first... you should read this:
    http://java.sun.com/docs/books/tutorial/jdbc/
    This is microsofts official JDBC Driver: http://www.microsoft.com/sql/downloads/jdbcregister.asp
    Install it and the documentation has some usage examples

  • How to connect iseries green screen from java program

    how to connect iseries green screen from java program to get the data in the DB files ,here the DB is DB2/400

    Just some Friday fun. Use the telnet program that comes with Windows and supports VT escape sequences.
    import java.io.*;
    import java.net.*;
    public class AutoTelnet {
         private static Socket s;
         public static void main(String[] args) throws Exception {
              Thread t = new Thread() {
                   @Override public void run() {
                        try {
                             s = new ServerSocket(5555).accept();
                        } catch (IOException ex) {
                             ex.printStackTrace();
              t.start();
              Process p = new ProcessBuilder("cmd", "/C", "start", "telnet", "127.0.0.1", "5555").redirectErrorStream(true).start();
              t.join();
              PrintStream ps = new PrintStream(s.getOutputStream());
              ps.println("Screen will be cleared in 5 seconds");
              ps.println("5");
              Thread.sleep(1000);
              ps.println("4");
              Thread.sleep(1000);
              ps.println("3");
              Thread.sleep(1000);
              ps.println("2");
              Thread.sleep(1000);
              ps.println("1");
              Thread.sleep(1000);
              ps.println("\u001b[2J");
              Thread.sleep(5000);
    }

  • How to connect oracle database with JAVA

    how to connect oracle database with JAVA....
    using j2sdk and Jcreator . which connector to use .. what are the code for that ..

    PLEASE .... Ask in an Oracle Java forum.
    And read the documentaiton. There is a whole document devoted to doing that. http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/toc.htm has examples.
    PLEASE ... do not ask product questions in a forum which clearly has a title saying it is devoted to assisting with download problems.

  • How to connect java with C

    Plz help....
    How to Connect a Java With C ....

    using the JNI, Java Native Interface. there are tons of tutorials on the web about it, that will explain far better and more completely than a few posts on a forum

  • How to connect Java into BarTender Label Printing Software

    Hi,
    I have one problem, my company have bartender label printing software 32 bit version, previously they use VB6 for controlling the dublicate printing of lable,but the software is gone. Now i want to do this in Java, but i don't know how to connect java into Bartender software.
    my company using old version, it accept only VB6. My Boss said can buy new Bartender Software but i don't know how to link and control dublicate printing. if anybody knows this connection between Bartender and Java please help me.
    if bartender New version support this features please send the link and example source code please help me.
    AnbuAathi

    Hi , i have the similar task ,where i need to connect my web portal application with the bartender software .I did a hugh R&D to integrate Java application with Bartender software but did not find any luck .So i request to provide the needed help to integrate my Java Application with Bartender software .
    Thanks in Advance
    Mohan

Maybe you are looking for

  • Creating business services in integration directory

    Hi   When business services are created in integration directory - these business services are not tied back to entries in the SLD - i.e we can create entries for business services directly in integration directory without having to import them from

  • 2 structures in a query

    Hi everbody, I've created a query that has structures both in rows and columns. The rows structure contains a few selections and a few simple formulas (division of two other elements). The columns structure has 2 selections and a formula representing

  • Ultra 10 with Creator 3D and VGA monitor

    On the back of my Ultra 10 there are two connectors for monitors: one is the usual VGA connector and appears to be connected to the motherboard, the other is the traditional 13W3 Sun connector, apparently located on a Creator 3D card that came with t

  • How copy info-record of one vendor to another ?

    Dear guru , A vendor change its VAT reg.no and I must create a new vendor. How can I run a massive copy of all info-record of the old vendor to the new vendor ? Thanks for your help.

  • No destination URL is defined. Use the followind redirect URL in Transactio

    Hi, I am new BSP, I have to display logon screen in my BSP application, i was copied SYSTEM bsp application and tried to run it, but it is throwing error "No destination URL is defined. Use the followind redirect URL in Transaction SICF:  /sap(====)/