Web Services Question:
Download Questions PDF

What is WSDL?


Answer #1
The Web Services Description Language (WSDL) currently represents the service description layer within the Web service protocol stack.
In a nutshell, WSDL is an XML grammar for specifying a public interface for a Web service. This public interface can include the following:

Information on all publicly available functions.
Data type information for all XML messages.
Binding information about the specific transport protocol to be used.
Address information for locating the specified service.

WSDL is not necessarily tied to a specific XML messaging system, but it does include built-in extensions for describing SOAP services.

Below is a sample WSDL file. This file describes the public interface for the weather service used in the SOAP example above. Obviously, there are many details to understanding the example. For now, just consider two points.
First, the <message> elements specify the individual XML messages that are transferred between computers. In this case, we have a getWeatherRequest and a getWeatherResponse. Second, the element specifies that the service is available via SOAP and is available at a specific URL.

Answer #2
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="WeatherService"
<message name="getWeatherRequest">
<part name="zipcode" type="xsd:string"/>
<message name="getWeatherResponse">
<part name="temperature" type="xsd:int"/>

<portType name="Weather_PortType">
<operation name="getWeather">
<input message="tns:getWeatherRequest"/>
<output message="tns:getWeatherResponse"/>

<binding name="Weather_Binding" type="tns:Weather_PortType">
<soap:binding style="rpc"
<operation name="getWeather">
<soap:operation soapAction=""/>

Answer #3
<service name="Weather_Service">
<documentation>WSDL File for Weather Service</documentation>
<port binding="tns:Weather_Binding" name="Weather_Port">

Using WSDL, a client can locate a Web service, and invoke any of the publicly available functions. With WSDL-aware tools, this process can be entirely automated, enabling applications to easily integrate new services with little or no manual code. For example, check out the GLUE platform from the Mind Electric.
WSDL has been submitted to the W3C, but it currently has no official status within the W3C. See this W3C page for the latest draft.

Download Web Services Interview Questions And Answers PDF

Previous QuestionNext Question
What is SOAP?What is UDDI?