IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Message sets: Importing from XML Schemas to create message definitions

You can populate a message set with message definitions by importing XML Schema files, by using the New Message Definition File From XML Schema file wizard, the Start from WSDL and/or XSD files quick start wizard, or the mqsicreatemsgdefs command-line utility.

Tip: This topic is relevant only if you are using a message set to contain your message models. If you are using an application or library, you can use one of the following methods to import XML schema files:

Each XML Schema file that you import results in a new message definition file within the message set. The root name of the message definition file defaults to the root name of the XML Schema file, but the New Message Definition File From XML Schema file wizard allows you to choose a different root file name.

If the message definition file already exists, you must have enabled overwriting to occur for the import to proceed, in which case the existing content is deleted and re-created.

The namespace to which the message definition file created belongs depends on whether namespaces have been enabled for the message set.

A report file is created during the import operation. This is located by default in the log folder of the message set. By default it takes the name of the message definition file, with .report.txt appended.

Import by using the New Message Definition File From XML Schema file wizard

When you import by using the New Message Definition File From XML Schema file wizard, you can specify which of the global elements or global complex types within the imported XML Schema file are to be messages within the message definition file.

You can import only one XML Schema file with each import operation. If your XML Schema file references other XML Schema files, with import or include elements, these XML Schema files must be imported into the same message set by using a separate import operation.

Import by using the command-line

When you import by using the command line you have the option of either creating no messages or creating a message for each global element and global complex type within the imported XML Schema file. The import operation creates a message and corresponding global element in the message definition file for each global element you specify. If you do not specify that messages are to be created, you must create them manually using the message definition editor after the import has completed.

You can import several XML Schema files in each import operation.

Physical information

In addition to creating logical information, the import can also create physical information. If the message set contains any XML wire format physical formats, the physical format properties for all XML Wire Format layers is populated. If the message set does not contain any XML physical formats, only logical information is created. Also, if you import from the command line, only logical information is created in the new message set by default. If you want physical information created as well, see Message Sets: Importing from the command line for details.

MRM CWF and TDS physical format properties are not populated and so take default values.

If you have one or more CWF or TDS layers, the import can cause entries in the task list, warning you that certain CWF or TDS properties must be set if the XML structures you have imported are to appear in a CWF or TDS message.

If the CWF or TDS physical formats are not applicable to your XML structures, you can ignore these task list entries because they are just warnings, they do not prevent your model being generated in another form; for example, as a message dictionary.

Command-line invocation

The mqsicreatemsgdefs command-line utility allows you to import several XML Schema files in a single operation. All the XML Schema files must be in single directory, and the directory location must be passed as a parameter to the utility.

When you import into a message set for which namespaces are not enabled, the action to take for unsupported constructs can be specified by using an XML options file. This must contain an XML element called <XSD_NO_NS> that holds a set of information that applies to all XML Schema files that are imported during an invocation of the utility. A default XML options file, called mqsicreatemsgdefs.xml, is supplied. If you want to apply different sets of information to different XML Schema files, you must create multiple XML files and run the utility multiple times.

When you are importing into a message set for which namespaces are not enabled, there are two other options that you can specify in the <XSD_NO_NS> element in the XML options file:

The mqsicreatemsgdefs utility also allows you to create a message set into which the message definition files are placed, as part of the import operation. You can also choose to base the message set created on an existing message set. This facility enables you to prepare an empty message set that contains an XML physical format and pre-populated message set level XML properties, which are then copied into the message set that is created by the import.

Further information about XML Schema

For details about XML Schema, see XML Schema Part 0: Primer on the World Wide Web Consortium (W3C) website.


ad00834_.htm | Last updated Friday, 21 July 2017