Null Reference in SoapFormatter.Deserialize

  • Thread starter Thread starter Stingray
  • Start date Start date
S

Stingray

I'm getting a null reference exception inside the framework classes while
attempting to deserialize a soap message using SoapFormatter.Deserialize.
The soap message was previously serialized using SoapFormatter.Serialize.
Does anyone have a clue as to what I should look for? I'm using .NET 1.0
Framework if it matters. Following is the stack trace...

NullReferenceException
Object reference not set to an instance of an object.
Stack trace:
at
System.Runtime.Serialization.Formatters.Soap.PrimitiveArray.SetValue(String
value, Int32 index)
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.ParseArrayMember(P
arseRecord pr)
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.ParseMember(ParseR
ecord pr)
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.Parse(ParseRecord
pr)
at
System.Runtime.Serialization.Formatters.Soap.SoapHandler.EndElement(String
prefix, String name, String urn)
at System.Runtime.Serialization.Formatters.Soap.SoapParser.ParseXml()
at System.Runtime.Serialization.Formatters.Soap.SoapParser.Run()
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(Header
Handler handler, ISerParser serParser)
at
System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Strea
m serializationStream, HeaderHandler handler)
at
System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Strea
m serializationStream)

TIA,
John
 
Never mind. I figured it out. Evidently the SoapFormatter doesn't like
character array members. I removed these and it serialized and deserialized
ok. I am curious though, why? Is this a bug or by design?
John
 
Back
Top