我正在按照“示例标准 Python 库”实现 XMLRPCServer 。我希望客户能够看到方法签名,我希望
proxy = xmlrpclib.ServerProxy('http://%s:%s' % (host, port))
print proxy.system.methodSignature('list')
(客户端代码)将向我显示方法签名。
但是它返回“不支持的签名”
这是SimpleXMLRPCServer的代码:
def system_methodSignature(self, method_name):
"""system.methodSignature('add') => [double, int, int]
Returns a list describing the signature of the method. In the
above example, the add method takes two integers as arguments
and returns a double result.
This server does NOT support system.methodSignature."""
# See http://xmlrpc.usefulinc.com/doc/sysmethodsig.html
return 'signatures not supported'
有没有一种简单的方法来启用方法签名?还是 SimpleXMLRPCServer 真的不支持它们?是否有支持方法签名的实现?
很高兴知道:如果服务器不支持,为什么要包含 system_methodSignatures 方法?XMLRPC 规范?