为操作'poInfo Inquiry'反序列化回复消息体时出错。 - C#网络服务

时间:2013-04-04 04:34:02

标签: c# asp.net web-services wsdl

当我尝试在webservices(C# - WSDL)中调用poInfoInquiry方法时,我在操作'poInfoInquiry'的反序列消息的反序列化中遇到错误。我将日期作为DateTime类型传递。

我抓到的例外情况如下:

System.ServiceModel.CommunicationException: Error in deserializing body of reply message for operation 'poInfoInquiry'. --->
System.InvalidOperationException: There is an error in XML document (12, 13). --->
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.XmlSerializationReaderIFH2HRemittanceIn.Read9_PaymentDetail(Boolean isNullable, Boolean checkType) at 
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderIFH2HRemittanceIn.Read10_PaymentInfo(Boolean isNullable, Boolean checkType) at 
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderIFH2HRemittanceIn.Read11_poInfoInquiryResponse(Boolean isNullable, Boolean checkType) at 
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderIFH2HRemittanceIn.Read18_Item() at 
Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer2.Deserialize(XmlSerializationReader reader) at 
System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) --- End of inner exception

1 个答案:

答案 0 :(得分:1)