Appendix H. WSDL

The need for the Web services Description Language (WSDL) specification arose from the need to standardize the Web service technology stack.

Microsoft’s service description languages Service Description Language (SDL) and Service Control Language (SCL) and IBM’s NASSL have been unified to form anew language called WSDL. WSDL is an eXtended Markup Language (XML) format for defining Web services and describing how to interact with them. In other words, WSDL defines the interface and the mechanics of service interaction.

As explained by W3C — “WSDL is an XML document for describing Web services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information.”

A WSDL document is used to specify the location of a Web service and the interface used to interact with it. Operations in a WSDL document can be document oriented or Remote Procedure Call (RPC)-oriented. The document-oriented operation is characterized by exchange of XML documents between the client and service. Both the input and output messages, in this case, contain XML documents. In an RPC-oriented operation, on the other hand, the input message contains input parameters, and the output message contains output parameters.

The WSDL specification provides several elements and attributes to define a Web service. The elements are of two types

  • Abstractplatform- and language-independent elements, e.g., types, message, portType

  • Concretesite-specific, machine-specific, or language-specific, e.g., binding, service

Here is a brief description of elements in a WSDL document:

<definitions>

This is root element of WSDL file that includes namespace definitions and contains other elements of the WSDL.

<definitions name =’HelloWorldService’ 
   xmlns=’http://schemas.xmlsoap.org/wsdl/’> 
    <service name=’HelloWorldService’ > 
       ... 
    </service> 
</definitions> 

<service>

A service element is used to collect a set of related ports. A service may be accessible on many ports: via SOAP, HTTP-GET etc.

<types>

The types element describes the different data types used to describe the messages exchange. XSD predefined types, e.g., xsd:int can be used or user defined can be used.

<message>

Specifies the XML data types that constitute various parts of a message. It is protocol-independent and may be used with SOAP, HTTP-GET or any other protocol. It is used to define the input and output parameters of an operation.

<operation>

Includes input and output messages of the operation/method forms a request-response pair corresponding to a method call.

<portType>

The methods of a Web service are described in the portType element. Identifies a set of operations and the input and output messages involved with each of those operations.

<binding>

The binding element describes concrete aspects of an operation such as the protocol, data format, security, and other attributes.

<port>

The port element defines the single communication endpoint by specifying the address for binding. It associates this address with the binding element from service interface definition. Each port has a unique name and a binding attribute and supports a different protocol.

For more information on WSDL: http://www.w3.org/TR/wsdl

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset