ejabberd - Comments for "Ejabberd_xmlrpc doesn&amp;#039;t accept commands" https://www.ejabberd.im/node/4381 en connected_users takes no https://www.ejabberd.im/node/4381#comment-56788 <p>connected_users takes no arguments.</p> <p>I try with registered_users, which takes one argument:</p> <pre> $ ejabberdctl registered_users localhost asdasd badlop badlop2 badlopasd yyy </pre><pre> $ cat cc.py import xmlrpclib server_url = 'http://127.0.0.1:4560'; server = xmlrpclib.Server(server_url); params = {} params["host"] = "localhost" result = server.registered_users(params) print result $ python cc.py {'users': [{'username': 'asdasd'}, {'username': 'badlop'}, {'username': 'badlop2'}, {'username': 'badlopasd'}, {'username': 'yyy'}]} </pre><pre> $ cat post.txt &lt;?xml version='1.0'?&gt; &lt;methodCall&gt; &lt;methodName&gt;registered_users&lt;/methodName&gt; &lt;params&gt; &lt;param&gt; &lt;value&gt; &lt;struct&gt; &lt;member&gt; &lt;name&gt;host&lt;/name&gt; &lt;value&gt; &lt;string&gt;localhost&lt;/string&gt; &lt;/value&gt; &lt;/member&gt; &lt;/struct&gt; &lt;/value&gt; &lt;/param&gt; &lt;/params&gt; &lt;/methodCall&gt; $ wget localhost:4560/RPC2 --post-file=post.txt --header="Content-Type: text/xml" &amp;&amp; cat RPC2 &amp;&amp; echo "" --2010-11-02 18:23:48-- <noindex><a href="http://localhost:4560/RPC2" title="http://localhost:4560/RPC2" rel="nofollow" >http://localhost:4560/RPC2</a></noindex> Resolviendo localhost... 127.0.0.1 Connecting to localhost|127.0.0.1|:4560... conectado. Petición HTTP enviada, esperando respuesta... 200 OK Longitud: 652 [text/xml] Saving to: `RPC2' 100%[===========================================================================&gt;] 652 --.-K/s in 0s 2010-11-02 18:23:48 (47,1 MB/s) - `RPC2' saved [652/652] &lt;?xml version="1.0"?&gt; &lt;methodResponse&gt; &lt;params&gt; &lt;param&gt; &lt;value&gt; &lt;struct&gt; &lt;member&gt; &lt;name&gt;users&lt;/name&gt; &lt;value&gt; &lt;array&gt; &lt;data&gt; &lt;value&gt; &lt;struct&gt; &lt;member&gt; &lt;name&gt;username&lt;/name&gt; &lt;value&gt;asdasd&lt;/value&gt; &lt;/member&gt; &lt;/struct&gt; &lt;/value&gt; &lt;value&gt; &lt;struct&gt; &lt;member&gt; &lt;name&gt;username&lt;/name&gt; &lt;value&gt;badlop&lt;/value&gt; &lt;/member&gt; &lt;/struct&gt; &lt;/value&gt; &lt;value&gt; &lt;struct&gt; &lt;member&gt; &lt;name&gt;username&lt;/name&gt; &lt;value&gt;badlop2&lt;/value&gt; &lt;/member&gt; &lt;/struct&gt; &lt;/value&gt; &lt;value&gt; &lt;struct&gt; &lt;member&gt; &lt;name&gt;username&lt;/name&gt; &lt;value&gt;badlopasd&lt;/value&gt; &lt;/member&gt; &lt;/struct&gt; &lt;/value&gt; &lt;value&gt; &lt;struct&gt; &lt;member&gt; &lt;name&gt;username&lt;/name&gt; &lt;value&gt;yyy&lt;/value&gt; &lt;/member&gt; &lt;/struct&gt; &lt;/value&gt; &lt;/data&gt; &lt;/array&gt; &lt;/value&gt; &lt;/member&gt; &lt;/struct&gt; &lt;/value&gt; &lt;/param&gt; &lt;/params&gt; &lt;/methodResponse&gt; </pre> Tue, 02 Nov 2010 17:28:46 +0000 mfoss comment 56788 at https://www.ejabberd.im