SOAP serialization of nullable types and remoting - not supported?

  • Thread starter Thread starter nightwatch77
  • Start date Start date
N

nightwatch77

Hello,

I have recently stumbled upon a problem with serialization of nullable
value types in .Net 2.0 and would appreciate any explanation of what's
happening. My application is hosted in IIS and exposes a web service
with nullable data types - like:
public class DataItem {
DateTime? Timestamp;
int? SomeData;
}
Web service's WSDL correctly specifies that the nullable fields are
'nillable' in the xml schema, and everything works fine (clients are
able to correctly call the web service). Problem starts when I want to
pass the same data through remoting. The web service communicates by
remoting with another application, also hosted in IIS. So, naturally,
I'm using soap formatter for remoting. Unfortunately, this combination
doesn't work - application throws an error with message saying that
nullable type serialization is not supported in soap formatter. WTF?
Web service uses SOAP and everything is fine. SOAP formatter also uses
SOAP, so why does it refuse to handle nullable values? Is some other
'SOAP' used for remoting, and if so, can someone explain why?

Best regards
Rafal Gwizdala
 
Back
Top