WSDL

WSDL (which stands for Web Services Definition Language or Web Services Description Language) is an XML-based language for describing and locating web services. WSDL is a World Wide Web Consortium recommendation. The term WSDL is often used to mean the description of a specific web service, as in, The WSDL for that web service describes three web service methods, or referring generically to a document implemented in WSDL.

The WSDL document describes a web service using these major elements:

  • <types> - a description of the data elements and type(s) used by the web service;
  • <message> - a description of the data used by each operation available in the web service;
  • <portType> - a description of the operations performed by the web service; and
  • <binding> - a description of the message format and communication protocols used for each <portType>.
In the RPC pattern:
  • The <portType> element describes the functions, or methods, that are available in the web service.
  • The <message> section describes the input and output parameters.
  • The <types> section describes those parameters.
It is not unusual for RPC pattern WSDLs to be derived from underlying functions in standard programming languages, the so-called bottom-up approach.

In the document-based pattern, WSDLs are often developed by system architects using a top-down approach, before any implementation of the service or the clients of the service. Any documents exchanged are typically designed before the WSDLs that use them. These documents are described using XML Schema, another XML-based language used to describe XML documents. The <types> section of a WSDL is actually an embedded XML Schema document. WSDL has an import capability that allows importation of externally defined XML Schema documents.