ALAHYANE Rachid wrote:
Ok so, my end goal is to use the ipa methods with xml-rpc as following,

* ipaServer : my ipa server, used to authenticate users and serves response for xml-rpc calls from rpcServer * rpcServer : this host is my xml-rpc server, I installed freeipa libraires on it, and an apache server with mod_python and mod_auth_kerb. This hosts will be used as a client ipa, It is for these reasons that i used `account.py` from within apache. * myClient : this host is the one which will make the rpc calls to rpcServer.

NB : 'account.py' is called by xmlrpchandler (it is my python handler) when getUserInfos is called by myclient .

Can you set LogLevel debug on the rpcServer web server and see if you get a backtrace (or look in /var/log/httpd/error_log, you may already have one).

What is strange is that this code works fine standalone. Can you show us all the code in your xmlrpchandler?

BTW, your English is fine :-)

rob



Example :
myClient calls the remote.account.getUserInfos(u'admin'), rpcServer (in mode client) intercepts this call and forwards it to the ipaServer. This last one sends the response to rpcServer (via xml-rpc) and then rpcServer responds to myClient.


this is my configurations :

== On rpcServer ==
--------- httpd conf ------------
<Files "xmlrpc">
## python conf # ....
  SetHandler python-program
  PythonHandler xmlrpchandler
  PythonDebug on
</Files>
------------------------------------

the handler xmlrpchandler calls the following method when the client requests for the remote method getUserInfos().

--------- account.py ------------
def getUserInfos(user_name, env=None):

    from ipalib import api

    api.bootstrap_with_global_options(context='webservices')
    api.finalize()
    # mode Server is False. I am not on the server ipa
    api.Backend.xmlclient.connect()
return api.Command.user_show(user_name) ------------------------------------


== On myClient ==
When I call this method from my client, I get this exception :
------------------------------------
<Fault 2: "remote.account.getUserInfos: <type 'exceptions.StandardError'>: API.bootstrap() already called">
------------------------------------


I hope that is clearer now, despite my bad English ;)


---
Meilleures salutations / Best Regards

Rachid ALAHYANE




_______________________________________________
Freeipa-users mailing list
Freeipa-users@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-users

Reply via email to