Saturday, June 14, 2008

Python web service using SOAPPy

Here is an example of how to call a WebService from Python. For more information on Python and Web Services I recommend the following book: Python Cookbook.

This requires the fpconst and SOAPPy package. You can download them from and Unzip the packages then run python install on each package.

The following code will then connect to the web service and execute the remote method.

import sys

from SOAPpy import WSDL

url = ''
server = WSDL.Proxy(url);
print server.IsValidISBN13(sISBN ='0000000000000')

Note there is another web service package called ZSI, I found SOAPPy to be easier to use, but from what I understand both packages are going to merge together.

No comments: