Question: 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.

Answer: 
WCF's defaut serializer (DataContractSerializer) does not support it. But XmlSerializer supports it. 

1 - Add the [XmlSerializerFormat] attribute to your contract...

```
[XmlSerializerFormat]
[ServiceContract]
public interface IMyContract
{
   MyType GetData();
}

```

2 - In the DataContract type, add the [XmlElement(DataType = "date")] to the member.

```
public class MyType
{
     [XmlElement(DataType = "date")]
     public DateTime BirthDate {get; set;}
}

```

Hope this helps
Unfortunately WCF doesn't support the xs:Date type. You'd have to create your own "DateOnly" struct, like:

```
<DataContract()> _
public struct DateOnly
   <DataMember()> public Month as Integer
   <DataMember()> public Day as Integer
   <DataMember()> public Year as Integer
end struct

```