Advertisement

12.28.2006 at 05:56PM PST, ID: 22105731
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

How to get information from LDAP
Tags: ldap, get, information, from, how
HellIo ALL,

The questions I need to ask is: we are using IBM portal as our development platform. LDAP is an authenticate server we are using. The current issus is: I want  to find all user who have registered on the LDAP server. The information I need to get from LDAP is such as user name, email, contact info., etc.

I haven't use LDAP before. where should I start? ( I'm using java)

Thanks for your instruction,

lilyyan
Start your free trial to view this solution
Question Stats
Zone: Database
Question Asked By: lilyyan
Solution Provided By: amodmulay
Participating Experts: 1
Solution Grade: A
Views: 44
Translate:
Loading Advertisement...
12.28.2006 at 11:38PM PST, ID: 18213225

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.28.2006 at 11:40PM PST, ID: 18213232

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.28.2006 at 11:41PM PST, ID: 18213233

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.29.2006 at 06:44AM PST, ID: 18214183

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.30.2006 at 03:18AM PST, ID: 18218588

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.02.2007 at 06:48PM PST, ID: 18232874

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.02.2007 at 09:59PM PST, ID: 18233402

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.19.2007 at 05:33AM PST, ID: 18348805

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.19.2007 at 05:36AM PST, ID: 18348828

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
12.28.2006 at 11:38PM PST, ID: 18213225
Hey

First of all use  JLDAP it is provided by novel and is available through a link on openldap.org

http://developer.novell.com/wiki/index.php/Jldap

It will solve you problem of connecting as it also provides you with a connection pooling class.
All the data that is retrieved, is in a string format and  you can easily write it to an xml file according to the way you want.

JLDAP also has Async-search

Do tell me if u need anything...i am working on the same thing
Accepted Solution
 
12.28.2006 at 11:40PM PST, ID: 18213232
here is a sample program for searching all the data in ldap


import com.novell.ldap.LDAPAttribute;

import com.novell.ldap.LDAPAttributeSet;

import com.novell.ldap.LDAPConnection;

import com.novell.ldap.LDAPEntry;

import com.novell.ldap.LDAPException;

import com.novell.ldap.LDAPSearchResults;

import com.novell.ldap.util.Base64;

import java.util.Enumeration;

import java.util.Iterator;

import java.io.UnsupportedEncodingException;



public class Search

{

    public static void main( String[] args )

    {

        if (args.length != 5) {

           System.out.println("Usage:   java Search <host name> <login dn>"

                              + " <password> <search base>\n"

                              + "         <search filter>");

           System.out.println("Example: java Search Acme.com"

                                    + " \"cn=admin,o=Acme\""

                                    + " secret \"ou=sales,o=Acme\"\n"

                                    + "         \"(objectclass=*)\"");

           System.exit(0);

        }



        int ldapPort = LDAPConnection.DEFAULT_PORT;

        int searchScope = LDAPConnection.SCOPE_ONE;

        int ldapVersion  = LDAPConnection.LDAP_V3;

        String ldapHost = args[0];

        String loginDN  = args[1];

        String password = args[2];

        String searchBase = args[3];

        String searchFilter = args[4];

        LDAPConnection lc = new LDAPConnection();



        try {

            // connect to the server

            lc.connect( ldapHost, ldapPort );

            // bind to the server

            lc.bind( ldapVersion, loginDN, password.getBytes("UTF8") );



            LDAPSearchResults searchResults =

                lc.search(  searchBase,

                            searchScope,

                            searchFilter,

                            null,          // return all attributes

                            false);        // return attrs and values



            /* To print out the search results,

             *   -- The first while loop goes through all the entries

             *   -- The second while loop goes through all the attributes

             *   -- The third while loop goes through all the attribute values

             */

            while ( searchResults.hasMore()) {

                LDAPEntry nextEntry = null;

                try {

                    nextEntry = searchResults.next();

                }

                catch(LDAPException e) {

                    System.out.println("Error: " + e.toString());



                    // Exception is thrown, go for next entry

                    if(e.getResultCode() == LDAPException.LDAP_TIMEOUT || e.getResultCode() == LDAPException.CONNECT_ERROR)

                          break;

                    else

                          continue;

                }



                System.out.println("\n" + nextEntry.getDN());

                System.out.println("  Attributes: ");



                LDAPAttributeSet attributeSet = nextEntry.getAttributeSet();

                Iterator allAttributes = attributeSet.iterator();



                while(allAttributes.hasNext()) {

                    LDAPAttribute attribute =

                                (LDAPAttribute)allAttributes.next();

                    String attributeName = attribute.getName();



                    System.out.println("    " + attributeName);



                    Enumeration allValues = attribute.getStringValues();



                    if( allValues != null) {

                        while(allValues.hasMoreElements()) {

                            String Value = (String) allValues.nextElement();

                            if (Base64.isLDIFSafe(Value)) {

                                // is printable

                                System.out.println("      " + Value);

                            }

                            else {

                                // base64 encode and then print out

                                Value = Base64.encode(Value.getBytes());

                                System.out.println("      " + Value);

                            }

                        }

                    }

                }

            }

            // disconnect with the server

            lc.disconnect();

        }

        catch( LDAPException e ) {

            System.out.println( "Error: " + e.toString() );

        }

        catch( UnsupportedEncodingException e ) {

            System.out.println( "Error: " + e.toString() );

        }

        System.exit(0);

    }

}
Assisted Solution
 
12.28.2006 at 11:41PM PST, ID: 18213233
you can specify in your search base or filter as to what data you want....
 
12.29.2006 at 06:44AM PST, ID: 18214183
Thanks so much for your reply.

I don't have much clue yet, so got some question to ask for getting started:

q1:
There are several kinds of LDAP server. Does the brand of LDAP  matter when retrieving data from LDAP?

q2:
As you introduced, there is JNDI or JLDAP. which one is better ? beside these two, is there other way ?

q3:
what is "JLDAP Async-search "



 
12.30.2006 at 03:18AM PST, ID: 18218588

q1:
There are several kinds of LDAP server. Does the brand of LDAP  matter when retrieving data from LDAP?
:NO

q2:
As you introduced, there is JNDI or JLDAP. which one is better ? beside these two, is there other way ?
: JLDAP is goo if you are ok with using 3rd part API's else only option is JNDI

q3:
what is "JLDAP Async-search "
Basically the search operations are asynchronously made to help you retrive data faster. it less intensive than having the whole tree searched with all the parmeters for single entry
 
01.02.2007 at 06:48PM PST, ID: 18232874
Hello,amodmulay

Thanks so much for your reply. I haven't get  a chance working on the ldap recently. But I will get back to this question soon.

lilyyan
 
01.02.2007 at 09:59PM PST, ID: 18233402
no problem all the best
 
01.19.2007 at 05:33AM PST, ID: 18348805
Hello,amodmulay

I still doesn't get a chance to working on the ldap. But I would like to close the question for now.
Hopefully, when I posted another question on ldap, you may find it. : )
 
01.19.2007 at 05:36AM PST, ID: 18348828
sure man thanx a lot....post it in java though!!
 
 
20080236-EE-VQP-29