I'm using netscape ldapsdk-4.1.jar,I am able to connect & authenticate with my ldap server :
try{
ldi.connect(hostname,LDAPv3.DEFAULT_PORT);
LDAPConnectionInfo.ldapSearchResults = ldi.search(LDAPConnectionInfo.MY_SEARCHBASE,LDAPConnectionInfo.MY_SCOPE,LDAPConnectionInfo.MY_FILTER,null,false);
System.out.println("Ldap Search Result : " +LDAPConnectionInfo.ldapSearchResults);
ldi.authenticate(3, "host", "****");
}
.....
Now I want fetch the data from :
I think I have to use some ldap query to fetch these data....any input will be highly appreciated.
Create a search request for each organizational unit where:
subtree
objectClass=commonObjectClass
where commonObjectCLass
is an objectClass common to entries to be retrieved, or cn=*
transmit each search request in turn to the LDAP directory server and interpret the responses.
Do not use the netscape code, it's ancient, buggy, and slow. Use the UnboundID LDAP SDK instead