I have an InfoPath 2007 form that is all working correctly. It uses a webservice to both retrieve and submit data.
After I added another web method to this service that passes a date (datetime format 8/25/2010) as a parameter, I get the error "The string '' is not a valid AllXsd value".
I have since stripped the web method down to where all I do is to pass the string as a parameter and attempt to return the date as a string so I can see what was sent, but I can't get past the error message. If I pass a datetime field I always get the error. The data connection for the method is on submit but I see the error as soon as the form tries to open.
Is there something special that needs to be done to pass the datetime as a parameter to a web service?
Here is the full text of the error:
The query cannot be run for the following DataObject: CheckDuplicates
InfoPath cannot run the specified query.
The SOAP response indicates that an error occurred:
System.Web.Services.Protocols.SoapException: Server was unable to read request. ---> System.InvalidOperationException: There is an error in XML document (1, 402). ---> System.FormatException: The string '' is not a valid AllXsd value.
at System.Xml.Schema.XsdDateTime..ctor(String text, XsdDateTimeFlags kinds)
at System.Xml.XmlConvert.ToDateTime(String s, XmlDateTimeSerializationMode dateTimeOption)
at System.Xml.Serialization.XmlCustomFormatter.ToDateTime(String value)
at System.Xml.Serialization.XmlSerializationReader.ToDateTime(String value)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read19_CheckDuplicates()
at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer24.Deserialize(XmlSerializationReader reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
Thanks in advance.