I am consuming a SAP-NetWeaver web-service. The response object contains a data and when it is not set it returns "0000-00-00". This leads to a deserialization error in my .NET 4.0 WCF proxy because the minimum valid date for .NET would be "0001-01-01".
I asked the SAP-developer to decorate the date element with the minoccurs="0" attribute and omit it if there's no value present but he states he can't do so.
Before I ask him to return "0001-01-01" for empty dates - just for my WCF proxy - I would like to know:
Is "0000-00-00" a valid date in terms of SOAP? Couldn't find it in any SOAP specification so please let me know your source of information.
Is there a way to tell the .NET deserializer to accept "0000-00-00" and handle it like DateTime.MinValue?
Many thanks!
UPDATE: Now the SAP-web-service returns an empty element if the date is null. But my problem remains the same.