At line 1 added 7 lines |
[{TableOfContents}] |
|
!!!Status |
|
CRUD for LDAP contacts is working as of SVN revision 198. |
|
|
At line 18 added 16 lines |
Starting from: |
|
* [IBM Jersey Contacts Example|http://www.ibm.com/developerworks/web/library/wa-aj-tomcat/] |
|
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 |
|
* [Apache Directory Studio|http://directory.apache.org/studio/]: awesome tool, but overkill for an address book |
* [Evolution|http://projects.gnome.org/evolution/]: great but only for Linux users |
* [Apple Address Book.app]: read only |
* [Thunderbird|http://www.mozilla.org/en-US/thunderbird/]: read only |
|
At line 39 added one line |
*Committers SVN repository: [http://spacepirates.com/rw/ldapservice/] |
At line 48 added 57 lines |
|
!!!Tools |
|
* [Tomcat 7] |
* [Spring Framework] |
* [Spring LDAP|http://static.springsource.org/spring-ldap/site/reference/html/configuration.html] |
* [Spring Security] |
* [JAX-RS (Jersey)] |
* [Spring Security LDAP|http://static.springsource.org/spring-security/site/docs/3.1.x/reference/ldap.html] |
|
!!!Hints |
* [Use Spring @Autowired with Jersey|http://stackoverflow.com/questions/7638357/autowired-does-not-work-spring-3] |
* [Jersey @Produces both XML and JSON|http://stackoverflow.com/questions/2744972/beyond-the-produces-annotation-how-does-jersey-jax-rs-know-to-treat-a-pojo-a] |
* [Spring LDAP OdrManager Example|http://www.javabeat.net/articles/print.php?article_id=318] |
* [Spring 3 Required Libraries|http://static.springsource.org/spring/docs/upgrade/spring3/html/ch02s06.html] |
* [Spring Security Expression Language Reference|http://static.springsource.org/spring-security/site/docs/3.0.x/reference/el-access.html] |
* [Spring Security Tutorial|http://static.springsource.org/spring-security/site/tutorial.html] |
* [Use ResourceContext to get Autowired Subresources|http://stackoverflow.com/questions/7456755/jersey-rest-sub-resource-cdi?rq=1] |
* [Spring LDAP and Transactions|http://www.jayxu.com/2012/04/17/13449/] |
* [Escape Apostrophes in Log Messages|http://stackoverflow.com/questions/3399165/java-util-logging-message-template-question] |
* [Jersey JAX RS Overview|http://jersey.java.net/nonav/documentation/latest/jax-rs.html] |
|
!!!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":"" |
} |
]} |
}}} |