Web Services Description Language (WDSL), originally developed by IBM, Microsoft, and others, is an XML format for technical description of Web services. In this tutorial, Mike Olson and Uche Ogbuji introduce WSDL4Py, an open-source Python library for WSDL 1.1 hosted by IBM developerWork’s open-source zone. Usage of the library is explained, as well as discussion of its development.

Setting up WSDL4Py
The prerequisites for using the WSDL4Py library and the examples in this tutorial are as follows:
*A working knowledge of the Python programming language, and WSDL.
*Python: version 2.0 or more recent is highly recommended, but 1.5.2 will work as well.
*4Suite: version 0.11 or more recent. The software should work under UNIX and Windows. Unfortunately, Macintosh users must wait for someone to port the XPath library of 4Suite to that platform, or wait for 4Suite-0.11.1 that will have a pure Python XPath parser

Installation is quite simple. Download and unpack the archive, then run the command python setup.py install, which will copy the library to the appropriate location in your PYTHONPATH. To test the installation, run the following command:
$ python -c “import wsdllib”

Reading WSDL descriptions
WSDL provides the means of giving descriptions to Web services. These descriptions are normally stored in a UDDI registry so that they can be looked up by other services. For the sake of simplicity in our examples, we will consider a standalone implementation without the use of a UDDI registry. The first use of the WSDL library implemented in our project is to read and parse the contents of the WSDL description for a service.

Download pdf Processing WSDL in Python