Saturday, November 29, 2008

WSDL and Web Services

As we are in the process of SCI-Flex we always met WSDL(Web Service Descriptive Language) everywhere, Hence I ll do some explanation about WSDL in brief. Since I have already blogged about SOAP, it may be helpful to you as there is an essential interconnectivity between SOAP and WSDL.

WSDL (Web Services Description Language) is an XML-based language for describing Web services and how to access them.As the name implies the WSDL is used to describe the web services, how it is happening is like WSDL is a document written in XML.

The document describes a Web service. It specifies the location of the service and the operations (or methods) the service exposes.The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. Related concrete endpoints are combined into abstract endpoints (services). WSDL is extensible to allow description of endpoints and their messages regardless of what message formats or network protocols are used to communicate.

It is happy to say that The WSDL 2.0 specification was published as a W3C Recommendation on June 26, 2007.

WSDL Document Structure

A WSDL document is simply a set of definitions. There is a definitions element at the root, and definitions inside. The grammar is as follows:

  • types, which provides data type definitions used to describe the messages exchanged.

  • message, which represents an abstract definition of the data being transmitted. A message consists of logical parts, each of which is associated with a definition within some type system.

  • portType, which is a set of abstract operations. Each operation refers to an input message and output messages.

  • binding, which specifies concrete protocol and data format specifications for the operations and messages defined by a particular portType.

  • port, which specifies an address for a binding, thus defining a single communication endpoint.

  • service, which is used to aggregate a set of related ports.

See an example of WSDL document just to clarify more on what I have told above.

No comments: