Archive for June, 2014

Yes, I’m late to the party, however…..

I’m finally beginning to create Domino Web Service providers.  (If you’re not family with the IBM Lotus Notes/Domino environment, you need read no further.)

I have located several good reference pages by Julian Rubichaux, but still felt like there was some information missing that I couldn’t seem to locate, so I began a series of experiments.

As a result, I’ve begun compiling a summary of thoughts and standards for my environment, some of which I’ll mention here.

Don’t put any code in your web service. Instead, have your web service class inherit from a class defined in a script library. This class in turn inherits many standard elements from a base class in another script library.  While it means you have to go through a couple of extra steps to refresh the service, it means you are able to employ code reuse on a massive scale.  It also means you get better “Intellisense” capability (or whatever IBM calls it).

Define standard classes for your common return values, especially arrays, lists, date/time things, and NotesDocuments, and include them in the base class mentioned a moment ago.

Develop and use a standard error handling approach for all errors. In my case, I leverage Julian’s OpenLog.NSF tool for capturing errors internally, but return a generic error to the web service so as to hide any details about our underlying data structures. I have augmented Julian’s code so that it generates a “cascading log” entry, similar to a stack trace, that shows the call history of the problem area. This helps me debug the problem in my code.

Give serious thought to security. I’m still trying to figure out how to pass Domino credentials into a web service, but I’ve come up with a fairly robust work-around in the meantime. Perhaps I’ll describe it another time, but since it relates to security, maybe not right away!

There’s a lot more that I still need to explore and develop.  I’ll update this entry as time allows.

Note: my environment uses Domino version 8.5.3 but I think these guidelines are generic enough that you can use them from version 7.0.1 on.

Recommended free tool to use when testing Web Services: SoapUI.  It saves you from having to debug two halves of the web service puzzle at the same time.

No comments