B.1 Overview

If the application you are using with the REST driver uses non-XML data that is not supported by the REST driver, you can create Java extensions to convert the non-XML data to the JSON format supported by the REST driver.

As illustrated in Figure B-1, there are five points where functionality can be extended:

  • Two in the Subscriber channel

  • Two in the Publisher channel

  • One to report the application schema

Figure B-1 Using Java to Extend Functionality

The REST driver is designed to be flexible and extensible. For the Java programmer who wants to extend or modify the capabilities of the driver, there are programming interfaces that can be used for this purpose. These interfaces should be used only when you need to do transformations that cannot be done in policies or style sheets.

The Javadoc describes these interfaces.

There are two Java interfaces that can be used to extend or customize the driver behavior. They are DocumentModifiers and SchemaReporter.

DocumentModifiers is used to access and to modify the commands and events passing through the driver shim, if this is desired. DocumentModifiers gives you access to the data as XML DOM documents.

The other interface, SchemaReporter, can be used if you have a way of programatically determining the classes and attributes used by the remote Web service. The advantage to this is that creating schema mapping rules is easier if the schema can be dynamically determined.