From: Mark W. <mew...@un...> - 2000-09-04 13:35:02
|
You set your base to o=airius.com. This is the default base for Netscape's Directory server if you use their example directory data. You need to set this value to whatever the base is for your LDAP server. Mark On Mon, 4 Sep 2000, murali wrote: > H ai i am facing some problem regarding LDAP. > I am using some sample codes which arwe given in ldap client. > I am using select command but it is giving exception message No:32. > > > The number is for wrong name. > > The server i connected is Baylor.edu and other public ldap servers. > > Even i downloaded a ldap server for linux and tested it is giving the same > > error > > Bye > murali > email id: gm...@tr... > > > the code i used is:: > > > import netscape.ldap.*; > import java.util.*; > public class Search1 > { > > public static void main( String[] args ) > { > > LDAPConnection ld = new LDAPConnection(); > > try > { > > > System.out.println("it has established the connection" + ld); > ld.connect( "172.16.5.64", 389 ); > ld.authenticate(3,null,null); > > System.out.println("it is after the connection"); > Float LDAPVersion = ( Float )ld.getProperty( ld.LDAP_PROPERTY_PROTOCOL ); > System.out.println( "Highest supported LDAP protocol version: " + LDAPVersion ); > System.out.println( "The default LDAP protocol version used is " + ld.LDAP_VERSION > LDAPSearchResults results =ld.search("o=airius.com", LDAPv2.SCOPE_BASE, "(cn=jensen)", null, false ); > > System.out.println("it is before the while loop"); > > > > > > while ( results.hasMoreElements() ) > { > System.out.println("it has entrered into the while loop"); > LDAPEntry entry = null; > entry = results.next(); > System.out.println( entry.getDN() ); > ld.disconnect(); > > > } > > } > > catch( LDAPException e ) > { > System.out.println( "Error: " + e.toString() ); > System.out.println( "Error message: " + e.getLDAPErrorMessage() ); > > System.exit(1); > } > System.exit(0); > } > } > > |