Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=75855 --- shadow/75855 2005-08-19 15:27:48.000000000 -0400 +++ shadow/75855.tmp.14889 2005-08-19 15:27:48.000000000 -0400 @@ -0,0 +1,91 @@ +Bug#: 75855 +Product: Mono: Runtime +Version: 1.1 +OS: All +OS Details: Mono exception in SUSE 9.3 (Mono 1.1.8.2). MS results in WinXP SP2. +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: interop +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Summary: Mono should serialize interfaces to XML, as MS framework does + +I am trying to deploy a website using Maverick.NET+Apache+mod_mono. + +My web app, as the Maverick.NET attached example in the tarball, does a lot +of serialization stuff, above all if XSLT is used. With MS Framework +(VS.NET 2003) I am able to serialize a variable whose type is an interface, +but Mono returns an exception. + + + +Steps to reproduce the problem: +1. Compile and execute the testcase I am going to attach. + + +Actual Results: +> mono MonoBugAboutInterfaceSerialization.exe + + +Unhandled Exception: System.InvalidOperationException: +System.Collections.IList cannot be serialized because it is an interface +in <0x00142> +System.Xml.Serialization.ReflectionHelper:CheckSerializableType +(System.Type type, Boolean allowPrivateConstructors) +in <0x000cd> +System.Xml.Serialization.XmlReflectionImporter:ImportListMapping +(System.Type type, System.Xml.Serialization.XmlRootAttribute root, +System.String defaultNamespace, System.Xml.Serialization.XmlAttributes +atts, Int32 nestingLevel) +in <0x008e7> System.Xml.Serialization.XmlReflectionImporter:CreateMapMember +(System.Type declaringType, System.Xml.Serialization.XmlReflectionMember +rmember, System.String defaultNamespace) +in <0x00290> +System.Xml.Serialization.XmlReflectionImporter:ImportClassMapping +(System.Type type, System.Xml.Serialization.XmlRootAttribute root, +System.String defaultNamespace) +in <0x00094> +System.Xml.Serialization.XmlReflectionImporter:ImportTypeMapping +(System.Type type, System.Xml.Serialization.XmlRootAttribute root, +System.String defaultNamespace) +in <0x000b8> System.Xml.Serialization.XmlSerializer:.ctor (System.Type +type, System.Xml.Serialization.XmlAttributeOverrides overrides, +System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, +System.String defaultNamespace)in <0x00015> +System.Xml.Serialization.XmlSerializer:.ctor (System.Type type) +in <0x0007f> MonoBugAboutInterfaceSerialization.Class1:Main +(System.String[] args) + + +Expected Results (MS results): +>MonoBugAboutInterfaceSerialization.exe + +<?xml version="1.0" encoding="ibm850"?> +<clsPerson xmlns:xsd="http://www.w3.org/2001/XMLSchema" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <FirstName>Jeff</FirstName> + <MI>A</MI> + <LastName>Price</LastName> + <EmailAccounts /> +</clsPerson> + +<?xml version="1.0" encoding="ibm850"?> +<clsPerson xmlns:xsd="http://www.w3.org/2001/XMLSchema" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <FirstName>Andres</FirstName> + <MI>G</MI> + <LastName>Aragoneses</LastName> + <EmailAccounts> + <anyType xsi:type="xsd:string">knocte at gmail dot com</anyType> + <anyType xsi:type="xsd:string">angoar at iies dot es</anyType> + </EmailAccounts> +</clsPerson> + + +How often does this happen? : +Always. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
