Error when a client .NET 1.1 consume a WS .NET 2.0

Topics: General Discussion Forum, July and December Releases Forum
Jan 2, 2008 at 1:32 PM

I had been creating ASMX web services with the service factory for a while now. All my clients prior to my current project had been VS 2005 (.NET 2.0) and they all work wonderful. Now I’m trying to reuse a Web Service in one of my older application written in VS 2003 (.NET 1.1) but whenever there is a nullable value in the response message the application throws a runtime exception.

System.InvalidOperationException: There is an error in XML document (1, 446). --->
System.FormatException: Input string was not in a correct format. at System.Number.ParseUInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Xml.XmlConvert.ToUInt32(String s)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderTestWs.Read1_Object1(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderTestWs.Read6_GetMethodResponse()
at Microsoft.Xml.Serialization.GeneratedAssembly. GetMethodResponseSerializer.Deserialize(XmlSerializationReader reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

Do any of you have a workaround for this?

Francisco Pereira

Jan 4, 2008 at 2:31 PM
Try switching the "IsNullable" value for that type.