Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 10th, 2006, 09:35 PM
Jiho Han
Guest
 
Posts: n/a
Default XmlSchemaCollection and schema imports question

I am trying to validate a document against a set of schema [they are 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.
Thanks

Jiho Han
Senior Software Engineer
Infinity Info Systems
The Sales Technology Experts
Tel: 212.563.4400 x216
Fax: 212.760.0540
jhan@infinityinfo.com
www.infinityinfo.com


  #2  
Old August 11th, 2006, 06:45 PM
John Saunders
Guest
 
Posts: n/a
Default Re: XmlSchemaCollection and schema imports question

"Jiho Han" <jihohan@yahoo.comwrote in message
news:a19ab9b6217138c88ab23f375434@msnews.microsoft .com...
Quote:
>I am trying to validate a document against a set of schema [they are 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.
Do you have access to the WSDL and to the schemas it references?

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


  #3  
Old August 11th, 2006, 07:15 PM
Jiho Han
Guest
 
Posts: n/a
Default Re: XmlSchemaCollection and schema imports question

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
Quote:
"Jiho Han" <jihohan@yahoo.comwrote in message
news:a19ab9b6217138c88ab23f375434@msnews.microsoft .com...
>
Quote:
>I am trying to validate a document against a set of schema [they are
>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.
>>
Do you have access to the WSDL and to the schemas it references?
>
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
>

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles