When building new applications on the cloud, enterprises often need to access existing data that resides on-premises. Below is a high level description how to access data in on-premises XPages NoSQL databases from XPages applications running on IBM Bluemix.
The sample below shows how to invoke the database REST APIs (IBM Domino Access Services) from an XPages application. As an example database I used Collaboration Today that I deployed on my on-premises Domino server. The only change I had to do in this database was to enable the REST APIs in the application and view properties (see documentation).
In a new database (xpagesrestclient.nsf) I added a simple home.xsp and defined a managed bean.
The managed bean uses the Fluent API to invoke the REST APIs. I had to write a simple JSON parser to generate the list of news entry objects since the XPages Bluemix runtime currently doesn’t allow Java reflection.
Note that in this demo I only use basic authentication and the connection from the cloud to on-premises is not encrypted. You certainly should not do this for production apps.
Here is a screenshot of the result.