Universal Web Service Gateway for Domino
[We are Beta...posted January 27, 2010]
In a recent posting on our FlexDomino blog I was asking whether IBM should provide a native web service or RPC based interface to its native functions, to then briefly talk about our attempts to implement a universal web service interface to the Domino server (see also this presentation).
Well, far from being ready, we have managed to implement a good set of Domino web service functions, combined with some Flex classes which provide for the basic needs to develop views (data grids) and forms in Flex accessing Domino databases.
The current functionality includes a Notes database containing the web service and two wrapper classes in Flex. The first class is a web service wrapper class, that provides access to the Domino web services and converts the results (returned data) into the required data structures in Flex (mainly multi-dimensional Arrays and or ArrayCollections). The second class provides workflow capabilities for Flex forms that utilise the web service wrapper class to e.g. save changes of an edited document back to the Domino server and update the underlying data grid (if there is one).
The demo shows the already demoed Book Catalog sample. However, there are fundamental differences:
- Opening a document from the data grid for viewing or editing will load the document data through another web service call (rather then just editing the data available in the grid columns). And the web service function to load document fields is not limited to fields, but allows Notes Formula (read only) and reference to the NotesDocument.ColumnValues property too.
- Changes to a document do not require a re-load of the entire data-set in the grid, but rather a re-load of the effected row only, which results in quite a performance difference. The re-load of the effected row as such is required, as the data showing in view columns can be based on formula, and hence view column data and document field data might not match up.
- The entire workflow of editing a document is controlled by the form wrapper class. A single method call opens a Notes document in the Flex form and takes care of all required updates; still allowing for custom listeners (the equivalent of the Notes form events).
- Data type conversion is handled by the Domino web services. Similar to Notes UI documents, which besides data formatting and input validations, basically only know text fields, the provided web services deliver text data only. The appropriate data conversion takes place on the server on loading and saving a document.
- The Flex WebService.RemoteCredentials property does not work with Domino web services; for which reason authentication is not possible over a cross domain situation or if the flash file is not loaded from the Domino server, which data is to be accessed. It is an issue in Flex 3 SDK and still is (in the now called) Flash 4 SDK. We have solved this problem.
Replies
Tried the new demo using flash player 10 and flash player 9 and got the same error.
ReferenceError: Error #1069: Property DBCOLUMNXReturn not found on String and there is no default value.
at packages.dominoUtilities::dominoDBUtilities/dbcolumnx_result()[D:\Flex\Flex Builder 3\DominoUtilitiesExtendedSWC\src\packages\dominoUtilities\dominoDBUtilities.as:885]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractOperation.as:198]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:193]
at mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:43]
at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
at DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:403]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()