Before you begin
Tip: In WebSphere® Message
Broker Version 8.0 and
later, message model schema files contained in applications,
integration services, and libraries are the preferred way to
model messages for most data formats. Message sets are required if
you use the MRM or IDOC domains. For more information about message
modeling, see Message modeling concepts. For information about
how to create an XML schema, see
Creating an XML Schema file by using the New Message Model wizard.
you must have
completed the following tasks:
Before you begin this task, you should be aware of the following
points:
- If the message set to which you are adding the new message definition
file does have an XML wire format layer, but no namespace
support, the imported schema is modified to remove namespaces. For
this reason, you should enable namespace support before importing
a schema.
- If the message set to which you are adding the new message definition
file does not have an XML wire format layer, but does have
namespace support, only the logical information appears in the model.
For this reason, you should add the physical layer to the message
set before importing the schema. This ensures that the message set
is populated with the settings and values from the schema. The XML
Schema is not modified to remove namespaces.
- If the message set to which you are adding the new message definition
file does not have an XML wire format layer, and does not have
namespace support, only the logical information appears in the model
and the imported schema is modified to remove namespaces.
- If you are working with a message set that does not have namespace
support, you must specify the preferences that apply when you import
a schema into the message set. These preferences allow you to specify
how the importer treats certain individual schema constructs. You
can either reject the schema if any occurrences of the construct are
encountered or modify occurrences of the construct. If you choose
modify, the importer modifies all occurrences of the construct.
- The extension to the XML Schema file must be .xsd in
lowercase.
About this task
The following steps create a completely
new message definition file or overwrite the contents of an existing
file.
To create a message definition from an XML Schema file:
Procedure
- Switch to the Integration Development perspective.
- Open the New Message Definition
File wizard by clicking File> New> Message Definition
File on the IBM App Connect
Enterprise Toolkit menu. Alternatively, you can open the wizard by right-clicking an *.xsd file
that was previously imported into the IBM App
Connect Enterprise Toolkit and clicking New>
Message Definition File on the menu.
- In the displayed list of options, click XML
Schema file to select it, and then click Next.
- Step through the remainder of the wizard, competing the
details as required. The processing time for importing
the XML Schema varies according to the size and complexity of that
schema. In a large and complex schema, it can take some time to import
the file, generate the log file and display any task list warnings
or errors.
Results
When you have finished importing the
XML Schema using the wizard:
- Carefully check the log file for any warnings or errors in the
report that is created when the file is imported. These warnings and
error messages give information about whether the schema failed to
import or needed to be modified to enable it to be successfully imported.
You can find this report in the log directory
structure within the project that contains the message definition
that you have tried to create. The report has a .xsd.report.txt file
extension, prefixed with the name that you specified for the new message
definition file.
- Review the messages that are shown in the IBM App Connect
Enterprise Toolkit task list to check whether any
new warnings or error messages have appeared. Although you might have
imported a perfectly valid schema, the task list will display warnings
or error messages for any errors that exist in the message definition
file. The following situations are examples where messages appear:
- If the XML Schema that you are importing contains xsd:key, xsd:keyref and xsd:unique constructs, warning messages appear in the task list to tell you that these constructs are unsupported and will be ignored by the integration server. If you prefer to delete these constructs, open the message definition file in the Message Definition editor, and delete the constructs as described in Message Sets: Deleting objects. Deleting the constructs also removes the warning messages from the task list. If you decide not to delete the constructs, they remain in the message model but are not be deployed to the integration server, or used for any other purpose. The warning messages remain in the task list, but you can use the message model normally.
- If the XML Schema that you are importing contains xsd:redefine
constructs, error messages appear in the task list to tell you that
this construct is unsupported. If you right-click the error messages
and select Quick Fix, you can choose to convert
the xsd:redefine constructs into xsd:include constructs. This also
removes the error messages.
- If the XML Schema that you are importing contains xsd:attribute
constructs that contain both a fixed value and a default value, error
messages appear in the task list to tell you that this construct is
unsupported. However, the schema is still imported and the fixed value
is used, not the default value. The error messages can be ignored.
- If you are importing a collection of related XML Schema files and the Message Definition Editor cannot resolve the links between two of the imported files, messages appear in the task list to say that referenced types or other objects cannot be found.