IBM WebSphere Multichannel Bank Transformation Toolkit, Version 7.1
Creating a JXFS Service
About this task
The following section describes how to create a JXFS Service instance
using the JXFS Check Reader Service as an example.
To create a JXFS Service,
do the following:
Procedure
Create a class by extending JXFSService, which in turn extends
the Service class. The Service class provides the ability to define
parameters externally in an XML file, the ability to integrate with other
components, especially with context data, and generate events in addition
to JavaBean events. Services are placed in a given context and can use formats
to access context data.
In the new JXFS Service class, create variables to hold the attributes
of the service. For example, the JXFS Check Reader service has
the following attributes:
Simple check reader:
String checkData; // Data read from a check
Byte [] checkImage; // Image of a check
Complex check reader:
Boolean stampFront; // To stamp the front of the check
Boolean stampBack; // To stamp the back of the check
Boolean endorseFront; // To endorse the front
Boolean endorseBack; // To endorse the back
Int stampX; // The horizontal position for stamping
Int stampY; // The vertical position for stamping
Int pocket; // The destination pocket
String encodeData; // The data to be encoded
String encodeFont; // The font to be used when encoding
String endorseFont; // The data for endorsement
Create getters and setters for the new attributes. A
simple check reader, for example, can only read information so it is not necessary
to set many attributes. A complex check reader can do more than read, so you
need to implement the getters and setters.
Override the initializeFrom(Tag) method.
Define the service in the service definition file and externalize
the attributes such as simple check reader getImage attribute or all of the
complex check reader attributes in the definition.
In the new class, override the toString() method.
Define the tagName - className relationship in the services section
of the configuration file (dse.ini) as follows: