[Mono-devel-list] SoapHeaderException when invoking Web Service

Neumann Péter neumann.peter at calltravel.hu
Tue Jan 18 04:53:46 EST 2005


  The exception I get is this:

  Exception Details:
  "System.Web.Services.Protocols.SoapHeaderException: Object reference
  not set to an instance of an object"

  Source Error:

  "Line 59:         [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:calltravel-hu:sqlservice/ExecuteDataSet", RequestNamespace="urn:calltravel-hu:sqlservice", ResponseNamespace="urn:calltravel-hu:sqlservice", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
   Line 60:         public string ExecuteDataSet(string procName, string parameters, out string outparameters) {
   Line 61:             object[] results = this.Invoke("ExecuteDataSet", new object[] {
   Line 62:                         procName,
   Line 63:                         parameters});"

  Source File: c:\inetpub\wwwroot\webapp1\web references\remotesqlserver\reference.cs    Line: 61

  Stack Trace:

  "[SoapHeaderException: Object reference not set to an instance of an object]
   System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   WebApp1.RemoteSqlServer.RemoteMethods.ExecuteDataSet(String procName, String parameters, String& outparameters) in c:\inetpub\wwwroot\webapp1\web references\remotesqlserver\reference.cs:61
   WebApp1.Controls.RemoteSqlClient.ExecuteDataSet(StoredProcedure sp, SP_Parameter[]& OutParams) in c:\inetpub\wwwroot\webapp1\components\remotesqlclient.cs:143
   WebApp1.Controls.RemoteSearch.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\webapp1\remotesearch.aspx.cs:32
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +731"

   I have found another strange thing. When I test the
   TestService.asmx that comes with Mono in a browser, after pressing
   the Invoke button on its Test Form it returns an error: "Error:
   ConnectFailure". After this I have created a simple Hello World ws
   to see if it causes the same error and it does. I don't know if this
   error is connected with the previous one (SoapHeaderException) I
   mentioned, but this information may helpful for You.

Peter Neumann

Monday, January 17, 2005, 9:31:18 PM, you wrote:

> We need more information. What are the error message details?

> On Mon, 17 Jan 2005 18:10:48 +0100, Neumann Péter
> <neumann.peter at calltravel.hu> wrote:
>> Hi Guys,
>>   First of all I have to admit that I am pretty new to this mono
>>   world. My problem is the following: I have a Web Service developed
>>   under VS2003 and it works fine on a Windows server with IIS. I have
>>   deployed this WS on a Linux machine that runs Apache and Mono, but
>>   when I try to invoke one of its methods I always get a
>>   SoapHeaderException:
>>   "System.Web.Services.Protocols.SoapHeaderException: Object reference
>>    not set to an instance of an object"
>>    What is the problem with? Can anyone help me to find the solution?
>> Thanks in advance!
>> Peter Neumann
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list

More information about the Mono-devel-list mailing list