[Mono-dev] Bug in XMLSerialization

schneider at jsschneider.de schneider at jsschneider.de
Fri Mar 17 03:12:05 EST 2006


Hi all,

I think I found a nasty bug in Mono's XML Deserialisation Module. I'm
trying to call a Webservice that returns a data strucutre containing an C#
enum. When I'm calling the service i get an error with the stacktrace
following this text. I need to get this fixed quickly, so i tried it this
way instead of submitting a bug ticket (but of course i will do this
later). MS CLR doesn't seem to have any problems with the call, so I
assume it's a mono bug.

Cheers,

Johannes

Enum looks like this:

[System.Xml.Serialization.SoapTypeAttribute("STATUS", "http://www.xxx")]
    public enum ACCOUNT_STATUS {
        
		/// <remarks/>
		ACCOUNT_ANY,

        /// <remarks/>
        ACCOUNT_NOSTATUS,

        /// <remarks/>
        ACCOUNT_INUSE,
        
        /// <remarks/>
        ACCOUNT_DELETED,
        
        /// <remarks/>
        ACCOUNT_RESERVED,
        
        /// <remarks/>
        ACCOUNT_ONHOLD,
        
        /// <remarks/>
        ACCOUNT_CANCEL,
        
        /// <remarks/>
        ACCOUNT_ACTIVE,
    }

Stacktrace:

Stack: in <0x0016f> System.Reflection.MonoField:SetValue (System.Object
obj, System.Object val, BindingFlags invokeAttr, System.Reflection.Binder
binder, System.Globalization.CultureInfo culture)
in <0x0001a> System.Reflection.FieldInfo:SetValue (System.Object obj,
System.Object value)
in <0x000b2> System.Xml.Serialization.XmlTypeMapMember:SetValue
(System.Object ob, System.Object value)
in <0x00087>
System.Xml.Serialization.XmlSerializationReaderInterpreter:SetMemberValue
(System.Xml.Serialization.XmlTypeMapMember member, System.Object ob,
System.Object value, Boolean isValueList)
in <0x01d93>
System.Xml.Serialization.XmlSerializationReaderInterpreter:ReadMembers
(System.Xml.Serialization.ClassMap map, System.Object ob, Boolean
isValueList, Boolean readByOrder)
in <0x0003c>
System.Xml.Serialization.XmlSerializationReaderInterpreter:ReadClassInstanceMembers
(System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob)
in <0x00194>
System.Xml.Serialization.XmlSerializationReaderInterpreter:ReadClassInstance
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable,
Boolean checkType)
in <0x0005f>
System.Xml.Serialization.XmlSerializationReaderInterpreter:ReadObject
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable,
Boolean checkType)
in <0x00018>
System.Xml.Serialization.XmlSerializationReaderInterpreter+ReaderCallbackInfo:ReadObject
()
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_object ()
in <0x001df>
System.Xml.Serialization.XmlSerializationReader:ReadReferencingElement
(System.String name, System.String ns, Boolean elementCanBeType,
System.String fixupReference)
in <0x00015>
System.Xml.Serialization.XmlSerializationReader:ReadReferencingElement
(System.String name, System.String ns, System.String fixupReference)
in <0x00340> System.Xml.Serialization.XmlSerializationReader:ReadList
(System.Object resultList)
in <0x00191>
System.Xml.Serialization.XmlSerializationReader:ReadReferencingElement
(System.String name, System.String ns, Boolean elementCanBeType,
System.String fixupReference)
in <0x00043>
System.Xml.Serialization.XmlSerializationReader:ReadReferencingElement
(System.String fixupReference)
in <0x00feb>
System.Xml.Serialization.XmlSerializationReaderInterpreter:ReadMembers
(System.Xml.Serialization.ClassMap map, System.Object ob, Boolean
isValueList, Boolean readByOrder)
in <0x001d4>
System.Xml.Serialization.XmlSerializationReaderInterpreter:ReadMessage
(System.Xml.Serialization.XmlMembersMapping typeMap)
in <0x000c6>
System.Xml.Serialization.XmlSerializationReaderInterpreter:ReadRoot ()
in <0x0005d> System.Xml.Serialization.XmlSerializer:Deserialize
(System.Xml.Serialization.XmlSerializationReader reader)
in <0x00040> System.Xml.Serialization.XmlSerializer:Deserialize
(System.Xml.XmlReader xmlReader)
in <0x000d9>
System.Web.Services.Protocols.WebServiceHelper:ReadSoapMessage
(System.Xml.XmlTextReader xmlReader,
System.Xml.Serialization.XmlSerializer bodySerializer,
System.Xml.Serialization.XmlSerializer headerSerializer, System.Object
body, System.Web.Services.Protocols.SoapHeaderCollection headers)
in <0x0003e>
System.Web.Services.Protocols.WebServiceHelper:ReadSoapMessage
(System.Xml.XmlTextReader xmlReader,
System.Web.Services.Protocols.SoapMethodStubInfo method,
SoapHeaderDirection dir, System.Object body,
System.Web.Services.Protocols.SoapHeaderCollection headers)
in <0x002bd>
System.Web.Services.Protocols.SoapHttpClientProtocol:ReceiveResponse
(System.Net.WebResponse response,
System.Web.Services.Protocols.SoapClientMessage message,
System.Web.Services.Protocols.SoapExtension[] extensions)
in <0x0024f> System.Web.Services.Protocols.SoapHttpClientProtocol:Invoke
(System.String method_name, System.Object[] parameters)
in <0x000c3>
ConsoleApplication1.WebReference.AdminAPIService:CommunityFindAccounts
(Int32 CommunityID, SEARCHFIELD FieldName, System.String FieldValue,
ACCOUNT_STATUS Status)
in (wrapper remoting-invoke-with-check)
ConsoleApplication1.WebReference.AdminAPIService:CommunityFind(int,ConsoleApplication1.WebReference.SEARCHFIELD,string,ConsoleApplication1.WebReference.ACCOUNT_STATUS)
in <0x004d5> ConsoleApplication1.Class1:Main (System.String[] args)



More information about the Mono-devel-list mailing list