[Mono-bugs] [Bug 581611] New: Mono DataContractSerializer not able to deserialize data from .NET
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Feb 20 19:33:12 EST 2010
http://bugzilla.novell.com/show_bug.cgi?id=581611
http://bugzilla.novell.com/show_bug.cgi?id=581611#c0
Summary: Mono DataContractSerializer not able to deserialize
data from .NET
Classification: Mono
Product: Mono: Runtime
Version: 2.4.x
Platform: Other
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: nayruden at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=343673)
--> (http://bugzilla.novell.com/attachment.cgi?id=343673)
Source code for bug
Description of Problem:
Mono DataContractSerializer not able to deserialize data that was serialized
using .NET (see code attached)
Included in the source is just a simple serialization and deserialization. I
took the serialized data that .NET gave me and input it directly into the
program so I could try to deserialize it on Mono. The XML string from .NET is:
<Test xmlns="http://schemas.datacontract.org/2004/07/ConsoleApplication2"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><services><Service></services></Test>
The error given while deserializing in Mono is:
Unhandled Exception: System.ArgumentException: item
at
System.Collections.Generic.List`1[ConsoleApplication2.Service].System.Collections.IList.Add
(System.Object item) [0x00000]
at System.Runtime.Serialization.CollectionTypeMap.DeserializeContent
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer) [0x00000]
at System.Runtime.Serialization.XmlFormatterDeserializer.DeserializeContent
(System.Xml.XmlQualifiedName name, System.Type type, System.Xml.XmlReader
reader) [0x00000]
at System.Runtime.Serialization.XmlFormatterDeserializer.DeserializeCore
(System.Type type, System.Xml.XmlReader reader) [0x00000]
at System.Runtime.Serialization.XmlFormatterDeserializer.Deserialize
(System.Type type, System.Xml.XmlReader reader) [0x00000]
at System.Runtime.Serialization.SerializationMap.DeserializeContent
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer) [0x00000]
at System.Runtime.Serialization.XmlFormatterDeserializer.DeserializeContent
(System.Xml.XmlQualifiedName name, System.Type type, System.Xml.XmlReader
reader) [0x00000]
at System.Runtime.Serialization.XmlFormatterDeserializer.DeserializeCore
(System.Type type, System.Xml.XmlReader reader) [0x00000]
at System.Runtime.Serialization.XmlFormatterDeserializer.Deserialize
(System.Type type, System.Xml.XmlReader reader) [0x00000]
at System.Runtime.Serialization.XmlFormatterDeserializer.Deserialize
(System.Xml.XmlReader reader, System.Type type,
System.Runtime.Serialization.KnownTypeCollection knownTypes,
IDataContractSurrogate surrogate, System.String name, System.String Namespace,
Boolean verifyObjectName) [0x00000]
at System.Runtime.Serialization.DataContractSerializer.ReadObject
(System.Xml.XmlDictionaryReader reader, Boolean verifyObjectName) [0x00000]
at System.Runtime.Serialization.XmlObjectSerializer.ReadObject
(System.Xml.XmlDictionaryReader reader) [0x00000]
at System.Runtime.Serialization.DataContractSerializer.ReadObject
(System.Xml.XmlReader reader) [0x00000]
at System.Runtime.Serialization.XmlObjectSerializer.ReadObject
(System.IO.Stream stream) [0x00000]
at ConsoleApplication2.Utilities.readMessage (System.Byte[] buffer, Int32
buffer_length) [0x00009] in /root/test/Program.cs:55
at ConsoleApplication2.Program.Main (System.String[] args) [0x0003f] in
/root/test/Program.cs:29
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list