I am attempting to access an XML-RPC API method using a Java client. I'm fairly certain that the server is written in Python.
The API is part of the wiki farm Wikidot.com
API info: http://www.wikidot.com/doc:api
API method info: http://www.wikidot.com/doc:api-methods
Does anyone here know what the equivalent of this statement is in Java?
>>> s.user.sites({'user': 'username'})
From what I can tell, the parameter being passed into the method is a hashmap where 'user' maps to 'username', etc. However regardless of what Java data type I pass in to the method - Map, String array, Object array, ... - I keep getting an exception thrown indicating that the "Calling parameters do not match signature"
I originally tried this (Object[] array storing 2 separate Strings), and passing in the params array to the method. Later I attempted a Map and String[] array.
Object[] params = new Object[] { "user", "username" };
So my questions are:
- What is the first statement (Python code) actually passing in to the method? What data type is the method looking for?
- And, how would I call the same method using Java syntax?
If you're able to answer the first one, I can probably answer the second question myself.
I've been able to connect to the aforementioned API using a Python script. I've also been able to access XML-RPC methods that don't require any parameters using Java. The problem is that any methods that DO require a parameter, I can't use. Every parameter I try is not recognised.
Thanks for your time.