<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 31, 2011, at 1:01 AM, Justin Frost wrote:</div></div><div><br><blockquote type="cite"><table cellspacing="0" cellpadding="0" border="0" style="position: static; z-index: auto; "><tbody><tr><td valign="top" style="font: inherit;"><font class="Apple-style-span" face="arial" size="2">I'm trying the example found at:</font><div style="font-family: arial; font-size: 10pt; "><br></div><div style="font-family: arial; font-size: 10pt; "><a href="http://twistedmatrix.com/documents/current/web/howto/xmlrpc.html#auto3">http://twistedmatrix.com/documents/current/web/howto/xmlrpc.html#auto3</a></div><div style="font-family: arial; font-size: 10pt; "><br></div><div style="font-family: arial; font-size: 10pt; ">And it doesn't seem to be working. &nbsp;The following test code fails:</div><div style="font-family: arial; font-size: 10pt; "><br></div><div><div><font class="Apple-style-span" face="arial" size="2">import xmlrpclib</font></div><div><font class="Apple-style-span" face="arial" size="2">s = xmlrpclib.ServerProxy("<a href="http://localhost:8080">http://localhost:8080</a>")</font></div><div><font class="Apple-style-span" face="arial" size="2">print s.listMethods()</font></div></div><div><font class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2">The error says that the listMethods method isn't defined. &nbsp;If I create an xmrpc server without twisted and add introspection, it works fine. &nbsp;Is there a problem with the example or am I doing something wrong?</font></div><div><font class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2">Thanks,</font></div><div><font class="Apple-style-span" face="arial" size="2">Justin</font></div></td></tr></tbody></table></blockquote></div><br><div>As per the XML-RPC introspection specification &lt;<a href="http://xmlrpc-c.sourceforge.net/introspection.html">http://xmlrpc-c.sourceforge.net/introspection.html</a>&gt;, the method you're looking for is 'system.listMethods', not 'listMethods'.</div><div><br></div><div>You can fix your client example by doing 'print s.system.listMethods()' instead of 'print s.listMethods()'.</div><div><br></div><div>I'm assuming that the "xmlrpc server without Twisted" is violating the spec for convenience; you can always make an xmlrpc_listMethods yourself which calls the introspection object's listMethods.</div><div><br></div><div>Hope this helps,</div><div><br></div><div>-glyph</div><div><br></div></body></html>