XML stands for "Extensible Markup Language". It is used to describe things.
For example, the following XML describes a "contact":
-
<?xml version="1.0"?>
-
<contact>
-
<name>Frinavale Soldevi</name>
-
<company>Bytes.com</company>
-
<phone>(555)555-5555</phone>
-
</contact>
-
As you can see the, the XML marks up a contact and indicates the contact's name, company and phone number.
WSDL (Web Services Description Language) uses XML to describe functionality offered by a web service.
When you create a web service, you need to create a WSDL file that contains XML describe the methods offered by the web service.
Once you have created this, a client that consumes the web service will read the WSDL file in order to be able to call methods offered by the web service.
It is a vital component of web services since it contains information for clients that is necessary for them to be able to consume the web service's functionality.
So, the difference between WSDL and XML is this:
- XML is a markup language used to describe things
- WSDL is a file that uses XML to describe services offered by a web service
-Frinny