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

Neumann Péter neumann.peter at calltravel.hu
Tue Jan 18 08:10:41 EST 2005


  Well, the problem is solved.

  This strange behaviour, I mean the SoapHeaderException, was caused
  by the Deserialize() method of the XmlSerializer class. I use this
  method in the ws to Deserialize an ArrayList which was Serialized
  before on the client. In .Net if the ArrayList was empty then the
  deserialized object will be an empty ArrayList as well. In Mono (for
  some reason) if the ArrayList was empty then the Deserialize method
  will return a null reference. Then I used this reference later in
  the ws without checking wheter it is null or not and of course it
  caused an exception.

  It seems that the other problem ("Error: ConnectFailure") has
  nothing to do with Mono. If I replace the hostname of the server to
  the IP address then the Test Form works fine, therefor I suspect
  that the problem is OS related, maybe it is the hostname
  resolution that doesn't work well.

Thanks for Your reply!
Peter Neumann

Tuesday, January 18, 2005, 1:31:10 PM, you wrote:

> On Tue, 2005-01-18 at 09:53, Neumann Péter wrote:
>> Hi,
>>   The exception I get is this:
>>   Exception Details:
>>   "System.Web.Services.Protocols.SoapHeaderException: Object reference
>>   not set to an instance of an object"

> This is an error in  the client right?  If so I would guess that the
> problem is due to your mod_mono (or XSP) not working correctly as you
> describe later.

> /J\

More information about the Mono-devel-list mailing list