Programmer Reference : LDAP : Setting up the Example
Setting up the Example
The sample use cases need the following components:
An LDAP server with a directory of data
LDAP implementation in VA Smalltalk
Smalltalk sample use cases which exercise the previous two components.
The sample data referenced can be found in <varoot>/samples/ldap/exampleData.ldif where varoot is the root directory of the VA Smalltalk product installation. (See Installation Guide for further information).
The LDAP implementation and the Smalltalk sample use cases are found in the LDAP Support feature. The EsLdapExamples class implements the sample use cases.
To set up the example
1. Install and start Apache Directory Studio and populate it with the sample data. Apache Directory Studio performs the role of the server for the examples.(See See <varoot>/samples/ldap/ldap.rtf for instructions.)
2. Load the LDAP Support feature to get access to the LDAP implemantation and example code (EsLdapExamples) into the image.
That’s it. You are ready to run the LDAP samples.
 
Advanced Topics
 
The abt.ini file is used to configure the LDAP dll used in the Smalltalk LDAP implementation, as well as the host and port over which the data is transferred between client and server. It is set up properly for these samples. However, it is possible to configure the LDAP implementation to adapt to other configurations. Here is how.
The VA Smalltalk LDAP code has been tested with both the Window LDAP dll (wldap32) and on Linux with the dll from openLdap.org (libldap). The logical name LDAP_LIB must reference one of these dlls must be in the abt.ini file under the [PlatformLibrary Name Mappings] stanza. For instance, here is the setting for Windows:
[PlatformLibrary Name Mappings]
;windows
LDAP_LIB=wldap32
 
 
The abt.ini file also contains the stanza [ldap]. Depending on how the LDAP server is set up, hostName and portNumber may need to change for a VA Smalltalk application using the LDAP feature and making requests to a server on a different machine or over a different port. Here are the hostName and portNumber set appropriately for the example.
[ldap]
hostName='127.0.0.1'
portNumber=389
 
Last modified date: 05/25/2018