当访问一个CGI Web服务,它引发错误[有XML文档中的错误(] 此错误只发生如果返回paramater是对象的数组访问web服务,抛出错误
如何解决这个问题?
------------ execption details --------------- System.InvalidOperationException is unhandled Message =“There is在XML文档(1,452)中出错。“ Source =”System.Xml“ StackTrace: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,S tring 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 D:\ Samjog \ Temp Project \ ProxyTest \ ProxyTest \ MyWebService.CallMyMethod(String hostName,String YourAppMyApptoken,Int32 subscription_id) MyWebService.cs:line 93 at D:\ Samjog \ Temp Project \ ProxyTest \ ProxyTest \ Form1.cs中的ProxyTest.Form1.btnListFeeds_Click(对象发件人,EventArgs e):第209行 at System.Windows.Forms.Control.OnClick (EventArgs e) 在Syst em.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message & m,MouseButtons button,Int32 clicks) 在System.Windows.Forms.Control.WndProc(消息&米) 在System.Windows.Forms.ButtonBase.WndProc(消息&米) 在System.Windows.Forms.Button.WndProc(消息&米) 在System.Windows.Forms.Control.ControlNativeWindow.OnMessage(消息&米) 在System.Windows.Forms.Control.ControlNativeWindow.WndProc(消息&米) 在System.Windows.Forms.NativeWindow.Debug gableCallback(IntPtr的的HWND,MSG的Int32,IntPtr的WPARAM,IntPtr的LPARAM) 在System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG & MSG) 在System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods。 IM3ComponentManager.FPushMessageLoop(Int32 dwComponentID,Int32 reason,Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason,ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext上下文) at System.Windows.Forms.Application.Run(Form mainForm) at ProxyTest.Program.Main()in D:\ Samjog \ Temp Project \ ProxyTest \ ProxyTest \ Program.cs:line 18 at System。 AppDomain._nExecuteAssembly(大会组件,字串[] args) 在System.AppDomain.ExecuteAssembly(字符串assemblyFile,证据assemblySecurity,字串[] args) 在Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 在System.Threading.ThreadHelper.ThreadStart_Context(对象状态) 在System.Threading.ExecutionContext.Run(的ExecutionContext的ExecutionContext,ContextCallback回调,对象状态) 在System.Threading.ThreadHelper.ThreadStart() 的InnerException:System.InvalidCastException 消息=“无法分配类型System.Int32的对象到MyAppWSDLSubscribedFeedInfo类型的对象。“ Source =”dz-gayew“ StackTrace: at Microsoft.Xml.Serialization.GeneratedAssembly。XmlSerializationReaderMyWebService.Read19_CallMyMethodResponse() 在Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer14.Deserialize(XmlSerializationReader阅读器) 在System.Xml.Serialization.XmlSerializer.Deserialize(的XmlReader XmlReader中,字符串的encodingStyle,XmlDeserializationEvents事件) 的InnerException:
你能就如何做到这一点的详细信息? – Samjog 2010-01-06 06:58:09