deelan wrote:
> and so i tried to override call method in my sample but i quickly run
> into a nasty ProtocolError exception:
>
> from WebKit.XMLRPCServlet import XMLRPCServlet
>
> class xmlrpc(XMLRPCServlet):
>
> def call(self, methodName, *args, **keywords):
>
> # TODO: put auth checks here
>
> # call supa-method
> XMLRPCServlet.call(self, methodName, *args, **keywords)
>
> def exposedMethods(self):
> return ["multiply", "add", "mylist"]
>
> def multiply(self, x, y):
> return x*y
>
> def add(self, x, y):
> return x+y
>
> def mylist(self):
> return [1,2,3]
You need a return value -- change the last line of call() to:
return XMLRPCServlet.call(self, methodName, *args, **keywords)
Otherwise it will implicitly return None, and xmlrpclib doesn't allow None
by default. (You can make it handle None by adding allow_none=True to the
call to dumps in XMLRPCServlet.py.)
- Geoff
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss