我有一個簡單的WebService方法,將數據庫結果作爲DataSet返回。爲什麼我的WebService調用僅對一個用戶失敗?
這種方法失敗了該公司一個用戶,但適用於其他人 這裏是崩潰:
CRASH! GetCustomer -
ExtractDomesticCommercialState: Exception:InvalidOperationException
Message:There is an error in XML document (1, 877).
Source: System.Xml TargetSite: Deserialize StackTrace:
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.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Cwc.Common.basis2_ws.Basis2WebService.GetRetailChargeGroupByInstId(String instId)
at Cwc.Common.Basis2ServiceLayer.GetRetailChargeGroupByInstId(String instId)
at Cwc.WaterWorks.Console.frmMain.GetCustomer(String customerKey, Boolean afterCreate)
Exception:FormatException Message:Input string was not in a correct format.
Source: mscorlib TargetSite: StringToNumber
StackTrace: at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Data.XSDSchema.HandleElementColumn(XmlSchemaElement elem, DataTable table, Boolean isBase)
at System.Data.XSDSchema.HandleParticle(XmlSchemaParticle pt, DataTable table, ArrayList tableChildren, Boolean isBase)
at System.Data.XSDSchema.HandleComplexType(XmlSchemaComplexType ct, DataTable table, ArrayList tableChildren, Boolean isNillable)
at System.Data.XSDSchema.InstantiateTable(XmlSchemaElement node, XmlSchemaComplexType typeNode, Boolean isRef)
at System.Data.XSDSchema.HandleTable(XmlSchemaElement node)
at System.Data.XSDSchema.HandleDataSet(XmlSchemaElement node, Boolean isNewDataSet)
at System.Data.XSDSchema.LoadSchema(XmlSchemaSet schemaSet, DataSet ds)
at System.Data.DataSet.ReadXSDSchema(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.ReadXml(XmlReader reader, XmlReadMode mode, Boolean denyResolving)
at System.Data.DataSet.ReadXmlSerializable(XmlReader reader)
at System.Data.DataSet.System.Xml.Serialization.IXmlSerializable.ReadXml(XmlReader reader)
at System.Xml.Serialization.XmlSerializationReader.ReadSerializable(IXmlSerializable serializable, Boolean wrappedAny)
at System.Xml.Serialization.XmlSerializationReader.ReadSerializable(IXmlSerializable serializable)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderBasis2WebService.Read18_Item()
at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer25.Deserialize(XmlSerializationReader reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
客戶端是一個.NET WinForms應用程序 我已經驗證的web服務的方法產生XML正確 只是似乎反序列化失敗
難道是因爲她運行.Net Framework 4和應用程序是爲3.5?
可能是,我們開始懷疑它是用戶配置文件中的某些東西。 – 2010-09-30 12:56:11
我們已經重建了用戶配置文件,現在它正在工作。 – 2010-09-30 15:20:32
你的意思是哪個用戶檔案?某些特定於應用程序或Active Directory中的內容?只是好奇 :) – amarsuperstar 2010-09-30 15:49:59