what is the difference between XSD and WSDL

make picture make · Dec 23, 2009 · Viewed 230.4k times · Source

What is the difference between an XML Schema and WSDL?

The difference I noticed is that WSDL contains XSD and in WSDL we can declare operations, but not in XSD. Is that correct?

Answer

marc_s picture marc_s · Dec 23, 2009

WSDL (Web Services Description Language) describes your service and its operations - what is the service called, which methods does it offer, what kind of in parameters and return values do these methods have?

It's a description of the behavior of the service - it's functionality.

XSD (Xml Schema Definition) describes the static structure of the complex data types being exchanged by those service methods. It describes the types, their fields, any restriction on those fields (like max length or a regex pattern) and so forth.

It's a description of datatypes and thus static properties of the service - it's about data.