Wow! SmartNSF (BETA-5) can now call java directly, and work with the parameters with ease!

Tags: Lotus Domino Java SmartNSF

This evening it was time to test the latest and greatest version of SmartNSF – BETA 5. When you have installed it (via an updatesite database for the server) and via a local update site in your Designer, you get some cool new features. First of all, intellisense seems to work very good so now it is much easier to get the available methods etc.

But, the really cool feature in this version is the support for CUSTOM strategies. This means that you can define a route like this (the example below is directly from the discussion.nsf sample database enclosed in the SmartNSF zip);


The URI infos will call the Info-class in the package org.opennrf.smartnsf. This means that an URL like  http://www.vcode.no/test/discussion.nsf/xsp/.xrest/infos (note; URL is shown just for illustration purposes, and is not active) will call the java code shown below;


(Click on image to enlarge)


What!!! Notes 10 is coming 2018!

Tags: Lotus Notes

What a fantastic twist!! While IBM has done a fairly good job with Domino over the years, the Notes client has been left somewhat in the void. But head over to this announcement and see for yourself!


Bark-bark!! The LotusScript CWebContentConsumer now support REST Service POSTs with files++

Tags: LotusScript Java

A couple of days ago I wrote the blog-post Teach the old dog some new tricks: Let LotusScript consume REST Services the easy way. I thank you all for the good feedback! Nice to see that some old school, classic Notes development, still got some traction Smile

Well, I was in the spirit to add some features today too!

First and foremost you now have the ability to add a payload to the PostJson, PostXML and PostHTML. By payload I mean a text string of any kind, but typically a JSON or XML. In a way you can think of it as a way of uploading a file or text together with other request headers or URL parameters.

This means that code like this;


… results in this;


Note that the payload isn't tagged a a proper multipart MIME or anything, but perhaps you can add that yourself with a combination of the new support methods for base64 encoding and decoding? You now have these additional methods;

  • EncodeStringAsBase64. Encode a string as base64. Build your own multipart XML or MIME structure, and combine that with one or more AddRequestHeaders? Or stuff the base64-encoded string as a payload directly with SetPayload.
  • EncodeFileAsBase64. Encode a whole file as base64. Remember that this hasn't been tested on huge files or anything Smile
  • DecodeBase64String. Decode a base64-encoded string back to it's textual form.
  • DecodeBase64StringToFile. Finally decode a base64-encoded string directly into a file on your disk.

I also added DownloadFileFromURL which can download any file from the specified URL and store it on disk as a file.

The demo-agents in the downloadable sample-database has been updated to use SetPayload, and the other methods are now demoed in a third agent with the name "Test Support Methods".

Happy coding!


Teach the old dog some new tricks: Let LotusScript consume REST Services the easy way

Tags: LotusScript Java

This article shows you how to consume REST Services in LotusScript like this:


You can both GET and POST with the classes.

Behind the scenes this is accomplished with two script libraries. One back-end worker class made with Java (class:CWebContentConsumerJava) which does all the heavy lifting, and a LotusScript wrapper class (class:CWebContentConsumer) which uses the LotusScript-to-Java bridge LS2J to interface the back-end java directly.

Click on “Read more” to read the details.