The MSDN article (http://msdn.microsoft.com/en-us/library/ff664526(v=PandP.50).aspx) on VAB integrating with WCF says in the 2nd paragraph:
When the WCF service begins, it invokes the custom behavior. This custom behavior then adds the parameter inspector. WCF calls the parameter inspector twice for each message it processes. The first time is before it sends the
call to the service implementation. The second time is after the service generates the return message.
The last sentence appears to say that I should be able to get validation on the response message of a service operation. I am using a [ValidationBehavior] attribute on the service contract, plus a fault contract for ValidationFault on each operation, and
validator attributes on the public properties of the request and response message types (simple data transfer objects). In testing, I get validation faults from validators on the request message, but not from validators on the response message.
Does anyone have any clues, examples, or insights?
My scenario is in contract-first service development, where I only “own” the contract and not the implementations, and I want to verify that each service implementation satisfied validation constraints on the response message.