I have written webservices clients for many webservices over the years and almost all the time I am given an XSD in addition to the WSDL and I use this XSD more than the WSDL to understand the webservice.
However I have never created a webservice . I have done lots of tutorials and simple as they are non involved producing an XSD.
Can some please tell me how do I produce an XSD for a webservice that I have created.
The Types
element of a WSDL is the XSD. That is the type system WSDL uses. It's actually part of the WSDL specification. It's possible to use other typing systems, but XSD is the standard and I've never seen anything else used in its place.
Many if not most web service libraries will just jam everything into one flat WSDL, but if you're using WCF with data contracts (the default), it will actually surface the XSD files separately, and you'll see them as xsd:import
directives. Otherwise, just copy what's inside <wsdl:types>
, slap on a declaration, save it with an .xsd
extension, and there's your schema.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With