iro/view/xmlrpc.py
branchdevel
changeset 265 f6c906b40cce
parent 200 01c34f22be42
child 291 84eb5a7a715a
--- a/iro/view/xmlrpc.py	Thu Mar 29 18:31:53 2012 +0200
+++ b/iro/view/xmlrpc.py	Thu Mar 29 18:44:28 2012 +0200
@@ -17,6 +17,7 @@
 from ..error import InterfaceException, ValidateException
 
 class TwistedInterface(Interface):
+    """Class that addes needed function for XML-RPC/SOAP"""
     def __init__(self):
         Interface.__init__(self)
 
@@ -28,13 +29,12 @@
   
 
     def listProcedures(self):
-        """Since we override lookupProcedure, its suggested to override
-        listProcedures too.
-        """
+        """returns a list of all functions that are allowed to call via XML-RPC."""
         return ['listMethods','status','sms','fax','mail','routes','defaultRoute','bill','telnumber','email']
 
 
 class XMLRPCInterface(TwistedInterface,xmlrpc.XMLRPC): 
+    """XML-RPC interface"""
     def __init__(self):
         xmlrpc.XMLRPC.__init__(self) 
         TwistedInterface.__init__(self)
@@ -58,19 +58,12 @@
 
 
 class SOAPInterface(TwistedInterface,soap.SOAPPublisher): 
+    """SOAP interface"""
     def __init__(self):
         soap.SOAPPublisher.__init__(self) 
         TwistedInterface.__init__(self)
         
     def lookupFunction(self, functionName):
-        """Lookup published SOAP function.
-
-        Override in subclasses. Default behaviour - publish methods
-        starting with soap_, if they have true attribute useKeywords
-        they are expected to accept keywords.
-        
-        @return: tuple (callable, useKeywords), or (None, None) if not found.
-        """
         if functionName in self.listProcedures():
             function = getattr(self, functionName, None)
             if function:
@@ -80,6 +73,7 @@
             return None
 
 def appendResource(root):
+    """adding XML-RPC and SOAP to root."""
     root.putChild('RPC2', XMLRPCInterface())
     root.putChild('SOAP', SOAPInterface())
     return root