Copyright (c) 2001, Junzo SATO. All rights reserved.
Aug 13th 2001
J/Link Mathmatica package is loaded.
![[Graphics:Images/ldapdoc02_gr_1.gif]](Images/ldapdoc02_gr_1.gif)
InstallJava[ ] setups J/Link environment so that the Mathmatica can use Java. Options varies depending on which machine and operating system a user is using.
![[Graphics:Images/ldapdoc02_gr_2.gif]](Images/ldapdoc02_gr_2.gif)
![[Graphics:Images/ldapdoc02_gr_4.gif]](Images/ldapdoc02_gr_4.gif)
![[Graphics:Images/ldapdoc02_gr_5.gif]](Images/ldapdoc02_gr_5.gif)
![[Graphics:Images/ldapdoc02_gr_7.gif]](Images/ldapdoc02_gr_7.gif)
![[Graphics:Images/ldapdoc02_gr_8.gif]](Images/ldapdoc02_gr_8.gif)
A connection to the LDAP server is established. By default, LDAP server uses port number 389.
Connection to the LDAP server is created. In this example, localhost is used for convenience.
![[Graphics:Images/ldapdoc02_gr_9.gif]](Images/ldapdoc02_gr_9.gif)
![[Graphics:Images/ldapdoc02_gr_12.gif]](Images/ldapdoc02_gr_12.gif)
Tools are loaded and defined.
![[Graphics:Images/ldapdoc02_gr_15.gif]](Images/ldapdoc02_gr_15.gif)
![[Graphics:Images/ldapdoc02_gr_17.gif]](Images/ldapdoc02_gr_17.gif)
![[Graphics:Images/ldapdoc02_gr_18.gif]](Images/ldapdoc02_gr_18.gif)
![[Graphics:Images/ldapdoc02_gr_19.gif]](Images/ldapdoc02_gr_19.gif)
The above result is the same as the one that LDAP Editor/Browser has retrieved.
![[Graphics:Images/ldapdoc02_gr_26.gif]](Images/ldapdoc02_gr_26.gif)
Null password for authentication means anonymous connection.
![[Graphics:Images/ldapdoc02_gr_27.gif]](Images/ldapdoc02_gr_27.gif)
![[Graphics:Images/ldapdoc02_gr_35.gif]](Images/ldapdoc02_gr_35.gif)
![[Graphics:Images/ldapdoc02_gr_37.gif]](Images/ldapdoc02_gr_37.gif)
![[Graphics:Images/ldapdoc02_gr_39.gif]](Images/ldapdoc02_gr_39.gif)
![[Graphics:Images/ldapdoc02_gr_41.gif]](Images/ldapdoc02_gr_41.gif)
![[Graphics:Images/ldapdoc02_gr_87.gif]](Images/ldapdoc02_gr_87.gif)
![[Graphics:Images/ldapdoc02_gr_89.gif]](Images/ldapdoc02_gr_89.gif)
![[Graphics:Images/ldapdoc02_gr_135.gif]](Images/ldapdoc02_gr_135.gif)
![[Graphics:Images/ldapdoc02_gr_136.gif]](Images/ldapdoc02_gr_136.gif)
The NEW entry is added successfully. For simplicity, new entry is added under the ou=Special Users directory.
![[Graphics:Images/ldapdoc02_gr_137.gif]](Images/ldapdoc02_gr_137.gif)
AddAttribute[conn,dn,attrname,data] adds an attribute to the existing entry. If the data is exactly same value as the existing attribute, it fails.
![[Graphics:Images/ldapdoc02_gr_138.gif]](Images/ldapdoc02_gr_138.gif)
![[Graphics:Images/ldapdoc02_gr_139.gif]](Images/ldapdoc02_gr_139.gif)
New attribute (multivalued attribute) is added successfully.
![[Graphics:Images/ldapdoc02_gr_140.gif]](Images/ldapdoc02_gr_140.gif)
![[Graphics:Images/ldapdoc02_gr_141.gif]](Images/ldapdoc02_gr_141.gif)
![[Graphics:Images/ldapdoc02_gr_142.gif]](Images/ldapdoc02_gr_142.gif)
Attribute(s) named "mail" is replaced with new data.
![[Graphics:Images/ldapdoc02_gr_143.gif]](Images/ldapdoc02_gr_143.gif)
It's possible to replace attribute(s) with multivalues.
![[Graphics:Images/ldapdoc02_gr_144.gif]](Images/ldapdoc02_gr_144.gif)
The following figure shows the entry after replacement.
![[Graphics:Images/ldapdoc02_gr_145.gif]](Images/ldapdoc02_gr_145.gif)
![[Graphics:Images/ldapdoc02_gr_146.gif]](Images/ldapdoc02_gr_146.gif)
![[Graphics:Images/ldapdoc02_gr_147.gif]](Images/ldapdoc02_gr_147.gif)
Surely removed :-)
![[Graphics:Images/ldapdoc02_gr_148.gif]](Images/ldapdoc02_gr_148.gif)
![[Graphics:Images/ldapdoc02_gr_149.gif]](Images/ldapdoc02_gr_149.gif)
![[Graphics:Images/ldapdoc02_gr_150.gif]](Images/ldapdoc02_gr_150.gif)
Two mails are listed as the result of first modification. The telephoneNumber is removed by replacing old attribute with null. One more mail is added by the final modification.
![[Graphics:Images/ldapdoc02_gr_151.gif]](Images/ldapdoc02_gr_151.gif)
Connection to the LDAP server is closed.This is essentially the same as ldapconn@finalize[].
![[Graphics:Images/ldapdoc02_gr_152.gif]](Images/ldapdoc02_gr_152.gif)
![[Graphics:Images/ldapdoc02_gr_153.gif]](Images/ldapdoc02_gr_153.gif)
![[Graphics:Images/ldapdoc02_gr_155.gif]](Images/ldapdoc02_gr_155.gif)
[1] Rob Weltman and Tony Dahbura, "LDAP Programming with Java", Addison-Wesley, 2000