title: How to generate xs:Date in WCF OperationContract parameter
body: <p>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.</p>
  
  <p>WCF currently only supports xs:DateTime for serializing DateTime parameters.</p>
  
  <p>What is the easiest way to generate an OperationContract with a parameter that will be serialized as xs:Date?</p>
  
  <p>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.</p>
  
  <p>Is this possible, and how would I go about implementing it?</p>
  
  <p>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.</p>
  
  <p><strong>Update</strong></p>
  
  <p>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.</p>
  
  <p>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:</p>
  
  <ul>
  <li><p>serialized as ws:Date and described as such in the generated WSDL.</p></li>
  <li><p>is either a System.DateTime value or can be cast implicitly to/from DateTime.</p></li>
  </ul>