Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 25, 2011 11:44 AM by serggusak
Jun 23, 2006 03:54 PM|LINK
Apr 19, 2007 01:30 PM|LINK
I know this is an old post, but I'm having this problem right now and there seems to be no literature about it online.
I have found a few things while investigating though. It is nillable dates that are a problem. You can do either of the following to resolve it.
1. If you have control over the web service causing the problem, change it's specification so that all nillable date fields are nillable dateTime fields. This seemed to work in my solution.
2. If you do not have control over the web service you are calling, you will have to edit the generated reference.cs class to replace all instances of System.Nullable<System.DateTime> with just DateTime. This means the field on the object is no longer nullable,
so you will have problems representing null values. It also means you have to edit it again every time you update your web service.
Hopefully this has been resolved in .NET 3.0 and WCF?
Jun 10, 2010 11:37 PM|LINK
I had a similar issue adding a TestTrack Pro web reference to VS 2008. I got the error "'date' is an invalid value for the SoapElementAttribute.DataType property. The property may only be specified for primitive types."
my fix is at http://bit.ly/bsMQaB
I know this is too late to help you but hopefully it helps someone else.
Jul 12, 2010 08:24 PM|LINK
hey checkout this link
Aug 25, 2011 11:44 AM|LINK
Replacing xsd:date with xsd:dateTime in the WSDL seems to work for me. I think it's a better solution because in theory it should keep null dates working.