Using an XML ODA in Business Object Designer

This section describes how to use Business Object Designer to generate business object definitions using the XML ODA. For information on launching Business Object Designer, see the Business Object Development Guide. Business Object Designer provides a wizard, called Business Object Wizard, that guides you through each of these steps. After you launch an ODA, you must launch Business Object Designer to obtain access to Business Object Wizard (which configures and runs the ODA). There are six steps in Business Object Wizard to generate business object definitions using an ODA.

After starting the ODA, do the following to start the wizard:

  1. Open Business Object Designer.
  2. From the File menu, select the New Using ODA... submenu.

    Business Object Wizard displays the first window in the wizard, named Select Agent. Figure 44 illustrates this window.

To select, configure, and run the ODA, follow these steps:

  1. Select the ODA
  2. Specify configuration properties
  3. Expand nodes and select XML elements
  4. Confirm selection of objects
  5. Generate the business object definition and, optionally, Provide additional information
  6. Save the business object definition

Select the ODA

Figure 44 illustrates the first dialog box in Business Object Wizard's six-step wizard. From this window, select the ODA to run.

Figure 44. Selecting the ODA


To select the ODA:

  1. Click the Find Agents button to display all registered or currently running ODAs in the Located agents field. Alternatively, you can find the ODA using its host name and port number.
    Note:
    If Business Object Wizard does not locate your desired ODA, check the setup of the ODA.
  2. Select the desired ODA from the displayed list.

    Business Object Wizard displays your selection in the Agent's name field.

Specify configuration properties

The first time Business Object Wizard communicates with XML ODA, it prompts you to enter a set of ODA configuration properties as shown in Figure 45.

Figure 45. Specifyng ODA configuration properties


Configure the XML ODA properties described in Table 82.

Table 82. XML ODA configuration properties

Row number Property name Property type Description
1 FileName String Full pathname of the DTD or schema document. A DTD file must have the .dtd extension; a schema-document file must have the .xsd extension.
2 Root String

Name of the XML element that is to be treated as the root element. If no root element is specified, the XML ODA makes the following assumptions:

  • If the ODA is parsing a DTD, it treats the first XML element as the root.
  • If the ODA is parsing a schema document, it treats the first global element as the root.

3 TopLevel String Name to be used for the top-level business object that the ODA generates. The ODA prepends the top-level business object with the business-object prefix (which the BOPrefix property specifies), separated by an underscore (_). If you do not specify a top-level name, the ODA assigns the name BOPrefix_Root (where BOPrefix and Root are the values of the BOPrefix and Root properties) as the name of the top-level business object.
4 BOSelection String

A boolean value (true or false) to indicate whether the XML ODA will allow you to select the names of elements for which business object definitions are to be used.

  • If this property is set to false, the XML ODA allows the user to select only the root as the element and will generate business object definitions for the root and all of its child elements.
  • If this property is set to true, the XML ODA allows the user to select any element and will generate business object definitions only for the selected elements.

The default is false.

5 BOPrefix String Prefix that the ODA applies to the name of each business object definition for the XML document. If you do not specify a business-object prefix, the ODA does not prepend any string to the name of the business object definition.
6 DoctypeorSchemaLocation String

A boolean value (true or false) to indicate whether the XML ODA should generate attributes for:

  • When processing DTDs: the DOCTYPE tag
  • When processing schema documents: the schemaLocation and xsi attributes (in the XML Schema Instance namespace)

The default is true.

7 TraceFileName String

Full pathname of the file into which XML ODA writes trace information. If the file does not exist, XML ODA creates it in the specified directory. If the file already exists, XML ODA appends to it.

By default, the XML ODA creates a trace file named XMLODAtrace.txt in the ODA\XML subdirectory of the product directory.

Use this property to specify a different name for the trace file.

8 TraceLevel Integer Level of tracing enabled for XML ODA. Valid values are zero through five (0-5). Property defaults to a value of 5 (full tracing enabled). For more information, see "Working with error and trace message files".
9 MessageFile String

Full pathname of the error and message file. By default, the XML ODA creates a message and error file named XMLODAAgent.txt.

Important: The error and message file must be located in the ODA\messages subdirectory of the product directory.

Use this property to verify or specify an existing file.

Important:
Correct the name of the message file if the default value displayed in Business Object Designer represents a non-existent file. If the name is not correct when you move forward from this dialog box, Business Object Designer displays an error message in the window from which the ODA was launched. This message does not pop up in Business Object Designer. Failing to specify a valid message file causes the ODA to run without messages.

You can save these properties in a named profile so that you do not need to re-enter them each time you use XML ODA. For information on specifying an ODA profile, see the Business Object Development Guide.

Expand nodes and select XML elements

Business Object Designer uses the properties configured in the previous step to connect the tool to the specified XML schema (DTD or schema document). After connecting, Business Object Designer displays a tree whose nodes represent all the XML elements defined in the XML schema.

You can expand the top-level XML element to display the entire hierarchical representation. For each XML element, XML ODA creates a child business object definition.

Figure 46 illustrates this dialog box with some XML elements expanded.

Figure 46. Tree of XML elements with expanded nodes


Select all required XML elements and click Next.

Confirm selection of objects

After you identify all the XML elements to be associated with the generated business object definitions, Business Object Designer displays the dialog box with only the selected objects. Figure 47 illustrates this dialog box.

Figure 47. Confirming selection of objects


This window provides the following options:

Generate the business object definition

After you confirm the XML elements, the next dialog box informs you that Business Object Designer is generating the business object definition. If a large number of Component Interfaces has been selected, this generation step can take time.

Figure 48 illustrates this dialog box.

Figure 48. Generating the business object definitions


The XML ODA generates the name for a business object definition from the following information:

It separates each of these values with an underscore (_) character. Therefore, the name it generates has the following format:

BOPrefix_TopLevel_XMLelement

Provide additional information

Because the XML ODA needs additional information about the verbs, Business Object Designer displays the BO Properties window, which prompts you for the information. Figure 49 illustrates this dialog box.

Figure 49. Providing additional information - verbs


In the BO Properties window, enter or change the verb information. Click in the Value field and select one or more verbs from the pop-up menu. These are the verbs supported by the business object.

Note:
If a field in the BO Properties dialog box has multiple values, the field appears to be empty when the dialog box first displays. Click in the field to display a drop-down list of its values.

If your XML document has a schema document that contains an anyAttribute element, the XML ODA displays an additional BO Properties window, as shown in Figure 50.

Figure 50. Providing additional information - attribute names


In this BO Properties window, enter the names of the business object attributes you want the XML ODA to create. Separate each attribute with a semicolon (;). For more information on anyAttribute, see Supported schema-document structures.

Save the business object definition

After you provide all required information in the BO Properties dialog box and click OK, Business Object Designer displays the final dialog box in the wizard. In this dialog box, you can take any of the following actions:

For more information, and to make further modifications, see the Business Object Development Guide.

Figure 51 illustrates this dialog box.

Figure 51. Saving the business object definition


Copyright IBM Corp. 1997, 2004