Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to produce XSD for a SOAP Webservice

Tags:

web-services

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.

like image 681
Java Ka Baby Avatar asked Aug 07 '11 03:08

Java Ka Baby


1 Answers

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.

like image 79
Aaronaught Avatar answered Oct 26 '22 22:10

Aaronaught