Hi,
I'm trying to access
ConceptNet's XMLRPC server but I cannot seem to get the PHP client-side method written correctly. :-(
I send out the call which includes:
- $message = new xmlrpcmsg('system.listMethods()');
-
$result = $server->send($message, $timeout);
And part of what I get back:
XML-RPC Fault #1: exceptions.Exception:method "system.listMethods()" is not supported
The xmlrpc file looks like:
- import sys
-
import ConceptNetDB
-
import DocXMLRPCServer
-
pred_filename = "predicates.txt"
-
if len(sys.argv)>0 and sys.argv[-1][-1*len('.py'):].lower()!='.py':
-
pred_filename = sys.argv[-1]
-
print "Syntax: python ConceptNetXMLRPCServer.py [predicates_file]"
-
print "Loading Predicates from %s..."%pred_filename
-
c =ConceptNetDB.ConceptNetDB(None,pred_filename)
-
print "Starting XML-RPC Server"
-
port = 8000
-
xmlrpc = DocXMLRPCServer.DocXMLRPCServer(('',port))
-
print "Now serving on localhost port %s!"%str(port)
-
xmlrpc.register_introspection_functions()
-
xmlrpc.register_instance(c)
-
#xmlrpc.register_instance(c.nltools) -a post said to comment this out
-
xmlrpc.serve_forever()
Part of the server documentation looks like:
---------------------------------------------------
XML-RPC Server Documentation
This server exports the following methods through the XML-RPC protocol.
Methods
decode_node(node_tuple)
decode_word(word_uid)
display_node(textnode)
returns the pretty print of a node's contents
encode_word(word)
system.listMethods()
system.listMethods() => ['add', 'subtract', 'multiple']
---------------------------------------------------
Any idea how I get rid of the: XML-RPC Fault #1: exceptions.Exception:method "*" is not supported ?
Thanks,
Justin