So, I have an XSD that reflects the kind of XML I'd want to receive - it has maxLengths and patterns etc
And I have an asmx based web service, but there is then this logical disconnect between these things...
I use xsd2code to generate classes, and I have a [WebMethod] that requires an instance of the generated class as its request parameter
But naturally, then I don't have access to the XML, and the generated classes don't have any checks for the maxLengths or patterns that I've set..
So why did I even bother designing my xsd all nicely like this when the wervice is asked for its WSDL it's all going to get lost and just pumped out as strings and ints?
What should I be doing to make this work more harmoniously? i.e. I'll need a set of classes to code against, but do I specify the xsd path in some kind of method decorator like [WebMethod] so that the XmlSerializer can validate the inbound xml against the
xsd before it does the decode and returns me populated classes?
View Complete Post