-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major
-
None
See WSBRSP-1 issue for initial description.
Here is a more detailed investigation:
The failure of TA BP2122 is generated under this code (though deeper, can't see the actual exception text):
wsdlCache.SchemaCache.ValidateSchema(schemaDoc, true);
in:
public class BP2122
in:
D:\...\WS-I-CVS\test-tools\cs\src\WSITest-Assertions\WsdlAssertions.cs
The collection of schema elements from WSDL seems to be done correctly (does not assume they each have a unique namespace.)
In:
InnerList.Add(schema);
In:
SchemaCache.GetWsdlSchemaDocuments()
In:
D:\...\WS-I-CVS\test-tools\cs\src\WSITest-AnalyzerCore\Collections.cs
But In SchemaCache.cs, there is reliance on namespace uniqueness, when validating against a schema:
public XmlDocumentSchema GetSchemaDocument(XmlNode referenceNode, bool includeErrorDocs)
especially clearly only returns the first schema that matches namespace in:
public XmlDocumentSchema GetSchemaDocumentByNamespace(string targetNamespace, bool includeErrorDocs)
So:
wsdlCache.SchemaCache.ValidateSchema(schemaDoc, true);
In:
WsdlAssertions.cs
IS not finding the right schema, always validating against the first namespace match...
I suspect it might actually be easier to do the real fix: keep iterating until the right schema matching same namespace is found (if any) and validates successfully. Maybe Gerwin could do the fix...
It could require implementing an additional version of GetSchemaDocument(), that takes an integer "nth" meaning to take the nth occurrence of schema with same namespace, if any:
public XmlDocumentSchema GetSchemaDocument(XmlNode referenceNode, bool includeErrorDocs, int nth)