Take the 2-minute tour ×  Two systems are communicating via XML
messages on a message queue and any received message must be
validated for structure, content and business logic before being
processed.  An XML schema offers validation on structure and
content with data type restriction, required fields, choice
structures and the like.  But this of course only gets me half
way there. In a system I am currently working on, we do the
remaining validation by deserializing the message to an object
structure and validating context with a dedicated code library.
The problem is that first of all the validation is in two
different places and it overlaps a bit since some validation can
be done in both ways, and secondly maintaining the validation
code can become tedious.  Is there a better way to do this, any
best practices or tools out there?  share|improve this question
add comment  2 Answers  Data types and required fields in the
schema define the structure of the XML document, and should in
my opinion only validate