views:

551

answers:

2

Hello,

I am new to lotus notes and domino server. I want my iPhone application to have access of domino server. I want to get Contacts from domino server in my iPhone Application.

I googled for it,I found many documents. but I couldn't find perfect data flow for that. can any one explain me how can i get Contacts/Calendar/Mail from domino Server.

What is the purpose of using java Agents for lotus notes? In simpler word, I want to make Lotus notes for iPhone with iPhone SDK 3.0.

Thanks,

+4  A: 

As you can't use the lotus java libraries to access Lotus Domino, your best bet would be to access Lotus Domino via HTTP to get the data. The simplest way (if you have no experience whatsoever developing in Lotus Notes) would be to try and get the data from the existing views in names.nsf (the Server Directory) and the mail databases. To do so, you can call a view with the following parameters:

http://www.yourserver.com/names.nsf/($users)?readviewentries
http://www.yourserver.com/names.nsf/($users)?readviewentries&outputformat=JSON

In each case you are getting the data from the view "($users)" in the "names.nsf" database, in XML or JSON format.

If you need more data than is available in the existing views, I would recommend against creating new views (as it would imply modifying the standard templates). For that, I would create a new database with agents that recovered de info you need and returned it in the format you prefer.

Agents are just blocks of code (usually written in LotusScript, which is similar to VBasic, or Java). They can be scheduled to run at certain times or events, or called directly (from notes or via URL). You could call an Agent using an url as such:

http://www.yourserver.com/names.nsf/myAgent?openagent

From the agent you could access any data in the server (if you have permission to) and return a "text/html/whatever not binary" to the program requesting the URL.

Note: Lotus Domino 8.5.1, that has just been released, includes the ActiveSync protocol, so I'm not sure about the need to recreate the Notes Client in the iPhone.

salgiza
Ed Schembor
salgiza
I implement agent and according to me I think, Every User needs to install agent from their lotus Notes client and domino designer.I would have to supply Java Agent Code.So, the flow of application would be like :http://www.jminteractive.com/index.php/iphone/notes_pro_server_setup/am I right?is it possible to write an agent that implements all the functionality like Login , then get mails for session etc..And for that I should not supply the Agent code to user. and I can install my agent to domino server, which all user can access with their user name and password.Thanks....
xmax
Login will be managed by the domino server. The best thing to do would be to create the agent in an empty database in the server, and from it access the mail database of the current user.Conceptually it would be similar to the example in the link you provide, but the code would be in a single place instead of the mail database of each user.
salgiza
How will domino server manage the login?And how can I write my agent (in Empty data base file created) to read the mail database file for logged in user?iPhone client needs to give user name, password and its database file name.
xmax
Domino databases have ACLs (Access Control Lists). If you configure your database so that Anonymous users can't login, Domino automatically asks for user and password when you try to access the database. Once the user has validated against the server, he/she can access the database, and you can get the username from the session. Knowing the username, you can get the path of the mail database path from the person document in names.nsf.
salgiza
A: 

You mention contacts initially, and then you mention mail / calendar / contacts. What are you trying to achieve in your iPhone application? If you're trying to build some kind of Notes client locally, that seems crazy. There are two options out there already:

  1. Simply use iNotes (i.e. web access for Notes mail etc.) which works well in Mobile Safari or;
  2. Use the IBM Lotus Traveler product, which uses ActiveSync to use Domino mail / calendaring / contacts with the native clients on the iPhone.
Ben Poole