Procedure
- Scenario: Warnings or errors are issued for message
references, yet you are certain that your references are correct.
- Explanation: This is never the case with messages
that are using the XML parser. For these message references, direct
validation is not performed because the references could be used for
generic XML.
There is an ESQL editor preference that
allows you to choose to ignore message reference mismatches, or to
have them be reported as a warning or an error. By default, this type
of problem is reported as a warning, so that you can still deploy
the message flow.
- Solution: To use the validation feature, ensure
that you have set up a project reference from the project that
contains the ESQL to the project that contains the message set. For more information, see Referencing resources in other libraries.
If
you are using reference in a subroutine, take the following
steps:
- Create a reference to the tree and the parser in the
module's main procedure.
- Associate the reference to the correlation name, for
example InputRoot or Root. Alternatively, create the OutputRoot.parser node,
where parser is the name of the
parser that you want to use.
- Pass the reference as a parameter to an ESQL subroutine
that identifies the XSD type of the reference.
Results
This practice is beneficial because
the passed reference supports content assistance and validation for
ESQL. The message type content properties open, or open
defined are not used in validation, and the assumption is
that this property is closed.