SOAP serialization of nullable types and remoting - not supported?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top