This sample shows one approach to handling nillable types that correspond to
.NET Value types, on the client side.
http://cheeso.members.winisp.net/srcview.aspx?dir=xml-serialization&file=XsiNilD
ate.cs
The sample is framed as an XML serialization app. To use it in a webservice
client, what you would do is modify the generated proxy so that instead of
returning TypeA, it returns your hand-coded TypeA_Memento thing (See the
example). It wouldn't be hard to parse a type, either in XSD or in C#, and
mechanize the production of the memento.
It does tend to complexify the programming model on the client side, of
course, because now ya gotstabe checkin all those value types to see if they
are valid or not before using them. Eh, that's the cost of doing business,
though, isn't it?
-D
>>My humble opinion I think Simon has got it right I would go with his
>>last idea about using the complexType. Yes some work, but once it is
>>done, it's done.
>
> Okay, but you can do this only if you control the web service. I
> don't, so I cannot change what the web service sends me.