From kyler@lairds.com Thu Dec 25 09:14:58 2003 . . . It's been a long time since I poked at Zope with XML-RPC. I was hoping to start using it for a very public set of tools, but the only things I can do right now are very clumsy.
I have a Python Script, "test", in Zope with parameters "first=None, second=None". The Script just "prints" and returns the values.
Trying what would seem to be an elegant way of calling it, Zope_server.test(first='foo', second='bar') yields an error. TypeError: __call__() got an unexpected keyword argument 'second'
O.k., so I fall back to an old script I wrote that uses Meerkat (which still works!) and see that I can pass it a dictionary. Try again. Zope_server.test({'first': 'foo', 'second': 'bar'}) "first={'second': 'bar', 'first': 'foo'}\nsecond=None\n" That still doesn't give me access to "second".
I've been looking in the obvious places for examples with multiple parameters but I've found none. Any pointers? (I think I originally worked from an article by Jon Udell at Byte but it seems to have disappeared.)
The obvious alternative is to ditch XML-RPC and just use plain HTTP. Zope knows how to handle HTTP well enough and I'm quite comfortable with it, so it's almost my preference. I just thought that XML-RPC seemed like a cleaner way to handle this (and I'd recommended it for some other uses so I thought I should get some real experience with it). . . . Short answer: don't hesitate to use straight HTTP for communications. RPC, and XML-RPC in particular, is *supposed* to be about clean and easy programma- bility, but it just doesn't live up to the promise. At this point, I see little motivation in being a pioneer at doing what's necessary to make it useful in, for example, Zope.