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).
In support of the IBM-delivered data handlers, IBM delivers the
data-handler meta-objects listed in Table 8.
Table 8. 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:
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:
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:
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".
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
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.
For example:
IBM recommends that you name the child meta-objects with a unique MIME type/subtype combination:
text_MIMEtype_subtype
where:
For example, if all connectors can support both the default XML data handler and an SGML version, you can create the following MIME types: text_xml and text_xml_sgml. Keep in mind that MIME-type names can only contain alphanumeric characters and the special characters of period (.) and underscore (_).
IBM delivers a child data-handler meta-object for each of the data handlers
it delivers, as Table 9 shows
.
Table 9. 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 |