If I load the XSD using the following, it can't find elements defined within the "xmldsig-core-schema.xsd" file, when I validate.
[HTML]Dim oXmlReaderSettings As New XmlReaderSettings()[/HTML]
oXmlReaderSettings.ProhibitDtd = False
'-- Set for schema validation
oXmlReaderSettings.ValidationType = ValidationType.Schema
oXmlReaderSettings.Schemas.Add(Nothing, "WS-TDL.xsd")
Dim oRequestReader As New StringReader(...
Dim oPayloadXmlReader As XmlReader = XmlReader.Create(oRequestReader, oSchemasSettings
If I explicitly load the xsd from the web, I can validate except when the doc has a element which requires a definition that is in the XSD on the web.
FOR example:
-- Load xsd
' do something like the following to explicitly load the xsdI get the following type of error
oXmlReaderSettings.Schemas.Add(Nothing,
http://www.w3.org/TR/2002/REC-xmldsi...re-schema.xsd)
The element 'X509IssuerSerial' has invalid child element 'X509IssuerName'. List of possible elements expected: 'X509IssuerName' in namespace 'http://www.w3.org/2000/09/xmldsig#'.
Any Ideas as to why this is or how to correct the problem? (WS-TDL.XSD file being loaded is listed below)
[HTML]
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:aix_tdl="http://www.accessitx.com/TDL_Interface" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd" />
<xs:import namespace="http://www.accessitx.com/TDL_Interface" schemaLocation="TDL_Interface.xsd" />
<xs:complexType name="TDLRequest_DateType">
<xs:sequence>
<xs:element name="StartDate" type="xs:dateTime" />
<xs:element name="EndDate" type="xs:dateTime" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="TDLRequest_SNType">
<xs:sequence>
<xs:element name="SerialNumber" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="TDLRequest_X509NameType">
<xs:sequence>
<xs:element name="X509IssuerSerial" type="ds:X509IssuerSerialType" minOccurs="0" />
<xs:element name="X509SubjectName" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="TDLRequest_All">
<xs:sequence>
<xs:element name="All" />
</xs:sequence>
</xs:complexType>
<xs:element name="TDLRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="SequenceID" type="xs:long" />
<xs:element name="UserNameToken" type="xs:base64Binary" />
<xs:element name="RequestPayload" type="TDLRequest_PayloadType" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="TDLRequest_PayloadType">
<xs:choice>
<xs:element name="CertificationDateRange" type="TDLRequest_DateType" />
<xs:element name="InstallationDateRange" type="TDLRequest_DateType" />
<xs:element name="ChangedDateRange" type="TDLRequest_DateType" />
<xs:element name="SerialNo" type="TDLRequest_SNType" />
<xs:element name="X509Name" type="TDLRequest_X509NameType" />
<xs:element name="All" type="TDLRequest_All" />
</xs:choice>
</xs:complexType>
<xs:complexType name="tdlAction">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="scope" type="xs:anyURI" use="optional" default="http://www.accessitx.com/TDL_Interface#action" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:element name="TDLUpdate">
<xs:complexType>
<xs:sequence>
<xs:element name="SequenceID" type="xs:long" />
<xs:element name="UserNameToken" type="xs:base64Binary" />
<xs:element name="UpdatePayload">
<xs:complexType>
<xs:sequence>
<xs:element name="Action" type="tdlAction" />
<xs:choice>
<xs:element name="Add">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="Site" type="aix_tdl:FacilityType" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Update">
<xs:complexType>
<xs:sequence>
<xs:element name="Old_Site" type="aix_tdl:FacilityType" />
<xs:element name="New_Site" type="aix_tdl:FacilityType" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Delete">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="Site" type="aix_tdl:FacilityType" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TDLResponse">
<xs:complexType>
<xs:choice>
<xs:element name="Ack" />
<xs:element name="Sites" type="aix_tdl:FacilityType" maxOccurs="unbounded" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
[/HTML]