WSDL stands for Web Services Definition Language.
It is written in XML.
Basically, a WSDL is a contract between a service requester and a service provider.It contains information such as Interface, Data type, binding and address. Using a WSDL, a user can locate a web service and its publicly available functions/interfaces.It can also be used to integrate different services.
There are 6 major elements in a WSDL document.
It is written in XML.
Basically, a WSDL is a contract between a service requester and a service provider.It contains information such as Interface, Data type, binding and address. Using a WSDL, a user can locate a web service and its publicly available functions/interfaces.It can also be used to integrate different services.
There are 6 major elements in a WSDL document.
- definitions: It is the root element for all the WSDL documents. It defines name of web service, declares namespaces and also contains all service elements.
- types: It contains all the data types used between server and client. WSDL is not bound to specific typing system, but by default it is W3C XML schema specifications.
- message: It describes a one-way message( either request or response). It defines name of the message and message part elements.
- port type: It combines multiple messages with different operations that can be performed on those messages. the operation types include (1) one-way (2) request-response (3) Solicit response and (4) Notification.
- binding: It describes how the service will be implemented on the wire. So the SOAP specific information goes in here. It basically contains 2 attributes (1) name and (2) type. "name" attribute defines the name of the binding and "type" attribute points to the port that is used for binding.
- service: It defines the address for invoking the specific service.
In addition to these six major elements, WSDL also has 2 more utility elements:
- documentation: It is used for providing human readable documentation and can be used in any other WSDL documents.
- import: The import element is used to import other WSDL documents or XML Schemas. This enables more modular WSDL documents. For example, two WSDL documents can import the same basic elements and yet include their own service elements to make the same service available at two physical addresses.