Managing Message Schemas

In IMS Integration Hub, messages must conform to schemas that are implemented in the extensible markup language schema definition (XSD) and agreed to by both the publishing and subscribing companies. Schemas may be different at different sites, depending on the logic requirements for a specific implementation.

A message schema group is used for interrelated message schemas. Interrelated message schemas reference each other (for example, xsd:include schemaLocation="another-schema.xsd"). Message schemas can be configured individually in the group, imported individually, or imported together. Subscribers are assigned to the message schema group, rather than to individual message schemas.

When a message is sent to IMS Integration Hub, IMS Integration Hub checks the message type of the file. If the message type is empty, IMS Integration Hub tries to extract the message type from the XML file using the XmlDocument » Element » LocalName. (For example, if the XML file has p:NotifyWorkExecutedEvent xmlns:p="http://www.mesa.org/xml/B2MML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" in the first line, the message type is NotifyWorkExecutedEvent.) If no message type can be determined, IMS Integration Hub will not process the message.

If the message type matches a message schema name, IMS Integration Hub validates the XML file against that message schema's XSD. If successful, IMS Integration Hub passes the XML file to the adaptor of the subscriber(s) linked to the message schema.

If the message type does not match a message schema name, IMS Integration Hub looks for a matching subscriber name. If a matching subscriber exists, and is linked to a message schema group, IMS Integration Hub validates the XML against the XSDs of the message schema group. If validation is successful, IMS Integration Hub passes the XML file to the adaptor of the matching subscriber. This means that different messages can be validated by the message schema group yet processed by their own subscriber adaptor.

If the validation against the XSD fails, the XML file is not sent to the adaptor and the message is marked as invalid. If configured, an error email is also sent to the email addresses specified in the Message Poll settings. The validity of the message structure can be viewed in the Message Log Viewer.