The Request-Response data handler retrieves its configuration properties from a hierarchy of meta-objects, as follows:
The MIME type contained in the parent meta-object indicates which MIME types are supported and which data handlers provide this support. Neither of the provided top-level meta-object include an entry for the Request-Response data handler. To enable your connector or an access client to use the Request-Response data handler, you must add an attribute for the text/requestresponse MIME type to the MO_Server_DataHandler or MO_DataHandler_Default top-level meta-object. This attribute must be of type MO_DataHandler_DefaultRequestResponseConfig.
The following fragment of a business object definition shows the definition for the text/requestresponse attribute:
[Attribute] Name = text.requestresponse Type = MO_DataHandler_DefaultRequestResponseConfig ContainedObjectVersion = 1.0.0 Relationship = Containment Cardinality = 1 MaxLength = 1 IsKey = false IsForeignKey = false IsRequired = false IsRequiredServerBound = false [End]
To configure a Request-Response data handler, you must ensure that its configuration information is provided in the Request-Response's child meta-object.
For the Request-Response data handler, IBM delivers the default child
meta-object
MO_DataHandler_DefaultRequestResponseConfig. Each attribute
in this meta-object defines a configuration property for the Request-Response
data handler. Table 55 describes the attributes in this child meta-object.
Table 55. Child meta-object attributes for the Request-Response data handler
Attribute name | Description | Delivered default value |
---|---|---|
BOPrefix | Prefix used by the default NameHandler class to build the name of the top-level business object. The default value must be changed to match the name of the associated the business object definition. The attribute value is case-sensitive. | REQUESTTEST |
ClassName
| Name of the data-handler class to load for use with the specified MIME type. The top-level data-handler meta-object must has an attribute whose name matches the specified MIME type and whose type is the Request-Response child meta-object (described by this table). | com.crossworlds. DataHandlers.text. requestresponse |
NameHandlerClass | Name of the name-handler class to use to determine the name of the top-level business object from the content of a request document. Change the default value of this attribute if you create your own custom name handler. For more information, see Building a custom XML name handler. | com. crossworlds. DataHandlers.xml. TopElementNameHandler |
RequestDataHandlerMimeType | The MIME type of requests processed by this data handler. The Request-Response data handler uses this MIME type to determine the data handler to instantiate for processing any request business objects or documents. | text/xml |
ResponseDataHandlerMimeType | The MIME type of responses processed by this data handler. The Request-Response data handler uses this MIME type to determine the data handler to instantiate for processing any response business objects or documents. | text/xml |
ObjectEventId | Placeholder not used by the data handler but required by the business integration system. | None |
The "Delivered default value" column in Table 55 lists the value in the Default Value property for the corresponding attribute in the delivered business object. You must examine your environment and set the Default Value properties of those attributes to the appropriate values. You must make sure that at least the ClassName and BOPrefix attributes have default values.
To create the MO_DataHandler_DefaultRequestResponseConfig child meta-object, use Business Object Designer to create a business object definition with the following format:
[BusinessObjectDefinition] Name = MO_DataHandler_DefaultRequestResponseConfig Version = 1.0.0
[Attribute] Name = ClassName Type = String Cardinality = 1 MaxLength = 255 IsKey = false IsForeignKey = false IsRequired = false DefaultValue = com.crossworlds.DataHandlers.text.requestresponse IsRequiredServerBound = false [End]
[Attribute] Name = NameHandlerClass Type = String MaxLength = 255 IsKey = false IsForeignKey = false IsRequired = false IsRequiredServerBound = false [End]
[Attribute] Name = RequestDataHandlerMimeType Type = String MaxLength = 255 IsKey = false IsForeignKey = false IsRequired = false DefaultValue = text/xml IsRequiredServerBound = false [End]
[Attribute] Name = ResponseDataHandlerMimeType Type = String MaxLength = 255 IsKey = false IsForeignKey = false IsRequired = false DefaultValue = text/xml IsRequiredServerBound = false [End]
[Attribute] Name = BOPrefix Type = String MaxLength = 255 IsKey = false IsForeignKey = false IsRequired = false DefaultValue = Wrapper IsRequiredServerBound = false [End]
[Attribute] Name = DummyKey Type = String MaxLength = 1 IsKey = true IsForeignKey = false IsRequired = false DefaultValue = 1 IsRequiredServerBound = false [End]
[Attribute] Name = ObjectEventId Type = String Cardinality = 1 MaxLength = 255 IsKey = false IsForeignKey = false IsRequired = false IsRequiredServerBound = false [End]
[Verb] Name = Create [End]
[Verb] Name = Delete [End]
[Verb] Name = Retrieve [End]
[Verb] Name = Update [End] [End]
Refer to Configuring data handlers for information on where to put this child meta-object file.