XML Data Validation - Referenced By WSDL File

D

Daniel Lee

I have two XSD files, one defines the message format and the other is a
common type definition. The XSD files are referenced using xs:import.
The wsdl file is generated by a tool, ThinkTeture Web Services
Contract-First(WSCF).

For example, this is the definition of some type
<xs:simpleType name="SomeType">
<xs:restriction base="xs:string">
<xs:minLength value="1" />
<xs:maxLength value="10" />
<xs:pattern value="([0-9a-zA-Z]*)" />
</xs:restriction>
</xs:simpleType>

In the past, I've been using XMLValidatingReader to verify the xml data
using XSD.

However, the webservice defines the object and refereces XSD files. How do
I use the XSD file to validate the request data on the provider side


Thanks

Daniel
 
J

John Saunders

Daniel Lee said:
I have two XSD files, one defines the message format and the other is a
common type definition. The XSD files are referenced using xs:import.
The wsdl file is generated by a tool, ThinkTeture Web Services
Contract-First(WSCF).

For example, this is the definition of some type
<xs:simpleType name="SomeType">
<xs:restriction base="xs:string">
<xs:minLength value="1" />
<xs:maxLength value="10" />
<xs:pattern value="([0-9a-zA-Z]*)" />
</xs:restriction>
</xs:simpleType>

In the past, I've been using XMLValidatingReader to verify the xml data
using XSD.

However, the webservice defines the object and refereces XSD files. How
do
I use the XSD file to validate the request data on the provider side

Daniel, I've just gotten through doing this on the server side by using a
SoapExtension. I believe this could work for a .NET client as well.

I used an example from MSDN. I suggest you go to http://msdn.microsoft.com
and do a search for "xml validation web service soap extension" (without the
quotes). You'll get back a screen full of useful information.

John
 
D

Daniel Lee

John,
Thanks for your information. I was reading one article from developmentor
and detailed the implementation. BTW, my client is using XML frontend
processor(forum's Sentry) to handle the web service. I have to make sure
everything is WS-I compliant.




John Saunders said:
Daniel Lee said:
I have two XSD files, one defines the message format and the other is a
common type definition. The XSD files are referenced using xs:import.
The wsdl file is generated by a tool, ThinkTeture Web Services
Contract-First(WSCF).

For example, this is the definition of some type
<xs:simpleType name="SomeType">
<xs:restriction base="xs:string">
<xs:minLength value="1" />
<xs:maxLength value="10" />
<xs:pattern value="([0-9a-zA-Z]*)" />
</xs:restriction>
</xs:simpleType>

In the past, I've been using XMLValidatingReader to verify the xml data
using XSD.

However, the webservice defines the object and refereces XSD files. How
do
I use the XSD file to validate the request data on the provider side

Daniel, I've just gotten through doing this on the server side by using a
SoapExtension. I believe this could work for a .NET client as well.

I used an example from MSDN. I suggest you go to http://msdn.microsoft.com
and do a search for "xml validation web service soap extension" (without the
quotes). You'll get back a screen full of useful information.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top