[Mono-bugs] [Bug 336625] New: XmlSerializer Deserialize

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Oct 25 04:02:51 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=336625

           Summary: XmlSerializer Deserialize
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: PC
               URL: http://www.thempra.net
        OS/Version: Debian Woody
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: thempra at ono.com
         QAContact: mono-bugs at ximian.com
                CC: thempra at ono.com
          Found By: DeveloperNet


The SourceCode is here:
http://161.67.133.42/miembros/thempra/MonoService.zip

  I try to migrate a WebService of .NET to Mono. But allways get the same
Exception when Deserialze a XML, and every time I read the StreamReader the
Exception jump in a different position.

My code is:

            StreamReader sr = new StreamReader(URL);
            XmlSerializer xs = new XmlSerializer(typeof(CLASSGENERATED));

            CLASSGENERATED element=(CLASSGENERATED)xs.Deserialize(sr);


And the CLASSGENERATED it's make with xsd.exe

[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute ()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true,
Namespace="http://www.xxxxxxxxx.xx/XXXXXX ")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://www.xxxxxxx.xxxx/XXXXXX",
IsNullable=false)]
public partial class CLASSGENERATED {
..........
........



EXCEPTION:

Message:

parameters


StackTrace:

at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, 
System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] 
  at System.Reflection.MonoProperty.SetValue (System.Object obj, System.Object
value, BindingFlags invokeAttr, System.Reflection.Binder binder, 
System.Object[] index, System.Globalization.CultureInfo culture) [0x00000] 
  at System.Reflection.PropertyInfo.SetValue (System.Object obj, System.Object
value, System.Object[] index) [0x00000] 
  at System.Xml.Serialization.XmlTypeMapMember.SetValue
 (System.Object ob, System.Object value) [0x00000] 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.SetMemberValue
(System.Xml.Serialization.XmlTypeMapMember member, System.Object ob,
System.Object value, Boolean isValueList) [0x00000] 

  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers
(System.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList,
Boolean readByOrder) [0x00000] 
  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanceMembers
 (System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob) [0x00000] 
  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstance
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkType) [0x00000] 

  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkType) [0x00000] 
  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement
 (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000] 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers
(System.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList,
Boolean readByOrder) [0x00000] 

  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanceMembers
(System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob) [0x00000] 
  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstance
 (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkType) [0x00000] 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkType) [0x00000] 

  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement
(System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000] 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers
 (System.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList,
Boolean readByOrder) [0x00000] 
  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanceMembers
(System.Xml.Serialization.XmlTypeMapping
 typeMap, System.Object ob) [0x00000] 
  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstance
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkType) [0x00000] 

  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkType) [0x00000] 
  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement
 (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000] 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers
(System.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList,
Boolean readByOrder) [0x00000] 

  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanceMembers
(System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob) [0x00000] 
  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstance
 (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkType) [0x00000] 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkType) [0x00000] 

  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot
(System.Xml.Serialization.XmlTypeMapping rootMap) [0x00000] 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot ()
[0x00000] 

  at System.Xml.Serialization.XmlSerializer.Deserialize
(System.Xml.Serialization.XmlSerializationReader reader) [0x00000] XML
Serializer(System.Xml.Serialization.XmlSerializer):
System.Xml.Serialization.XmlSerializerSTEAMREADER
(System.IO.StreamReader)



I run it in Debian with Mono 1.5.1 and XSP2. Thx.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list