Accessing On-Premises Data from XPages Applications on Bluemix

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.

The key component to make all of this work is the Secure Gateway service. To find out more read this blog and the blogs from Mark Roden.

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.

Leave a Reply