<p dir="ltr">David,</p>
<p dir="ltr">Not sure how accurate this still is but there certainly used to be an issue that mod_rest is capable of executing commands but not capable of actually returning any data.</p>
<p dir="ltr">For example creating accounts works but possibly results are only displayed in the shell that is running ejabberd.</p>
<p dir="ltr">Badlop may be able to clarify that ?</p>
<p dir="ltr">Cheers</p>
<p dir="ltr">Kirk</p>
<div class="gmail_quote">On 14 Nov 2012 15:01, "David Cunningham" <<a href="mailto:dcunningham@voisonics.com">dcunningham@voisonics.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Kirk,<br><br>Thanks for the suggestion. Here are the logs:<br><br>---- When using ejabberdctl ----<br><br>=INFO REPORT==== 2012-11-15 01:52:17 ===<br>D(<0.5019.0>:ejabberd_commands:314) : Executing command mod_admin_extra:process_rosteritems with Args=["list",<br>


                                                                                                       "any",<br>                                                                                                       "any",<br>


                                                                                                       "any",<br>                                                                                                       "any"]<br>


<br><br>---- When using mod_rest ----<br><br>=INFO REPORT==== 2012-11-15 01:53:58 ===<br>I(<0.449.0>:ejabberd_listener:281) : (#Port<0.5874>) Accepted connection {{12,34,56,78},53863} -> {{12,34,56,78},5280}<br>


<br>=INFO REPORT==== 2012-11-15 01:53:58 ===<br>D(<0.5023.0>:ejabberd_http:142) : S: [{["rest"],mod_rest},<br>                                      {["captcha"],ejabberd_captcha},<br>                                      {["admin"],ejabberd_web_admin},<br>


                                      {["http-bind"],mod_http_bind},<br>                                      {["http-poll"],ejabberd_http_poll}]<br><br><br>=INFO REPORT==== 2012-11-15 01:53:58 ===<br>


I(<0.5023.0>:ejabberd_http:146) : started: {gen_tcp,#Port<0.5874>}<br><br>=INFO REPORT==== 2012-11-15 01:53:58 ===<br>D(<0.5023.0>:ejabberd_http:268) : (#Port<0.5874>) http query: 'POST' /rest/<br>


<br><br>=INFO REPORT==== 2012-11-15 01:53:58 ===<br>D(<0.5023.0>:ejabberd_http:447) : client data: "process_rosteritems list any any any any"<br><br><br>=INFO REPORT==== 2012-11-15 01:53:58 ===<br>D(<0.5023.0>:ejabberd_http:346) : ["rest"] matches ["rest"]<br>


<br>=INFO REPORT==== 2012-11-15 01:53:58 ===<br>I(<0.5023.0>:mod_rest:92) : Data: "process_rosteritems list any any any any"<br><br>=INFO REPORT==== 2012-11-15 01:53:58 ===<br>D(<0.5023.0>:ejabberd_commands:314) : Executing command mod_admin_extra:process_rosteritems with Args=["list",<br>


                                                                                                       "any",<br>                                                                                                       "any",<br>


                                                                                                       "any",<br>                                                                                                       "any"]<br>


<br><br>Thanks.<br><br><br><div class="gmail_quote">On 14 November 2012 03:32, Kirk Bateman <span dir="ltr"><<a href="mailto:kirk.bateman@gmail.com" target="_blank">kirk.bateman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<p dir="ltr">David,</p>
<p dir="ltr">You'll get a much more useful response if you post the ejabberd.log for when the mod_rest request gets processed.</p>
<p dir="ltr">Regards</p>
<p dir="ltr">Kirk Bateman<br>
</p>
<div class="gmail_quote"><div><div>On 13 Nov 2012 22:58, "David Cunningham" <<a href="mailto:dcunningham@voisonics.com" target="_blank">dcunningham@voisonics.com</a>> wrote:<br type="attribution">

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hello,<br><br>I'm having a problem with using mod_rest to get a list of everyone's presence roster. When I run "ejabberdctl process_rosteritems" from the command line I get the results fine, but when calling it via mod_rest it always returns "0". Examples below.<br>





Anyone have any idea why?<br>Thanks in advance.<br><br><br># ejabberdctl process_rosteritems list any any any any<br>There are 2 roster items in total.<br><br>=INFO REPORT==== 14-Nov-2012::09:51:52 ===<br>D(<5084.4579.0>:ejabberd_commands:314) : Executing command mod_admin_extra:process_rosteritems with Args=["list",<br>





                                                                                                          "any",<br>                                                                                                          "any",<br>





                                                                                                          "any",<br>                                                                                                          "any"]<br>





** at node ejabberd@myhost **<br>Matches: bob@myhost user@myhost<br>Progress 50% - visited 1 - deleted 1<br>Matches: user@myhost bob@myhost<br>Progress 100% - visited 2 - deleted 2<br><br><br># wget <a href="http://myhost:5280/rest/" target="_blank">http://myhost:5280/rest/</a> --server-response --post-data 'process_rosteritems list any any any any' -O index.html<br>





--2012-11-14 09:51:20--  <a href="http://myhost:5280/rest/" target="_blank">http://myhost:5280/rest/</a><br>Resolving myhost... 12.34.56.78<br>Connecting to myhost|12.34.56.78|:5280... connected.<br>HTTP request sent, awaiting response... <br>





  HTTP/1.0 200 OK<br>  Connection: keep-alive<br>  Content-Type: text/html; charset=utf-8<br>  Content-Length: 1<br>Length: 1 [text/html]<br>Saving to: `index.html'<br><br>100%[=====================================================================================>] 1           --.-K/s   in 0s      <br>





<br>2012-11-14 09:51:20 (65.5 KB/s) - `index.html' saved [1/1]<br><br># cat index.html<br>0<br clear="all"><br><br>-- <br>David Cunningham, Voisonics<br><a href="http://voisonics.com/" target="_blank">http://voisonics.com/</a><br>





USA: <a href="tel:%2B1%20213%20221%201092" value="+12132211092" target="_blank">+1 213 221 1092</a><br>UK: <a href="tel:%2B44%20%280%29%2020%203298%201642" value="+442032981642" target="_blank">+44 (0) 20 3298 1642</a><br>



Australia: <a href="tel:%2B61%20%280%29%202%208063%209019" value="+61280639019" target="_blank">+61 (0) 2 8063 9019</a><br><br>
<br></div></div>_______________________________________________<br>
ejabberd mailing list<br>
<a href="mailto:ejabberd@jabber.ru" target="_blank">ejabberd@jabber.ru</a><br>
<a href="http://lists.jabber.ru/mailman/listinfo/ejabberd" target="_blank">http://lists.jabber.ru/mailman/listinfo/ejabberd</a><br>
<br></blockquote></div>
<br>_______________________________________________<br>
ejabberd mailing list<br>
<a href="mailto:ejabberd@jabber.ru" target="_blank">ejabberd@jabber.ru</a><br>
<a href="http://lists.jabber.ru/mailman/listinfo/ejabberd" target="_blank">http://lists.jabber.ru/mailman/listinfo/ejabberd</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>David Cunningham, Voisonics<br><a href="http://voisonics.com/" target="_blank">http://voisonics.com/</a><br>USA: <a href="tel:%2B1%20213%20221%201092" value="+12132211092" target="_blank">+1 213 221 1092</a><br>
UK: <a href="tel:%2B44%20%280%29%2020%203298%201642" value="+442032981642" target="_blank">+44 (0) 20 3298 1642</a><br>Australia: <a href="tel:%2B61%20%280%29%202%208063%209019" value="+61280639019" target="_blank">+61 (0) 2 8063 9019</a><br>


<br>
<br>_______________________________________________<br>
ejabberd mailing list<br>
<a href="mailto:ejabberd@jabber.ru">ejabberd@jabber.ru</a><br>
<a href="http://lists.jabber.ru/mailman/listinfo/ejabberd" target="_blank">http://lists.jabber.ru/mailman/listinfo/ejabberd</a><br>
<br></blockquote></div>