Accessing a Domino server from Java (by alaric)
For a project, I'm having to write some Java code to talk to a Domino server.
Finding any references on how to do this is a BIG pain, so for posterity, here is what I've found.
- Get the NCSO.jar file from a copy of Notes or the Domino server itself - but make sure that it's the NCSO.jar from the version of Domino you'll be talking to, or a copy of Notes that is the same version as it, since different versions have different NCSO.jar files. Shove it in yer classpath.
- Read this documentation - it explains how to use the classes in the jar to get a Session object, from which you can open a Database, then open a View (which is like an SQL table), then get the column names and Documents (rows) out of it.
- Make sure the server has the HTTP server and DIIOP server tasks started. The HTTP server is needed because the client, when given a hostname/username/password triplet, fetches
http://HOSTNAME/diiop_ior.txt
to get the IOR of the server's CORBA interface.
Oooh, another reference: Java access to the Domino Objects, Part 1 and Java access to the Domino Objects, Part 2
By Alex B, Fri 8th Sep 2006 @ 1:56 am
Oh, happy days as a Notes/Java programmer!
Bonus: the Java API is based on the LotusScrpit API, so you're getting the jump on writing LotusScript agents in Domino.