For parameters to an OperationContract that represent a date only (no time component or timezone designator), it is desirable to use xs:Date, to avoid any ambiguity or problems with timezone conversion between client and server.
WCF currently only supports xs:DateTime for serializing DateTime parameters.
What is the easiest way to generate an OperationContract with a parameter that will be serialized as xs:Date?
I'm thinking of having a custom .NET Type "public struct DateOnly" or similar, with implicit casting to/from a standard DateTime, that will somehow automatically generate wsdl as xs:Date.
Is this possible, and how would I go about implementing it?
If it is possible, I suspect the solution might involve using XmlSchemaProviderAttribute on the custom type, but any documentation I've found on this attribute seems a bit opaque.
Update
I find it difficult to believe it will increase the probablity of getting a solution, but I'll follow the site's advice and start a bounty.
For clarity's sake, the condition for the bounty is to provide all the information necessary to construct a solution so that a parameter to a WCF OperationContract can be:
serialized as ws:Date and described as such in the generated WSDL.
is either a System.DateTime value or can be cast implicitly to/from DateTime.