Configuring data handlers

Data-handler meta-objects allow a connector or Server Access Interface process (if InterChange Server if your integration broker) to instantiate a data handler based on the MIME type of an input file or the MIME type specified in a business object request. To configure a data handler, you must ensure that its meta-objects are correctly initialized and available to the calling components (a connector or an access client).

Note:
Each IBM-delivered data handler uses configuration properties that are defined in data-handler meta-objects. However, a custom data handler might or might not use meta-objects for its configuration properties. For more information, see Using data-handler meta-objects.

In support of the IBM-delivered data handlers, IBM delivers the data-handler meta-objects listed in Table 9.

Table 9. IBM-delivered data-handler meta-objects

Meta-object level Quantity Location
Top-Level


For InterChange Server One repository\edk

For connector One repository\DataHandlers
Child One for each data handler repository\DataHandlers

To configure the use of one or more data handlers for use by a caller, you must:

Top-level meta-objects

A top-level data-handler meta-object associates a MIME type with a child data-handler meta-object. The child meta-object provides configuration information, which always includes the name of the data handler class to instantiate. Therefore, a top-level meta-object associates a MIME type with a data handler. All calling components with access to a particular top-level meta-object can invoke any of the data handlers whose MIME type appears in this meta-object.

You can control which data handlers a calling component can support by grouping the appropriate MIME-type attributes in a particular top-level meta-object and having the calling component provide the name of the meta-object that contains the data handlers it needs to use. IBM delivers the following top-level data-handler meta-objects:

MO_Server_DataHandler meta-object

The Server Access Interface process uses the MO_Server_DataHandler meta-object to identify the data handlers it can use. The delivered version of MO_Server_DataHandler is not configured to support any MIME types. It includes only a single dummy attribute. You can customize this meta-object to support any data handler installed with your InterChange Server. If you want your access clients to support a MIME type, rename the dummy attribute in the top-level MO_Server_DataHandler meta-object to the name of the supported MIME type and provide the associated child meta-object for that MIME type.

For example, to provide access clients with support for the text_xml MIME type, rename the dummy attribute to text_xml and provide the name of the MIME type's associated child meta-object as the attribute's type. This child meta-object configures the XML data handler. Figure 9 illustrates a MO_Server_DataHandler meta-object that contains one attribute, text_xml, which represents the MO_DataHandler_DefaultXMLConfig child meta-object.

Figure 9. MO_Server_DataHandler meta-object

If you want your access clients to support additional MIME types, define a new attribute in the top-level MO_Server_DataHandler meta-object for each MIME type and provide the associated child meta-object for that MIME type. If you are invoking more than one data handler, you must define a child meta-object for each data handler instance. To provide support for an additional MIME type, you can either:

Note:
The name of the top-level server meta-object for data handlers must be the default name of MO_Server_DataHandler, but you can configure the top-level meta-object to contain any number of child meta-objects.

MO_DataHandler_Default meta-object

By default, a connector uses the MO_DataHandler_Default meta-object to identify the data handlers it can use. The delivered version of MO_DataHandler_Default is configured to support the MIME types of all IBM-delivered data handlers (including some adapter-specific data handlers that are not covered in this document).

If you want your connector to support different MIME types, you must ensure that an attribute exists in the MO_DataHandler_Default meta-object for each MIME type that you want the connector to support. This attribute must specify the appropriate MIME type and represent the associated child meta-object for that MIME type. To provide support for an additional MIME type, you can define your own custom MIME type and child meta-object, as long as you have a data handler that supports it. For more information, see "Modifying the top-level meta-object".

Note:
You can change the name of the top-level meta-object for connectors to correspond to a particular connector, or even a particular business object or a particular type of file that the connector needs to process. Whatever object you use, however, must be supported by the connector definition, so if you use a different top-level object you must configure the connector definition to support it. For more information, see Configuring a connector to use data handlers.

Figure 10 shows a top-level data-handler meta-object for connectors that defines two data handlers: XML and NameValue.

Figure 10. Example meta-object for two different data handlers

Note:
For a connector to be able to access a data handler, the top-level data-handler meta-object must be on the list of supported objects for the connector. Otherwise, the connector cannot load the meta-object at startup.

Child meta-objects

A child data-handler meta-object is a flat business object that contains configuration information to initialize a data handler. Different types of data handlers have different configuration requirements, so child meta-objects have different attributes. This configuration information customizes the behavior of the data handler instance. Therefore, a set of attribute values in a child meta-object defines a specific configuration, which in turn is associated with a particular data handler behavior. All callers that access a particular child meta-object invoke the behavior of the associated data handler that the configuration information defines.

IBM delivers a child data-handler meta-object for each of the data handlers it delivers, as Table 10 shows .

Table 10. Child data-handler meta-objects

Child meta-object For more information
MO_DataHandler_DefaultXMLConfig Configuring the XML data handler
MO_DataHandler_DefaultEDIConfig Configuring the EDI data handler
MO_DataHandler_DefaultFixedWidthConfig Configuring the FixedWidth data handler
MO_DataHandler_DefaultDelimitedConfig Configuring the Delimited data handler
MO_DataHandler_DefaultNameValueConfig Configuring the NameValue data handler
MO_DataHandler_DefaultRequestResponseConfig Configuring the Request-Response data handler

Copyright IBM Corp. 1997, 2003