Search code examples
web-serviceswsdlxsd

What is the difference between XSD and WSDL?


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?


Solution

  • XSD defines a schema which is a definition of how an XML document can be structured. You can use it to check that a given XML document is valid and follows the rules you've laid out in the schema.

    WSDL is a XML document that describes a web service. It shows which operations are available and how data should be structured to send to those operations.

    WSDL documents have an associated XSD that show what is valid to put in a WSDL document.