Delphi--Web Service--ASP.NET 问题,请高手帮忙!

                            
我用Delphi写的Web   Service发布在IIS中。   
  其中有个方法,结果返回数组。  
  比如:  
  TEmpArr   =   array   of   TEmp;  
   
  function   Test():TEmpArr;   stdcall;  
   
  我用Delphi写客户端时,没有问题。  
   
  但是用ASP.NET来访问时,就出异常了,以下为异常信息:  
   
  The   referenced   element   with   ID   '1'   was   not   found   in   the   document.  
     
  Description:   An   unhandled   exception   occurred   during   the   execution   of   the   current   web   request.   Please   review   the   stack   trace   for   more   information   about   the   error   and   where   it   originated   in   the   code.    
   
  Exception   Details:   System.InvalidOperationException:   The   referenced   element   with   ID   '1'   was   not   found   in   the   document.  
   
  Source   Error:    
   
  Line   95:           public   LoginRForm[]   Test()   {  
  Line   96:                 object[]   results   =   this.Invoke("Test",   new   object[0]);  
  Line   97:                 return   ((LoginRForm[])(results[0]));  
   
  InvalidOperationException:   The   referenced   element   with   ID   '1'   was   not   found   in   the   document.]  
        System.Xml.Serialization.XmlSerializationReader.GetTarget(String   id)   +683799  
        System.Xml.Serialization.XmlSerializationReader.FixupArrayRefs(Object   fixup)   +157  
        System.Xml.Serialization.XmlSerializationReader.DoFixups()   +83  
        System.Xml.Serialization.XmlSerializationReader.ReadReferencedElements()   +153  
        Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderILoginBeanservice.Read11_TestResponse()   +651  
        Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer13.Deserialize(XmlSerializationReader   reader)   +40  
        System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader   xmlReader,   String   encodingStyle,   XmlDeserializationEvents   events)   +161  
   
  [InvalidOperationException:   There   is   an   error   in   XML   document   (2,   1293).]  
        System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader   xmlReader,   String   encodingStyle,   XmlDeserializationEvents   events)   +637  
        System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader   xmlReader,   String   encodingStyle)   +32  
        System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage   message,   WebResponse   response,   Stream   responseStream,   Boolean   asyncCall)   +1143  
        System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String   methodName,   Object[]   parameters)   +204  
        eL.CSM.TEST.ILoginBeanservice.Test()   in   c:\inetpub\wwwroot\WebApplication1\Web   References\TEST\Reference.cs:96  
        eL.CSM.Index_Guest.Button1_Click(Object   sender,   EventArgs   e)   in   c:\inetpub\wwwroot\webapplication1\index_guest.aspx.cs:55  
        System.Web.UI.WebControls.Button.OnClick(EventArgs   e)   +105  
        System.Web.UI.WebControls.Button.RaisePostBackEvent(String   eventArgument)   +107  
        System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String   eventArgument)   +7  
        System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler   sourceControl,   String   eventArgument)   +11  
        System.Web.UI.Page.RaisePostBackEvent(NameValueCollection   postData)   +33  
        System.Web.UI.Page.ProcessRequestMain(Boolean   includeStagesBeforeAsyncPoint,   Boolean   includeStagesAfterAsyncPoint)   +5102

查看回复