Hi, I have this in my config file:
{4560, ejabberd_xmlrpc, [{maxsessions, 10}, {timeout, 5000},
{access_commands, [{all, all, []}]}]}
and it works with ejabberd or python XMLPRC client without auth, but when I use auth it fails with a "error -112: unknown call".
For example, python XMLRPC client:
import xmlrpclib
server_url = 'http://localhost:4560';
server = xmlrpclib.Server(server_url);
params = {}
params["user"] = "admin1"
params["host"] = "domain.com"
params["password"] = "my_pass"
without password:
print server.echothis('hola')
hola
with password:
print server.echothis(params,'hola')
...
xmlrpclib.Fault: <Fault -112: 'Error -112\nUnknown call: {call,echothis,\n [{struct,[{host,"domain.com"},\n {password,"pass"},\n {user,"admin1"}]},\n "hola"]}'>
Maybe the problem is in auth itself but when I log in to XMPP server with
Anybody knows what is wrong???
Thanks in advance.
Oriol Rius
The documentation says: 5.
The documentation says:
But there is an exception: if you didn't configure any restriction in the option, then don't provide the auth arguments.
doesn't work yet
But in docu says:
In this case authentication information must be provided, but it is
enough that the account exists and the password is valid to execute
any command:
{listen, [
{4560, ejabberd_xmlrpc, [{maxsessions, 10}, {timeout, 5000},
{access_commands, [{all, all, []}]}]},
...
]}.
although I tried to change first 'all' by 'admin1' and it has the same behaviour.
Working script for different configurations
After some testing, I found the correct script for the different settings.
Not require auth
If you configure like this:
Then use a script like this:
Requiring auth
If you configure like this:
Then use a script like this: