[Mono-aspnet-list] XmlSchema error: xxx was already contained in the schema object table

Devin Venable venable.devin at gmail.com
Thu Sep 2 16:10:09 EDT 2010


Is this runtime error a bug? (below)

Multiple web methods have the same complex return type.  I can't find
any other reason for it, because the complex type is only defined
once.

This looks similar:

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

Stated reason:
Cause:
When validating second document schema2's types are already compiled and
validated. However, checking IsCompiled the second time returns false since we
have a new validationId on the schema. The result is that schema2's types are
compiled again. On a XmlSchemaComplexType the attributeUses collection then
already contains the results from the previous validation. When validated
again, the above Exception is thrown.

Solution:
Clear XmlSchemaComplexType.attributeUses before Compilation. The patch
is a one liner. Add
attributeUses.Clear()
in the beginning of XmlSchemaComplexType.Compile.


---

XmlSchema error: Named item
http://tempuri.org/:GetEnrollmentAcknowledgementsResponse was already
contained in the schema object table. Related schema item SourceUri: ,
Line 0, Position 0.

Description: HTTP 500. Error processing request.

Stack Trace:

System.Xml.Schema.XmlSchemaException: XmlSchema error: Named item
http://tempuri.org/:GetEnrollmentAcknowledgementsResponse was already
contained in the schema object table. Related schema item SourceUri: ,
Line 0, Position 0.
 at System.Xml.Schema.ValidationHandler.RaiseValidationEvent
(System.Xml.Schema.ValidationEventHandler handle, System.Exception
innerException, System.String message,
System.Xml.Schema.XmlSchemaObject xsobj, System.Object sender,
System.String sourceUri, XmlSeverityType severity) [0x00000]
 at System.Xml.Schema.XmlSchemaObject.error
(System.Xml.Schema.ValidationEventHandler handle, System.String
message, System.Exception innerException,
System.Xml.Schema.XmlSchemaObject xsobj, System.Object sender)
[0x00000]
 at System.Xml.Schema.XmlSchemaObject.error
(System.Xml.Schema.ValidationEventHandler handle, System.String
message) [0x00000]
 at System.Xml.Schema.XmlSchemaUtil.AddToTable
(System.Xml.Schema.XmlSchemaObjectTable table,
System.Xml.Schema.XmlSchemaObject obj, System.Xml.XmlQualifiedName
qname, System.Xml.Schema.ValidationEventHandler h) [0x00000]
 at System.Xml.Schema.XmlSchema.DoCompile
(System.Xml.Schema.ValidationEventHandler handler,
System.Collections.Hashtable handledUris,
System.Xml.Schema.XmlSchemaSet col, System.Xml.XmlResolver resolver)
[0x00000]
 at System.Xml.Schema.XmlSchema.CompileSubset
(System.Xml.Schema.ValidationEventHandler handler,
System.Xml.Schema.XmlSchemaSet col, System.Xml.XmlResolver resolver,
System.Collections.Hashtable handledUris) [0x00000]
 at System.Xml.Schema.XmlSchemaSet.Compile () [0x00000]
 at System.Xml.Schema.XmlSchema.Compile
(System.Xml.Schema.ValidationEventHandler handler,
System.Xml.XmlResolver resolver) [0x00000]
 at System.Xml.Schema.XmlSchema.Compile
(System.Xml.Schema.ValidationEventHandler handler) [0x00000]
 at System.Xml.Serialization.XmlSchemas.Find
(System.Xml.Schema.XmlSchema schema, System.Xml.XmlQualifiedName name,
System.Type type) [0x00000]
 at System.Xml.Serialization.XmlSchemas.Find
(System.Xml.XmlQualifiedName name, System.Type type) [0x00000]
 at ASP.DefaultWsdlHelpGenerator_aspx.BuildParameters
(System.Collections.ArrayList list,
System.Web.Services.Description.OperationMessage opm) [0x0008b] in
/home/dvenable/Projects/TestSOAP2/TestSOAP2/DefaultWsdlHelpGenerator.aspx:165
 at ASP.DefaultWsdlHelpGenerator_aspx.BuildOperationInfo () [0x000b9]
in /home/dvenable/Projects/TestSOAP2/TestSOAP2/DefaultWsdlHelpGenerator.aspx:119
 at ASP.DefaultWsdlHelpGenerator_aspx.Page_Load (System.Object
sender, System.EventArgs e) [0x00134] in
/home/dvenable/Projects/TestSOAP2/TestSOAP2/DefaultWsdlHelpGenerator.aspx:82
 at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
 at System.Web.UI.Control.LoadRecursive () [0x00000]
 at System.Web.UI.Page.ProcessLoad () [0x00000]
 at System.Web.UI.Page.ProcessPostData () [0x00000]
 at System.Web.UI.Page.InternalProcessRequest () [0x00000]
 at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext
context) [0x00000]

________________________________
Version information: Runtime: Mono 2.4.4; ASP.NET Version: 2.0.50727.1433


More information about the Mono-aspnet-list mailing list