Updated: 6/13/2002; 12:49:58 PM.
Web Services
XML-RPC and SOAP web services. Most of the focus will be on client-side issues, especially with Python.
        

Wednesday, June 12, 2002

XML-RPC server in PythonCard 0.6.7

A new release of PythonCard should be out in the next couple of days. You can download it from cvs now if you don't want to wait. Among the many new samples is a GUI front-end to the web server that comes with the Python Standard Libraries. In addition to serving files, the webserver sample can do CGI, so it is a great way to get a web server up quickly on your desktop; all you have to do is double-click the script. Several example CGI scripts are included with the server.

I added Mark Pilgrim's PyWebServices scripts, so the webserver can act as an XML-RPC server too. After starting up the webserver sample you can test the XML-RPC server capabilities by running the radioclient sample, which automatically shows the shell and imports the xmlrpclib module. Then try this in the shell:

>>> server = xmlrpclib.Server('http://localhost/cgi-bin/webservices.py')
>>> server.system.listMethods()
{'sample.helloWorld()': 'None', 'examples.getStateName(stateIndex)': 'None',
'system.listMethods()': 'None'}
>>> server.sample.helloWorld()
'Hello World!'
>>> server.examples.getStateName(1)
'Alabama'
>>> server.examples.getStateName(50)
'Wyoming'

1:29:22 PM    comment []


© Copyright 2002 Kevin Altis.
 
June 2002
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
May   Jul




Click to see the XML version of this web page.