WCF Schema Validation with Message Inspectors


There are a lot of blog entries that I’d write if they weren’t already written. Stupid statement. No, really. One of the great qualities of the documentation that we built for WCF and WF and CardSpace is that it’s completely legible and understandable 🙂


Since there’s just a lot of stuff in the SDK docs and one easily gets lost in the forest, I’ll point out a few of the conceptual docs and/or samples and may add the one or the other commentary here or there. For the first one that I selfishly point out the only actual commentary is that I wrote that piece 😉


Go read about Message Inspectors and how to implement client- and/or server-side schema-based validation in WCF, complete with the ability to refer to the validation schemas by config. Adventure-seekers might be interested in poking around in that code and replace the schema validation and the schemas with XSLTs and transforms. That would create some interesting followup-challenges for synthesizing the ContractDescription that projects out the correct pre-transformation representation for WSDL, but I guess that’d be part of the fun.

Comments (1)

  1. serega says:

    Hi Clemens,

    I’m glad that you have rised this topic. I also find Message Inspectors a great feature. Although, I think the moment in the message lifecycle when inspectors come into play is very limiting. More info on it: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1392885&SiteID=1.

    What do you think if Message Inspectors were able to be attached right after deserialization of the message?

    Regards,

    Sergey