[Zope3-checkins] SVN: Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/README.txt added a basic example on the top of the doctest

Tarek Ziadé tziade at nuxeo.com
Sun Oct 9 06:57:30 EDT 2005


Log message for revision 39001:
  added a basic example on the top of the doctest

Changed:
  U   Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/README.txt

-=-
Modified: Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/README.txt
===================================================================
--- Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/README.txt	2005-10-09 10:57:28 UTC (rev 39000)
+++ Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/README.txt	2005-10-09 10:57:30 UTC (rev 39001)
@@ -2,6 +2,9 @@
 XMLRPC Introspection
 ====================
 
+What's introspection now ?
+--------------------------
+
 This Zope 3 package provides an xmlrpcintrospection mechanism,
 as defined here:
 
@@ -15,9 +18,33 @@
 
     - `methodSignature(method_name)`: Returns the method documentation of the given method.
 
+
+How do I use it ?
+-----------------
+
+Basically, if you want to add introspection into your XMLRPCView, you just
+have to add a decorator for each method of the view, that specifies the return type of the
+method and the argument types.
+
+The decorator is called `xmlrpccallable`
+
+  >>> from zope.app.xmlrpcintrospection.xmlrpcintrospection import xmlrpccallable
+  >>> from zope.app.publisher.xmlrpc import XMLRPCView
+  >>> class MySuperXMLRPCView(XMLRPCView):
+  ...     @xmlrpccallable(str, str, str, str)
+  ...     def myMethod(self, a, b, c):
+  ...         """ my help """
+  ...         return '%s %s, %s, lalalala, you and me, lalalala' % (a, b, c)
+
+`myMethod()` will then be introspectable.
+
+
+How does it works ?
+-------------------
+
 It is based on introspection mechanisms provided by the apidoc package.
 
-***** xmlrpc reminder *****
+***** ripped form xmlrpc doctests *****
 
 Let's write a view that returns a folder listing:
 
@@ -98,7 +125,7 @@
   </methodResponse>
   <BLANKLINE>
 
-***** end of xmlrpc reminder *****
+***** end of ripped form xmlrpc doctests *****
 
 Now we want to provide to that view introspection.
 Let's add three new xmlrcp methods, that published



More information about the Zope3-Checkins mailing list