[Mono-list] Deserialization issue when talking to webservice from mono

Alan McGovern alan.mcgovern at gmail.com
Wed Feb 11 14:07:34 EST 2009


I really wouldn't be the one to ask about this, but the best bet is to:

1) Serialize the structure on .NET and save to a file
2) Serialize the structure on Mono and save to a file
3) Create a bug on http://bugzilla.novell.com and attach the two files and
the description of how they were created.

You should also reduce the structure to as small an item as possible to
reproduce the bug. For example if you have a List<ComplexObject> you should
try reproduce with just a List<int>, or just a ComplexObject. If the second
fails, then start removing properties from ComplexObject until you know the
one which is failing. If we know *exactly* what is triggering the issue,
it'll be easier/faster to fix.

Though if you want your application to work with any released versions of
mono, you need to investigate an alternative serializing form.

Alan.

On Wed, Feb 11, 2009 at 6:26 PM, Robert Weiss <rweiss at chesapeakebay.net>wrote:

>  Yes. Assuming that your example class "Sample" was part of the .net
> framework and the implementation in .Net was what you listed and the mono
> implementation differs, then the binary serialization would not work. Since
> this **appears** to be the issue at hand with the way that the Generic
> Sorted List was implemented in mono, how does one get the incorrect mono
> implementation fixed?
>
>
>
> Thanks for your input.
>
>
>  ------------------------------
>
> *From:* Alan McGovern [mailto:alan.mcgovern at gmail.com]
> *Sent:* Wednesday, February 11, 2009 1:18 PM
>
> *To:* Robert Weiss
> *Cc:* mono-list at lists.ximian.com
> *Subject:* Re: [Mono-list] Deserialization issue when talking to
> webservice from mono
>
>
>
> http://msdn.microsoft.com/en-us/library/72hyey7b(VS.71).aspx<http://msdn.microsoft.com/en-us/library/72hyey7b%28VS.71%29.aspx>
>
> MS.NET:
> public class Sample
> {
>     private int val;
>     public int Value { get { return val; } }
> }
>
> Mono:
> public class Sample
> {
>     private int value;
>     public int Value { get { return value; } }
> }
>
> These classes are *not* binary serializable because the private field is
> named differently. This is probably the issue you're hitting.
>
> Alan.
>
> On Wed, Feb 11, 2009 at 5:20 PM, Robert Weiss <rweiss at chesapeakebay.net>
> wrote:
>
> Correct.
>
>
>
> We are running mono 2.2
>
>
>
> Not sure what you mean RE: binary serialization puts a dependency on
> private implementation. Can you explain further?
>
>
>  ------------------------------
>
> *From:* Alan McGovern [mailto:alan.mcgovern at gmail.com]
> *Sent:* Wednesday, February 11, 2009 12:04 PM
> *To:* Robert Weiss
> *Cc:* mono-list at lists.ximian.com
> *Subject:* Re: [Mono-list] Deserialization issue when talking to
> webservice from mono
>
>
>
> Just to clarify, what you're saying is that if Mono binary serializes your
> generic list, then MS.NET cannot deserialize the resulting stream? If so,
> what version of Mono are you on. If it's older than 2.2, maybe you should
> try 2.2 and see if the issue has been resolved.
>
> Ideally there would be no difference, but binary serialization puts a
> dependency on private implementation detail which makes it hard to replicate
> exactly.
>
> Alan.
>
> On Wed, Feb 11, 2009 at 4:55 PM, Rob Weiss <rweiss at chesapeakebay.net>
> wrote:
>
>
> Ok. Here is the deal with my issue. It "appears" that the implementation of
> the Generic Sorted List on mono is *NOT* implemented the same was as in the
> .Net Framework. So when I binary serialize the Object, which has a Generic
> Sorted List property, on mono and deserialize on win-32, using the EXACT
> same DLL, it thows the error listed above.
>
> Is there a list of the differences of the implementations between mono and
> .Net? BTW, this specific DLL PASSED the MoMA with no issues reported.
> --
> View this message in context:
> http://www.nabble.com/Deserialization-issue-when-talking-to-webservice-from-mono-tp21954562p21958261.html
>
> Sent from the Mono - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20090211/9146c487/attachment-0001.html 


More information about the Mono-list mailing list