Ejabberd_xmlrpc doesn't accept commands

I installed the module called ejabberd_xmlrpc and configured it, checked listening in port 4560 and its working fine, i also was able to execute commands through the shell (xmlrpc calls) but whenever i try to call the xmlrpc calls remotely i receive this in ejabbered log file

=ERROR REPORT==== 2010-10-28 05:28:31 ===
{tcp_serv,139,{xmlrpc_http,handler,timeout}}

and i receive a bad request result similar to this
HTTP/1.1 400 Bad Request Content-Length: 0 Server: Erlang/1.13 Content-Type: text/xml HTTP/1.1 400 Bad Request Content-Length: 0 Server: Erlang/1.13 Content-Type: text/xml

the call am posting is:


<?xml version="1.0"?>
<methodCall>
  <methodName>connected_users</methodName>
  <params>
        <param>
            <value>
                  <struct>
                      <member><name>host</name>
                      <value>localhost</value>
                      </member>
                  </struct>
            </value>
      </param>
  </params>
</methodCall>

Can anyone tell me what am i doing wrong? i tried several types of calls but i always receive the same result.

connected_users takes no

connected_users takes no arguments.

I try with registered_users, which takes one argument:

$ ejabberdctl registered_users localhost
asdasd
badlop
badlop2
badlopasd
yyy
$ 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'}]}
$ cat post.txt
<?xml version='1.0'?>
<methodCall>
  <methodName>registered_users</methodName>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>host</name>
            <value>
              <string>localhost</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodCall>

$ wget localhost:4560/RPC2 --post-file=post.txt --header="Content-Type: text/xml" && cat RPC2 && echo ""
--2010-11-02 18:23:48--  http://localhost:4560/RPC2
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%[===========================================================================>] 652         --.-K/s   in 0s

2010-11-02 18:23:48 (47,1 MB/s) - `RPC2' saved [652/652]

<?xml version="1.0"?>
<methodResponse>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>users</name>
            <value>
              <array>
                <data>
                  <value>
                    <struct>
                      <member>
                        <name>username</name>
                        <value>asdasd</value>
                      </member>
                    </struct>
                  </value>
                  <value>
                    <struct>
                      <member>
                        <name>username</name>
                        <value>badlop</value>
                      </member>
                    </struct>
                  </value>
                  <value>
                    <struct>
                      <member>
                        <name>username</name>
                        <value>badlop2</value>
                      </member>
                    </struct>
                  </value>
                  <value>
                    <struct>
                      <member>
                        <name>username</name>
                        <value>badlopasd</value>
                      </member>
                    </struct>
                  </value>
                  <value>
                    <struct>
                      <member>
                        <name>username</name>
                        <value>yyy</value>
                      </member>
                    </struct>
                  </value>
                </data>
              </array>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodResponse>
Syndicate content