[Erp5-report] r25670 - in /erp5/trunk/products/ERP5Wizard: ./ Tool/
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Feb 23 16:45:00 CET 2009
Author: ivan
Date: Mon Feb 23 16:44:58 2009
New Revision: 25670
URL: http://svn.erp5.org?rev=25670&view=rev
Log:
Implement generic mix in WebService class.
Modified:
erp5/trunk/products/ERP5Wizard/Tool/IntrospectionTool.py
erp5/trunk/products/ERP5Wizard/WebServiceMixIn.py
Modified: erp5/trunk/products/ERP5Wizard/Tool/IntrospectionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Wizard/Tool/IntrospectionTool.py?rev=25670&r1=25669&r2=25670&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Wizard/Tool/IntrospectionTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Wizard/Tool/IntrospectionTool.py [utf8] Mon Feb 23 16:44:58 2009
@@ -39,9 +39,9 @@
class IntrospectionTool(BaseTool, LogMixIn):
"""
- This tool provides both local and remote introspection.
+ This tool provides both local and remote introspection.
"""
-
+
id = 'portal_introspections'
title = 'Introspection Tool'
meta_type = 'ERP5 Introspection Tool'
Modified: erp5/trunk/products/ERP5Wizard/WebServiceMixIn.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Wizard/WebServiceMixIn.py?rev=25670&r1=25669&r2=25670&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Wizard/WebServiceMixIn.py [utf8] (original)
+++ erp5/trunk/products/ERP5Wizard/WebServiceMixIn.py [utf8] Mon Feb 23 16:44:58 2009
@@ -28,7 +28,8 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions
-
+from Products.ERP5Wizard.transport.XMLRPCConnection import XMLRPCConnection
+from Products.ERP5Wizard.transport.SOAPConnection import SOAPConnection
class WebServiceMixIn:
"""
@@ -38,10 +39,18 @@
security = ClassSecurityInfo()
security.declareProtected('connect', Permissions.ManagePortal)
- def connect(self, url, user=None, password=None, authentication_method=None):
+ def connect(self, url, user_name=None, password=None, authentication_method=None):
"""
Connect to remote instances
of any kind of web service (not only ERP5) with many
different kinds of authentication.
+ authentication_method: 'xml-rpc' or 'soap'
"""
- pass
+ # XXX: implement connection caching per zope thread
+ if authentication_method == 'xml-rpc':
+ connection_handler = XMLRPCConnection(url, user_name, password)
+ elif authentication_method == 'soap':
+ connection_handler = SOAPConnection(url, user_name, password)
+
+ connection_handler = connection_handler.connect()
+ return connection_handler
More information about the Erp5-report
mailing list