ejabberd - Comments for "ejabberd_xmlrpc configuration to access to simple commands" https://www.ejabberd.im/node/4128 en thanks https://www.ejabberd.im/node/4128#comment-56426 <div class="quote-msg"> <div class="quote-author"><em>badlop</em> wrote:</div> <p>Yes, I've modified the source code in SVN. Now that empty struct is optional. </p></div> <p>It works. Thank you!</p> <div class="quote-msg"> <div class="quote-author"><em>badlop</em> wrote:</div> <p>You must provide auth information of a local Jabber account.<br /> Can you login to the Jabber account adminjabber@192.168.67.123<br /> with password "pass" in ejabberd, using a Jabber client? </p></div> <p>Yes with pidgin I can login this account to the server. Maybe my config is wrong. I have this :</p> <pre> {acl, admin, {user, "adminjabber", "192.168.67.123"}}. {access, xmlrpcaccess, [{allow, admin}]}. {listen, [ {{4560, "127.0.0.1"}, ejabberd_xmlrpc, [ {maxsessions, 10}, {timeout, 5000}, {access_commands, [{xmlrpcaccess, all, []}]} ]}, ... {auth_method, external}. {extauth_program, "/usr/bin/php /usr/local/bin/JabberAuth_Ldap.php"}. </pre> Fri, 16 Jul 2010 09:52:48 +0000 Mataemon comment 56426 at https://www.ejabberd.im Empty struct now optional. Verify your auth info https://www.ejabberd.im/node/4128#comment-56359 <div class="quote-msg"> <div class="quote-author"><em>Mataemon</em> wrote:</div> <p>Can we avoid using the empty structure? </p></div> <p>Yes, I've modified the source code in SVN. Now that empty struct is optional.</p> <div class="quote-msg"> <div class="quote-author"><em>Mataemon</em> wrote:</div> <p>17&gt; xmlrpc:call({127, 0, 0, 1}, 4560, "/", {call, stats, [<br /> {struct, [{user, "adminjabber"}, {server, "192.168.67.123"}, {password, "pass"}]},<br /> {struct, [{name, "onlineusers"}]}]}).<br /> {ok,{response,{fault,-118,<br /> "Error -118\nA problem '{error,invalid_account_data}' </p></div> <p>You must provide auth information of a local Jabber account.<br /> Can you login to the Jabber account adminjabber@192.168.67.123<br /> with password "pass" in ejabberd, using a Jabber client?</p> <p>Example:<br /> (ejabberd@localhost)7&gt;<br /> xmlrpc:call({127, 0, 0, 1}, 4560, "/", {call, stats, [<br /> {struct, [{user, "badlop"}, {server, "localhost"}, {password, "mypass123"}]},<br /> {struct, [{name, "onlineusers"}]}]}).<br /> {ok,{response,[{struct,[{stat,1}]}]}}</p> <p>BTW, I've added example PHP code in README.txt on how to provide that auth information.</p> Fri, 09 Jul 2010 10:06:31 +0000 mfoss comment 56359 at https://www.ejabberd.im empty struct? https://www.ejabberd.im/node/4128#comment-56358 <p>Hi</p> <div class="quote-msg"> <div class="quote-author"><em>badlop</em> wrote:</div> <p>The problem with the first call is that ejabberd_xmlrpc expects a struct, even when there are no command arguments to provide:</p> <pre> xmlrpc:call({127, 0, 0, 1}, 4560, "/", {call, connected_users, [{struct, []}]}). </pre></div> <p>Can we avoid using the empty structure?<br /> Because I don't know how to create it in my php client. (I tried array(), array(null), array("")... nothing worked)</p> <p>An other problem is I can make the authentication work.<br /> I'm running ejabberd 2.1.4 (from bin installer).<br /> Compiled ejabberd_xmlrpc (puts the beams ine ejabberd/lib/ejabberd-xxx).<br /> Compiled xmerl from R12B-5 (puts the beams in ejabberd/lib/kernel-xxx)<br /> When I run every command I get a -118 error.<br /> Ex:</p> <pre> 17&gt; xmlrpc:call({127, 0, 0, 1}, 4560, "/", {call, stats, [{struct, [{user, "adminjabber"}, {server, "192.168.67.123"}, {password, "pass"}]},{struct, [{name, "onlineusers"}]}]}). {ok,{response,{fault,-118, "Error -118\nA problem '{error,invalid_account_data}' occurred executing the command stats with arguments\n[{name,\"onlineusers\"}]"}}} </pre><p>Did I something wrong?</p> <p>Thx<br /> Vincent</p> Thu, 08 Jul 2010 16:09:21 +0000 Mataemon comment 56358 at https://www.ejabberd.im Many Thanks for your Help https://www.ejabberd.im/node/4128#comment-56326 <p>I submitted a thanks earlier but it is not visible.<br /> Thanks for your help.<br /> AndyA from SA</p> Tue, 29 Jun 2010 19:15:48 +0000 austinandya comment 56326 at https://www.ejabberd.im The problem with the first https://www.ejabberd.im/node/4128#comment-56314 <p>The problem with the first call is that ejabberd_xmlrpc expects a struct, even when there are no command arguments to provide:</p> <pre> xmlrpc:call({127, 0, 0, 1}, 4560, "/", {call, connected_users, [{struct, []}]}). {ok,{response, [{struct, [{connected_users, {array, [{struct,[{sessions,"testuser@localhost/work"}]}]}}]}]}} </pre><p> The problem with the second call is that you are calling a command that doesn't exist. Maybe it existed in an old version of the module.</p> <p>Try this one instead:</p> <pre> xmlrpc:call({127, 0, 0, 1}, 4560, "/", {call, register, [{struct, [{user, "ggeo"}, {host, "localhost"}, {password, "gogo11"}]}]}). {ok,{response,[{struct,[{res,0}, {text,"User ggeo@localhost successfully registered"}]}]}} </pre><p> You can get information about the available commands by calling in your shell:</p> <pre> $ ejabberdctl help register* </pre> Tue, 29 Jun 2010 13:01:37 +0000 mfoss comment 56314 at https://www.ejabberd.im