Importing from XML schema

Before you start:

To complete this task, you must have completed the following tasks:

Also, before you begin this task you should note the following points:

Start of changeNote that the extension to the file must be .xsd in lower case.End of change

The following steps cover creating a completely new message definition file and also overwriting the contents of an existing file.

To create a message definition from an XML schema file:

  1. Switch to the Broker Application Development perspective.
  2. Open the New Message Definition File wizard by clicking File > New > Message Definition File on the workbench menu. Alternatively, you can open the wizard by right-clicking an *.xsd file previously imported into the workbench and clicking New > Message Definition File on the menu.
  3. In the displayed list of options, click XML schema file to select it then click Next.
  4. In the displayed list of workbench files, click the XML schema file that you want to import then click Next. If you opened the wizard as described in step 3 above, the *.xsd file that you right-clicked is already selected when the next page appears.
  5. In the list of message sets shown under Message sets, click the target message set for the message definition file that you are creating. The Message definition file name field is automatically filled in with a default file name based on the name of the file you are importing. If required, you can change the name of the displayed default file name to a new name of your choice.
  6. Optional: If you want to replace the contents of an existing message definition file:
    1. Type the name of the existing file in the Message definition file name field.
    2. Select the Overwrite the existing file contents without warning check box. The existing file is overwritten without a warning being displayed.
  7. Click Next. Your XML schema is validated.
  8. Optional: In the displayed list of global elements, select the check boxes for the global elements (based on global complex types) from which you want to create messages. Use the Select All and Deselect All buttons to select all global elements in the list or no global elements in the list.
    Tip: Only global elements based on global complex types are visible. Any other global elements are not visible.
  9. Optional: If the target message set for the message definition file you are creating does not have namespace support enabled, you have the option of clicking Next. This presents you with a window that allows you to add additional namespaces.
  10. Click Finish. The message definition file is created from the XML schema and is opened in the Message Definition editor.
  11. When you have completed the XML schema import using the wizard, carefully check for any errors in the report that is created when the file is imported. You can find this report in the log directory within the project containing the message definition that you have attempted to create. The report has a *.xsd.report.txt file extension, prefixed with the name that you specified for the new message definition file.

After importing XML schema files, review the messages shown in the workbench task list to check whether any new warnings or errors have appeared. Examples of situations where messages appear are listed below:

Related concepts
Ways to create message definitions
Import from other model representations to create message definitions
Message sets with namespaces disabled
Namespaces
XML Schema
Schema restrictions

Related tasks
Working with a message set project
Importing from the command line
Configuring message set preferences
Deleting objects

Related reference
Import formats
Message set preferences
XML Schema Importer