[Mono-bugs] [Bug 421268] New: [regression] web services with methods returning IList<T> fail
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Aug 28 22:01:47 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=421268
Summary: [regression] web services with methods returning
IList<T> fail
Product: Mono: Class Libraries
Version: SVN
Platform: x86-64
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Web.Services
AssignedTo: atsushi at ximian.com
ReportedBy: mmorano at mikeandwan.us
QAContact: mono-bugs at lists.ximian.com
Found By: ---
I have a website that has a fairly simple webservice with a number of methods
that return IList<T>. The website is making use of the asp.net ajax framework
to provide a js proxy around a web service. In prior versions of mono, I have
been able to access this web service without any issue. Now, when I try to
access it through the js proxy, or the test asmx page itself, it fails with the
following exception:
Server Error in '/' Application
To be XML serializable, types which inherit from ICollection must have an
implementation of Add(MikeAndWanUS.Data.Pictures.PictureYear) at all levels of
their inheritance hierarchy.
System.Collections.Generic.IList`1[[MikeAndWanUS.Data.Pictures.PictureYear,
App_Code.5034de6d, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]] does
not implement Add(MikeAndWanUS.Data.Pictures.PictureYear).
Description: HTTP 500. Error processing request.
Stack Trace:
System.InvalidOperationException: To be XML serializable, types which inherit
from ICollection must have an implementation of
Add(MikeAndWanUS.Data.Pictures.PictureYear) at all levels of their inheritance
hierarchy.
System.Collections.Generic.IList`1[[MikeAndWanUS.Data.Pictures.PictureYear,
App_Code.5034de6d, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]] does
not implement Add(MikeAndWanUS.Data.Pictures.PictureYear).
at System.Xml.Serialization.TypeData.get_ListItemType () [0x00000]
at System.Xml.Serialization.TypeData.get_ListItemTypeData () [0x00000]
at System.Xml.Serialization.TypeData..ctor (System.Type type, System.String
elementName, Boolean isPrimitive, System.Xml.Serialization.TypeData mappedType,
System.Xml.Schema.XmlSchemaPatternFacet facet) [0x00000]
at System.Xml.Serialization.TypeData..ctor (System.Type type, System.String
elementName, Boolean isPrimitive) [0x00000]
at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type
runtimeType, System.String xmlDataType) [0x00000]
at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type type)
[0x00000]
at System.Xml.Serialization.XmlReflectionImporter.CreateMapMember
(System.Type declaringType, System.Xml.Serialization.XmlReflectionMember
rmember, System.String defaultNamespace) [0x00000]
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping
(System.String elementName, System.String ns,
System.Xml.Serialization.XmlReflectionMember[] members, Boolean
hasWrapperElement, Boolean writeAccessors, Boolean validate, XmlMappingAccess
access) [0x00000]
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping
(System.String elementName, System.String ns,
System.Xml.Serialization.XmlReflectionMember[] members, Boolean
hasWrapperElement, Boolean writeAccessors, Boolean validate) [0x00000]
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping
(System.String elementName, System.String ns,
System.Xml.Serialization.XmlReflectionMember[] members, Boolean
hasWrapperElement, Boolean writeAccessors) [0x00000]
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping
(System.String elementName, System.String ns,
System.Xml.Serialization.XmlReflectionMember[] members, Boolean
hasWrapperElement) [0x00000]
at System.Web.Services.Protocols.SoapMethodStubInfo..ctor
(System.Web.Services.Protocols.TypeStubInfo typeStub,
System.Web.Services.Protocols.LogicalMethodInfo source, System.Object kind,
System.Xml.Serialization.XmlReflectionImporter xmlImporter,
System.Xml.Serialization.SoapReflectionImporter soapImporter) [0x00000]
at System.Web.Services.Protocols.SoapTypeStubInfo.CreateMethodStubInfo
(System.Web.Services.Protocols.TypeStubInfo parent,
System.Web.Services.Protocols.LogicalMethodInfo lmi, Boolean isClientProxy)
[0x00000]
at System.Web.Services.Protocols.TypeStubInfo.BuildTypeMethods () [0x00000]
at System.Web.Services.Protocols.TypeStubInfo.Initialize () [0x00000]
at System.Web.Services.Protocols.LogicalTypeInfo.CreateTypeStubInfo
(System.Type type) [0x00000]
at System.Web.Services.Protocols.LogicalTypeInfo.GetTypeStub (System.String
protocolName) [0x00000]
at System.Web.Services.Protocols.TypeStubManager.GetTypeStub (System.Type t,
System.String protocolName) [0x00000]
at System.Web.Services.Protocols.SoapDocumentationHandler..ctor (System.Type
type, System.Web.HttpContext context) [0x00000]
at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler
(System.Web.HttpContext context, System.String verb, System.String url,
System.String filePath) [0x00000]
at System.Web.Script.Services.ScriptHandlerFactory.GetHandler
(System.Web.HttpContext context, System.String requestType, System.String url,
System.String pathTranslated) [0x00000]
at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context,
System.String url, Boolean ignoreContextHandler) [0x00000]
at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context,
System.String url) [0x00000]
at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext () [0x00000]
Version information: Mono Version: 2.0.50727.1433; ASP.NET Version:
2.0.50727.1433
If I change the signature of the methods to use List<T>, it seems to work just
fine.
Thanks,
Mike
--
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