I am trying to find a neat way of validating an xml document against a schema within an orchestration.
My data is being passed in to me via a web service that contains an “any” element. This provides a single endpoint that can be used by multiple clients. The clients fill the any tag with data in their own native xml format.
Once the data has been received the data is routed to a handler orchestration that understands the source format and validates enriches, and transforms the source format into a canonical message that is then passed on for further “common” data processing.
I need to write a validation routine that will validate the “Any” document against the client’s schema and either return a success or return the validation errors that can then be used to fix the message or be sent back to the client.
While I could hold the client schemas in a specified location and use .net xmldocument to load up the message and xmlschema to validate that message I do not like the idea of this especially as the schemas are already present in the biztalk schema.dll project. I was hoping someone could suggest a better method for validating the schemas using the compiled biztalk dll. I have run reflector on the dll and can find no obvious method that will do this.
Thanks
Dino