def call_webservice(cookies): global loggeduser, session print "Trying to call webservice using SSO with obtained credentials." url = 'https://cloud-mi-03.mib.infn.it/secure/webservice.php' client = Binding(url=url) for (key, value) in cookies.items(): client.cookies[key] = value print client.oncall(loggeduser)['return']