[Mono-devel-list] Patch to mimic MS.Net remoting name mangling

Lluis Sanchez lluis at ximian.com
Mon May 2 15:41:06 EDT 2005


This bug needs a more generic solution. Field names should be encoded
using XmlConvert.EncodeLocalName, since there may be other characters in
the name that are not valid in xml names. For inherited fields, the
serialized name should be "className+fieldName". The binary serializer
already write serialized fields in this way, but the class name is not
being added in the soap serializer (notice that "+" will be encoded to
_002B_ by XmlConvert.EncodeLocalName).

On dl, 2005-05-02 at 12:17 -0700, Luke Ravitch wrote:
> I put together a little patch to improve Mono-MS.Net remoting
> compatibility.  Basically, MS.Net mangles the names of private
> inherited fields for SOAP-serialized objects.  I've opened a bug
> (#74760) to track the issue...
> 
>     http://bugs.ximian.com/show_bug.cgi?id=74760
> 
> Please see it for a more detailed description of the issue.
> 
> Attached here is the patch (also with the bug report).  Does it look
> reasonable?
> 
> Because it looked like it belongs in the same place, I also added
> support for the SoapFieldAttribute.XmlFieldName in the serializer.
> (The attribute was implemented, but the SOAP serialization stuff
> didn't use it.)  Of course, that's still only a very partial
> implementation of the SoapFieldAttribute stuff.
> 
> I wasn't sure where to put the name mangling routine because both
> SoapReader and SoapWriter need to use it.  So I just picked one and
> went with it.
> 




More information about the Mono-devel-list mailing list