I generated C# classes from .wsdl file and it works. But I have following issue. Service formats xsd:date
types in response incorrect. Example:
<date xsi:type="xsd:date">2016-01-27 14:20:30</date>
But it should be one of these:
<date xsi:type="xsd:date">2016-01-27</date>
<date xsi:type="xsd:dateTime">2016-01-27T14:20:30</date>
And because of that I get exception
Unhandled Exception: System.ServiceModel.CommunicationException: Error in deserializing body of reply message for operation 'createVacature'. ---> System.InvalidOperationException: There is an error in XML document (2, 646). ---> System.FormatException: String was not recognized as a valid DateTime.
How can I override date parsing? Or any other way to fix it? Implementing all that manually without svcutil.exe would be overkill.
Here is my solution. I intercept service response before parsing and manually edit it.
Here is date fixing functionality:
Here is auxiliary class:
Here is usage: