[Mono-bugs] [Bug 75855][Nor] New - Mono should serialize interfaces to XML, as MS framework does

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Aug 19 15:27:48 EDT 2005

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 knocte at gmail.com.


--- 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 MS results in WinXP SP2.
+Status: NEW   
+Priority: Normal
+Component: interop
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: knocte at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+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.Type type, Boolean allowPrivateConstructors)
+in <0x000cd>
+(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.Type type, System.Xml.Serialization.XmlRootAttribute root,
+System.String defaultNamespace)
+in <0x00094>
+(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):
+<?xml version="1.0" encoding="ibm850"?>
+<clsPerson xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  <FirstName>Jeff</FirstName>
+  <MI>A</MI>
+  <LastName>Price</LastName>
+  <EmailAccounts />
+<?xml version="1.0" encoding="ibm850"?>
+<clsPerson xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  <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>
+How often does this happen? :

More information about the mono-bugs mailing list