There is a schema (xsd file) located on a web address that I want to use to
validate xml files sent my webservice. I'd like that schema to be part of the
wsdl of my web service. I could create an class file using xsd.exe and use it
in the web service, but the problem with that is that the schema could change
since I am not the author of the schema, but I am expected to receive and
validate xml files formatted for that schema.
How could I create my web service to "publish" the "dynamic" schema as part
of the wsdl of my web service?
Thanks,
Jhgonzales
Bill Priess (MCP) - 15 Aug 2005 23:29 GMT
Just my 2 cents, BUT...
I'm not 100% certain that you can add external schemas to your WSDL (I've
never seen or heard of it being done, but that doesn't mean that I am
right.. lol), but there is no reason why your web service could not do the
validation itself. Consider re-architecting the web service to receieve an
xml file (or string) and do the validation on the web service side rather
than the client.
HTH,
Bill Priess, MCP
> There is a schema (xsd file) located on a web address that I want to use
> to
[quoted text clipped - 13 lines]
> Thanks,
> Jhgonzales
jhgonzales - 16 Aug 2005 02:19 GMT
I haven't heard or found of anyone doing this either. I wanted to get fancy
with the web service and expose the schema in the wsdl and enable schema
validation in the web service so as to keep me from having to validate the
document myself.
That is the direction I was going to use if there was no other option, I
should have mentioned that :)
Thanks for the response.
Regards,
JHGonzales
> Just my 2 cents, BUT...
>
[quoted text clipped - 25 lines]
> > Thanks,
> > Jhgonzales
EJSawyer - 23 Aug 2005 15:49 GMT
It's not as simple as just adding the XSD file itself to the WSDL, but by
linking into the WSDL-generation system of ASP.Net, you can do it.
Look at the following articles:
http://msdn.microsoft.com/msdnmag/issues/03/07/XMLSchemaValidation/default.aspx
http://msdn.microsoft.com/msdnmag/issues/03/08/BusinessRules/default.aspx
Erik J Sawyer
CFT Programmer
Appro Systems
> There is a schema (xsd file) located on a web address that I want to use to
> validate xml files sent my webservice. I'd like that schema to be part of the
[quoted text clipped - 8 lines]
> Thanks,
> Jhgonzales