hi!
i'm new to drupal services and i cannot get it work. i use drupal 6.16 and services 6.x-2.2.
my problem is that if i set services to "use keys" + "use session id" then i simply cannot
connect from my Java client program, i always get this message:
"org.apache.xmlrpc.client.XmlRpcHttpTransportException: HTTP server returned unexpected status: Forbidden"
if i untick "use keys", then the system.connect call succeeds, but the user.login never. it says
"org.apache.xmlrpc.XmlRpcException: Hibás felhasználói név vagy jelszó." (that means invalid usename or passord)
however i can log in without any problem with the username and password that my java client tries to use.
checked this many times.
i have no clue why get i that forbidden message and why is my username+pw always refused the other way.
can anyone help me with that?
(my java client is based on the one i found in the example section (http://drupal.org/node/308629)
Comments
Did you remember to enable
Did you remember to enable the services you are trying to use in the API key configuration? Go to Services / Keys and Edit the key you are using - check all the services you use, including system.connect and user.login.
Yes, I did
yes, I have double checked that all services are allowed for the API key I use..
Solved, new problem "An illegal choice has been detected"
Hi!
The problem that solved the previous issue was enabling "use keys" on the services property page.
the mentioned forbidden message was due to the anonymous user wasn't granted "access node" role.
now one step further I have a problem with user.save. After successful login, user.get I get an error
saying:
"An illegal choice has been detected. Please contact the site administrator. The e-mail address C is not valid."
I get even this message if tha passed parameter is empty, so..
this is my used JSON parameter, that i pass on the services browser demo form:
{"name":"pipia","pass":"Tester123","mail":"asdfasdfa@gmail.com","roles":{"2":"authenticated user"}}
can anyone help me with this?