Generating Telcordia business objects based on schema documents

If you are creating request and response business objects based on an XML schema document, you must create a business object definition for each type of XML document to be processed. The business object definition contains structure information that is contained in the XML document's schema. For example, if there is one request stream (a single schema document), but four possible response stream types (four separate schema documents), you must define five business object definitions. On the other hand, if the request and response stream use the same schema, you need only one business object definition. You can use the XML Object Discovery Agent (ODA) to generate business object definitions based on schema documents.

For information about how to define business object definitions for XML documents, either using the XML ODA or manually, see the Data Handler Guide.

ODA limitation

The XML ODA does not support schemas that include multiple files for element definitions with similar names. Accordingly, the XML ODA will not correctly generate IBM WebSphere business object definitions for such schemas. To work around this problem:

  1. Identify elements that are being used in multiple included files with different definitions for the same name.
  2. Rename the element name in one of the included file by appending "1" at the end of the name and save the modified file.
  3. Use XML ODA to generate CW Business Object definition for the schema and save the file to a .in file.
  4. Open the .in file and replace the element name back to the original name by removing all "1"s and re-save the .in file.
  5. Load in the business object definition file into your repository and things should work now.

For example, schema file BilingOrderCompletionContract.xsd, includes two files, CRS.xsd and ORDERINP.xsd. And ORDERINP.xsd includes DELV.xsd which also includes DELVTAGS.xsd. The workaround for this example is as follows:

  1. Identify element definitions with similar names: both CRS.xsd and DELVTAGS.xsd have an element called SLOT
  2. Rename element SLOT to SLOT1 in CRS.xsd and save the file.
  3. Use the XML ODA to generate business object definition for BillingOrderCompletionContract schema and save the definition to BillingContract.in.
  4. Open BillingContract.in in a word processing application, replace SLOT1 with SLOT, and re-save the file.
  5. Repos_Copy BillingContract.in into your repository.

Note:
With release 2.3 of the adapter for Telcordia, the XML ODA cannot automatically select a key attribute for the top-level business object. For business objects at all other levels, the XML ODA sets the first attribute as the key. Accordingly, when you save XML ODA-generated objects in Business Object Designer, an error message informs you that the top-level object is missing a key attribute. Assign a key attribute that reflects your business data and business object requirements, then re-save the objects.

Copyright IBM Corp. 1997, 2003