This project is read-only.

If you service has operations that accept message or data contracts, use schemas to validate your messages

J.D. Meier, Jason Taylor, Prashant Bansode, Carlos Farre, Madhu Sundararajan, Steve Gregersen.

If you service has operations that accept message or data contracts, use schemas to validate your messages. Message validation provides a way to validate messages when operations consume message contracts or data contracts which are not possible to validate with parameter validation. It allows the creation of validation logic inside the schemas, providing more flexibility and less development time. Schema validation occurs before serializing or encrypting the message. In order to reduce development time you can start by using the service.xsd schema file that is generated when you add a service reference to your client.

The following steps briefly show you how to perform message validation using schemas.
  1. Use the schema.xsd schema file that is created, by svcutil.exe, when you add a service reference or create a schema that represents the operations of your service and the types consumed by those operations.
  2. Create a .NET class that implements a custom client message inspector and custom dispatcher message inspector to validate the messages sent and received by the service.
  3. Implement a custom endpoint behavior to enable message validation on both the client and the service.
  4. Implement a custom configuration element on the class that allows you to expose the extended custom endpoint behavior in the configuration file of the service or the client.

Last edited Apr 17, 2008 at 12:45 AM by prashantbansode, version 1

Comments

No comments yet.