Oracle® Fusion Middleware Developer's Guide for Oracle Service Bus 11g Release 1 (11.1.1.6.0) Part Number E15866-04 |
|
|
PDF · Mobi · ePub |
This chapter describes how to import metadata into Format Builder.
Format Builder includes the following utilities that allow you to import COBOL copybooks, gXML guideline files, and convert a C structure definition into MFL Message Definition.
Format Builder includes a feature that allows you to import a guideline XML (gXML) file and convert it into a message definition, which you can modify and customize to suit your needs. gXML is an open specification designed to facilitate exchange of e-commerce guidelines for business documents (like purchase orders, invoices and so on) using XML. gXML version 0.71 is supported in this release.
To import a gXML file:
Choose Tools > Import > EDI Importer. The EDI Importer dialog displays.
Enter data in the fields as described in the following table:
Table 16-1 EDI Importer Options
Field | Description |
---|---|
gXML File Name |
Type the complete path and name of the gXML file that you want to import. |
Browse |
Click to navigate to the location of the gXML file you want to import. |
OK Button |
Imports the gXML file you specified. |
Cancel Button |
Closes the dialog and returns to Format Builder without importing. |
About Button |
Displays information about the EDI Importer including the version. |
Format Builder includes a feature that allows you to import an XML Schema representing the desired XML representation of your non-XML document. This can provide you with a jump-start on specifying the format of your non-XML document.
To import an XML schema:
Choose Tools > Import > XML Schema Importer. The XML Schema Importer dialog displays.
Enter data in the fields as described in the following table:
Table 16-2 XML Schema Importer Options
Field | Description |
---|---|
XML Schema Definition |
Type the path and name of the file you want to import. |
Browse |
Click to navigate to the location of the file you want to import. |
Root Element |
This value will be used as the root element in the transformed XML document. This name must comply with XML element naming conventions |
MFL Field Delimiter Default |
A delimiter is a character that marks the end of the field. The field data continues until the field containing the delimiter character is encountered. |
OK Button |
Imports the XML Schema using the settings you defined. |
Cancel Button |
Closes the dialog and returns to Format Builder without importing. |
Format Builder includes a feature that allows you to import a COBOL copybook into Format Builder and create a message definition to transform the COBOL data. When importing a copybook, comments are used to document the imported copybook and the Groups and Fields it contains.
To import a COBOL copybook:
Choose Tools > Import > COBOL Copybook Importer. The COBOL Copybook Importer dialog displays.
Enter data in the fields as described in the following tables:
Table 16-3 COBOL Copybook Importer Options
Field | Description |
---|---|
File Name |
Type the path and name of the file you want to import. |
Browse |
Click to navigate to the location of the file you want to import. |
Table 16-4 COBOL Copybook Importer Options – Byte Order
Field | Description |
---|---|
Big Endian |
Select this option to set the byte order to Big Endian. Note: This option is used for IBM 370, Motorola, and most RISC designs (IBM mainframes and most Unix platforms). |
Little Endian |
Select this option to set the byte order to Little Endian. Note: This option is used for Intel, VAX, and Unisys processors (Windows, VMS, Digital, Unix, and Unisys). |
Table 16-5 COBOL Copybook Importer Options – Character Set
Field | Description |
---|---|
EBCDIC |
Select this option to set the character set to EBCDIC. Note: These values are attributes of the originating host machine. |
US-ASCII |
Select this option to set the character set to US-ASCII. Note: These values are attributes of the originating host machine. |
Other |
The character encoding of the field data. |
Table 16-6 COBOL Copybook Importer Options – Action Buttons
Field | Description |
---|---|
OK |
Imports the COBOL Copybook using the settings you defined. |
Cancel |
Closes the dialog and returns to Format Builder without importing. |
About |
Displays information about the COBOL Copybook importer including version and supported copybook features. |
Once you have imported a copybook, you may work with it as you would any message format definition. If an error or unsupported data type is encountered in the copybook, a message is displayed informing you of the error. You can choose to display the error or save the error to a log file for future reference.
Format Builder includes a C structure importer utility that converts a C structure definition into an MFL Message Definition by generating MFL or C Code output.
To start the C Structure Importer:
From the Format Builder main window, choose Tools > Import > C Struct Importer. The C Structure Importer dialog displays.
The C Structure Importer dialog opens with MFL specified as the default output and contains the following fields.
Table 16-7 C Structure Importer Options – Input
Field | Description |
---|---|
Input File |
Enter the path and name of the file you want to import. You can also click the Browse button to navigate to the file you want to import. |
Structure |
This list box is populated with the list of structures found in the input file after it is parsed.The list box is empty if the input file is not parsed. |
Parse |
Click Parse to parse the input file. If successful, the Structure list box is populated with the list of structures found in the input file. |
Table 16-8 C Structure Importer Options – Output
Field | Description |
---|---|
Name |
Specify an existing profile either by entering the file name or using the Browse button. |
MFL |
Specifies the data must be compiled on the target machine to generate MFL. |
C Code |
Specifies the data must be compiled on the target machine to generate C code. |
Perform the following steps to generate MFL data:
Enter a file name in the Input File field, or click Browse to select a file.
Click Parse to parse the file.
Upon completion, the Structure list box is populated with the list of structures found in the input file.
Select the desired structure from the Structure list box.
At this point, you must provide some profile configuration data to generate the MFL directly. You can do this by creating a new hardware profile, or specifying an existing profile.
Specify an existing profile or create a new one by performing one of the following procedures.
Specify an existing profile either by entering the file name in the Hardware Profile Name field, or click Browse to select a file. Click Edit to open the hardware profile editor if you need to view or edit the profile parameters.
Click New to create a new hardware profile. This opens the Hardware Profile editor loaded with the default parameters. Specify a Profile Name, a description, and modify the primitive data types and byte order to suit your needs.
Click OK to save your hardware profile changes and return to the C Structure Importer dialog.
Click OK to generate your MFL. If the generation is successful, you are returned to Format Builder with an MFL object listed in the navigation tree. The MFL object reflects the same name as the input file used in the parse operation.
If errors are detected during the generation process, the MFL Generation Errors dialog displays providing you the opportunity to view or file the error log.
Click Display Error Log to view any errors encountered, click Save Error Log to save the error log to the location of your choice, or click Cancel to dismiss the MFL Generation Errors dialog box.
Once you have determined what errors were generated, you can return to the C Structure Importer and repeat the prior steps.
Perform the following steps to generate C code.
Enter a file name in the Input File field, or click Browse to select a file.
Click Parse to parse the file.
Upon completion, the Structure list box is populated with the list of structures found in the input file.
Select the desired structure from the Structure list box.
Select the C Code option button.
Enter a file name in either the MFL Gen or Data Gen fields, or click Browse to select a file.
Click OK. You will be warned about overwriting existing files and notified about the success or failure of the code generation.
Copy the generated source code to the platform in question and compile and execute it.
Note:
You must copy the input file containing the structure declarations as well. Both programs, when compiled, take an argument of the output file name.Copy the generated MFL or data back to the platform running Format Builder.
The FML Field Table Class Importer facilitates the integration of WebLogic Tuxedo Connector and business process management (BPM) functionality. Tuxedo application buffers are translated to and from XML by the FML to XML Translator that is a feature of WebLogic Tuxedo Connector.
The integration of Tuxedo with BPM functionality requires the creation of the XML that is passed between the WebLogic Tuxedo Connector Translator and the process engine. To create the necessary XML, use the FML Field Table Class Importer and the XML generation feature of Format Tester.
Before starting Format Builder:
Move the field tables associated with the FML buffer from the Tuxedo system to the Oracle WebLogic Server/WebLogic Tuxedo Connector environment.
Use the weblogic/wtc/jatmi/mkfldclass
utility to build Java source code representing the field tables. For information about FML Field Table Administration, see the Oracle WebLogic Server documentation.
Compile the source code. The resulting class files are called fldtbl
classes because they implement the FldTbl
interface. These class must be packaged in a JAR file that can be selected from the FML Field Table Class Importer dialog.
The WLI_HOME\samples\di\fml
directory contains several fldtbl
class fields that you can use as samples. These samples allow you to start Format Builder without having to completing the previous three steps.
Note:
Because most users perform these steps when configuring WebLogic Tuxedo Connector, these class files may already exist.The following table provides a listing and descriptions of the sample files installed for the FML Field Table Class Importer. All files are in the WLI_HOME\samples\di\fml
directory.
Table 16-9 FML Field Table Class Sample Files
Field | Description |
---|---|
bankflds.class |
Compiled source file that serves as input to the FML Field Table Class Importer |
bankflds.java |
|
crdtflds.class |
Compiled source file that serves as input to the FML Field Table Class Importer |
crdtflds.java |
|
tBtest1flds32.class |
Compiled source file that serves as input to the FML Field Table Class Importer |
tBtest1flds32.java |
|
Note:
If you create Java classes using WebLogic Tuxedo Connector, you can place the.class
files in the \ext
directory. You can then populate the Available Fields list automatically from the FML Field Table Class Importer dialog box.To create an XML document with the FML Field Table Class Importer:
Choose Tools > Import > EDI Importer. The FML Field Table Class Importer dialog displays.
Enter data in the fields as described in the following table:
Table 16-10 FML Field Table Class Importer Options
Field | Description |
---|---|
Fld Table Jar File |
Click Select to select the JAR file containing the fldtbl classes. After selecting the JAR file, all fldtbl classes are displayed in the Classes list. If the selected JAR file contains no fldtbl classes, an error message is displayed and the Fld Table Jar File and Classes fields are cleared. The Classes section contains a list of all fldtbl classes for the currently selected JAR file. Because a single FML buffer may contain fields from several field tables, you can select one or more fldtbl class names in the list. All the fields in the selected classes are displayed in the Available Fields list. |
Table 16-11 FML Field Table Class Importer Options – FML Field Selector
Field | Description |
---|---|
Available Fields |
Displays the list of names from the field tables. Select the desired fields from the Available Fields list and click Add. The Available Fields list does not allow duplicate names. Even if the name of a field appears in different field tables, it is included only once in the list. |
Selected Fields |
Displays the list of selected fields. To remove fields from this list, select the fields and click Remove. |
Table 16-12 FML Field Table Class Importer Options – Action Buttons
Field | Description |
---|---|
Add |
Moves the selected field from the list of Fields Available, to the Selected Fields list. |
Remove |
Removes the selected field from the list of Selected Fields, to the Fields Available list. |
OK |
Click OK after completing the list of selected fields. The dialog box closes and the name of the generated MFL is added to the Format Builder navigation tree. The selected fields are listed in the order in which they appear in the Selected Fields list. |
Cancel |
Closes the dialog and returns to Format Builder without importing. |
Edit the created MFL document to specify the order and number of occurrences of the fields in the XML document to be passed to the WebLogic Tuxedo Connector FML/XML Translator from business process management (BMP).
Choose Tools > Test to display the Format Tester tool.
From the Format Tester menu bar, choose Generate > XML to create an XML document that conforms to the MFL document in Format Builder.
Edit the data content of the fields in the XML document as desired.
From the Format Tester menu bar, choose File > Save XML to save the XML document in a file with a specified name and location.
The created XML can be imported and used in business process management functions by using the XML instance editor. For information about importing XML, see the BPM documentation.