Error reporting in the MX validation framework

If errors are detected in the MX message, an error report is generated.

Two types of error messages are generated from the MX validation framework map, a schema validation error, and an extended validation error.
  • A schema validation error indicates that the MX instance data does not match the schema.
  • An extended validation error indicates that the MX instance data contains an invalid BIC, Country, Currency, IBAN, or incorrect decimal places.

Schema validation error message

The error report contains the SAX parsing error message, or messages. An example of a schema validation error message is shown here:
Error (-1), "XMLParser: Input XML data is invalid." SAXParseException, Error [line:
24 column: 23] Datatype error: Type:InvalidDatatypeValueException, Message:Value
'99BADBIC' does not match regular expression facet '[A-Z]{6,6}[A-Z2-9][A-NP-Z0-
9]([A-Z0-9]{3,3}){0,1}'.

Extended validation error message

The extended validation error report contains an extended error message with the error code, text that explains the error, and an offset location of the error.

An example of an extended error message is shown here:
E80001 - UX - Invalid country code found at position 7362

This error shows that the value UX is not a valid country code, and the position of UX can be found on the 7,362nd position from the beginning of the file.

The resource map that is used for the extended error messages is called errorcodes.txt, and can be found in the mx/maps directory. These error codes are externalized so that you can easily update them for translation, or for wording changes. Translate only the text of the message and not the error code. Additional error messages can be added, if they follow the error code format and they are listed in ascending order by error message number.