I am using the code in trunk and this work: # in controller @service.xmlrpc def add(a,b): return a+b def call(): return service()
# in shell >>> import xmlrpclib >>> s = xmlrpclib.ServerProxy('http://127.0.0.1:8000/test/default/call/xmlrpc') >>> s.add(3,4) 7 On Wednesday, 25 September 2013 01:08:49 UTC-5, IVINH wrote: > > Yes, it's work fine on 2.4.5. > > Vào 10:41:29 UTC+7 Thứ tư, ngày 25 tháng chín năm 2013, Massimo Di Pierro > đã viết: >> >> Did you define the function ? >> >> @servicex.xmlrpc >> def add(a,b): return a+b >> >> >> On Tuesday, 24 September 2013 20:26:01 UTC-5, IVINH wrote: >>> >>> I find this with web2py 2.6.4: >>> >>> >>> s = ServerProxy('http://127.0.0.1:8000/app/default/call/xmlrpc') >>> >>> print s.add(3,4) >>> Traceback (most recent call last): >>> File "<stdin>", line 1, in <module> >>> File "C:\Python27\lib\xmlrpclib.py", line 1224, in __call__ >>> return self.__send(self.__name, args) >>> File "C:\Python27\lib\xmlrpclib.py", line 1578, in __request >>> verbose=self.__verbose >>> File "C:\Python27\lib\xmlrpclib.py", line 1264, in request >>> return self.single_request(host, handler, request_body, verbose) >>> File "C:\Python27\lib\xmlrpclib.py", line 1312, in single_request >>> response.msg, >>> xmlrpclib.ProtocolError: <ProtocolError for >>> 127.0.0.1:8000/app/default/call/xmlrpc: 500 INTERNAL SERVER ERROR> >>> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.