WSDL

From DataFlex Wiki
Revision as of 17:00, 1 December 2007 by Mikepeat (talk | contribs) (Sytarted)
Jump to navigationJump to search

WSDL [1] - Web Service Description Language - is the mechanism for specifying the contract that a service offers to its clients. It is an XML dialect and either pronounced with the letters in full or as "wiz-dul".

WSDL is most commonly automatically generated by the service software - this is the case with Visual DataFlex - but in some cases, where the software used does not provide this capability, it may be hand-written. This latter case can produce some very idiosyncratic and non-standard WSDL that causes problems for service consumers.

Structure

WSDL can be quite formidable to understand for those not used to looking at such things. Probably the easiest way to get to grips with is is to break it down into its various components.

After any initial processing instruction (<?xml version="1.0" encoding="UTF-8"?> or similar) there wil be the outer description element, which will typically also define a number of namespaces that will be used in the document.

Within that there will (usually, and in WSDL 1.1) be four or five main sections:

  • types - only one element (optional) describing the extended data types used by the service
  • message - defining the in and out messages used by the service's operations
  • portType - defining the abstract definition of the service
  • binding - providing a link between the abstract definition and the concrete implementation
  • service - the concrete specification of a service

This arrangement is convenient for machines to read, as each part is defined prior to encountering the parts that use it, but it is confusing for humans, so for that reason we will deal with those sections in reverse order.

The description element

The service element

The bindng element

the portType element

The message elememt

The types element

Old Article

a wsdl file can be used to generate "stub" code that can access the webservice.

http://www.w3.org/TR/wsdl