This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Status#

_CRUD for LDAP contacts is working_

Introduction#

For ages, some people have desired an LDAP client sufficient to use as an address book.

Such an LDAP client must have the following features:

  • Create, update and delete LDAP entries
    • Edit attributes which are part of the distinguished name (DN)
    • Create update and delete attributes

Starting from:

Need to continue using the DN=uid=random,uid=realuser,ou=People... trick as not sure how to describe "uniqueness" in LDAP without unique DNs.

The URIs for the contacts will be http://server:port/addressbook/contact/uid

Exiting LDAP CLients#

ldapservice#

The ldapservice project provides a Java EE web application with a REST API for interacting with an LDAP server.

ldapclient#

The ldapclient project provides and HTML5 application which is a GUI interacting with the ldapservice.

Dealing with Updating DN#

  • Edit DN: clone, change DN, remove original, insert clone with new DN

Tools#

Hints#

Learning#

Netbeans 7 has some handy code generation tools (e.g. constructors, toString, hashCode, etc.).

Netbeans 7 automatically detects Jersey web services and shows the RESTful Web Service node in the project tree.

Netbeans 7 detects copy and pasted class references and generates the necessary import statements.

Netbeans 7 autodeploy on change to Tomcat is working nicely, even detects changes to Spring context.xml.

Netbeans 7 automatically fills in the correct xsi:schemalocation URLs when you add an xmlns: to your Spring context.xml.

Status#

Code has been committed. Here's is an XML output from the "addressbook" service:

addressbook-xml.png

And here's the mocked contact output in JSON:

{"contact":[
{
  "displayName":"Joe Lion","faxNumber":"","firstName":"Joe",
  "homePhone":"510 222 5555","htmlEmail":"false","lastName":"Lion",
  "mobileNumber":"510 333 6666","nickname":"JoeL","pagerNumber":"",
  "primaryEmail":"joelion@jungle.com","secondaryEmail":"",
  "uid":"1","workPhone":""
},
{
  "displayName":"Sam Snake","faxNumber":"","firstName":"Sam",
  "homePhone":"510 444 5555","htmlEmail":"false","lastName":"Snake",
  "mobileNumber":"510 555 6666","nickname":"SamS","pagerNumber":"",
  "primaryEmail":"samsnake@jungle.com","secondaryEmail":"",
  "uid":"2","workPhone":""
}
]}

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
png
addressbook-xml.png 111.2 kB 1 06-Jun-2012 22:43 scott mocked up 2 contacts
« This particular version was published on 09-Jun-2012 18:22 by scott.  
Welcome (anonymous guest) Wiki Prefs
JSPWiki v2.8.5-svn-6