[Erp5-report] r39291 kazuhiko - /erp5/trunk/products/ERP5Type/ConnectionPlugin/
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Oct 18 17:50:02 CEST 2010
Author: kazuhiko
Date: Mon Oct 18 17:50:01 2010
New Revision: 39291
URL: http://svn.erp5.org?rev=39291&view=rev
Log:
simple implementation of SOAPConnection, that does not work with restricted environment for now.
Modified:
erp5/trunk/products/ERP5Type/ConnectionPlugin/SOAPConnection.py
Modified: erp5/trunk/products/ERP5Type/ConnectionPlugin/SOAPConnection.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/ConnectionPlugin/SOAPConnection.py?rev=39291&r1=39290&r2=39291&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/ConnectionPlugin/SOAPConnection.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/ConnectionPlugin/SOAPConnection.py [utf8] Mon Oct 18 17:50:01 2010
@@ -26,9 +26,25 @@
#
##############################################################################
+import SOAPpy
class SOAPConnection:
"""
Holds a SOAP connection
"""
- pass
+ __allow_access_to_unprotected_subobjects__ = 1
+
+ def __init__(self, url, user_name=None, password=None):
+ self.url = url
+ self._user_name = user_name
+ self._password = password
+
+ def connect(self):
+ """Get a handle to a remote connection."""
+ # TODO:
+ # * transport (http) level authentication using self._user_name and
+ # self._password.
+ # * support calling from restricted environment.
+ url = self.url
+ proxy = SOAPpy.SOAPProxy(url)
+ return proxy
More information about the Erp5-report
mailing list