Re: XmlSchemaCollection and schema imports question
- From: Jiho Han <jihohan@xxxxxxxxx>
- Date: Fri, 11 Aug 2006 18:14:55 +0000 (UTC)
Actually, I am loading the wsdl by using ServiceDescription class.
I haven't used XmlUrlResolver.
Would you have any sample code for this? (even if pseudo)
Thanks
Jiho
"Jiho Han" <jihohan@xxxxxxxxx> wrote in message
news:a19ab9b6217138c88ab23f375434@xxxxxxxxxxxxxxxxxxxxxxx
I am trying to validate a document against a set of schema [they areDo you have access to the WSDL and to the schemas it references?
part
of a wsdl] and in order to do that, I am using
XmlValidatingReader.Schemas.Add to add the schemas.
However, since there are dependencies, the framework is crapping out
(technical term) saying that the referenced type is not available.
Well,
the type is defined in the other schema which it imports. How do I
get
these schemas in there first and then have it validate so the
reference is
not checked until all the schemas are loaded?
BTW, this is on .NET 1.1.
If so, you can load the WSDL into a ServiceDescription object. This
will give you access to the schema locations by following the
wsdl:import and wsdl:types/xs:schema elements. You can then load them
into XslSchema objects using an XmlUrlResolver configured to permit
access to the domain of the schemas.
John
.
- References:
- Re: XmlSchemaCollection and schema imports question
- From: John Saunders
- Re: XmlSchemaCollection and schema imports question
- Prev by Date: Re: What is the best way to parse and validate an arbitary XML documen
- Next by Date: XPath as XML attribute
- Previous by thread: Re: XmlSchemaCollection and schema imports question
- Next by thread: Validate Values
- Index(es):
Relevant Pages
|
Loading