A WSDL file contains a Schema that defines the XML Types transferred from
client to server. However, from what I can tell, this schema is never
validated by the default MS implementation of the Web Service class.
I know that I could, within the server's implementation, validate the input
by taking the concrete class and running it through a reserialization process
that would validate the XML against a given schema. However, I was wondering
if there was a more intrinsic way of doing this (e.g. an HTTP filter of some
sort).
If not, is there something else out there that can create Client/Server
objects for Web Services that will validate the information?
I tend to create rather strict XSD definitions (e.g. Enumerations, etc) and
as it is, none of the imput documents, defined by an XSD Schema, are
validated against that schema.
John Saunders - 28 Sep 2006 19:16 GMT
>A WSDL file contains a Schema that defines the XML Types transferred from
> client to server. However, from what I can tell, this schema is never
[quoted text clipped - 16 lines]
> as it is, none of the imput documents, defined by an XSD Schema, are
> validated against that schema.
If you're asking about validating the messages sent to your web service,
then take a look at the following article:
http://msdn.microsoft.com/msdnmag/issues/03/07/xmlschemavalidation/default.aspx
(Extend the ASP.NET WebMethod Framework by Adding XML Schema Validation).
I build a validator based on this, and use it for validating messages
received - and sent!
John