Hello,

I just committed a change to the RpcPhp server trunk that allows service
introspection similar to the one found in XMLRPC:

http://xmlrpc-c.sourceforge.net/introspection.html

In contrast to the XMLRPC standard, the methods "listMethods",
"methodSignature" and "methodHelp" are not methods of a virtual service
"system", but are made available as parts of the service class itself. In
PHP, this is achieved by extending the ServiceIntrospection class (which is
automatically included by the server) or by implementing methods that
forward to the API methods like so:

function method_methodSignature( $method )
{
   return new ServiceIntrospection( $this )->method_methodSignature( $method
);
}

Thus, you have full control over whether to allow introspection or not. The
details of the implementation can be viewed here:

http://qooxdoo-contrib.svn.sourceforge.net/viewvc/qooxdoo-contrib/trunk/qooxdoo-contrib/RpcPhp/trunk/services/server/ServiceIntrospection.php?view=markup

You can see a demo of the three methods here:

http://www.qxtransformer.org/qooxdoo/RpcConsole/trunk/demo/default/build/?serverUrl=http://www.qxtransformer.org/qooxdoo/RpcPhp/trunk/services/&runTest=listMethods

http://www.qxtransformer.org/qooxdoo/RpcConsole/trunk/demo/default/build/?serverUrl=http://www.qxtransformer.org/qooxdoo/RpcPhp/trunk/services/&runTest=methodSignature

http://www.qxtransformer.org/qooxdoo/RpcConsole/trunk/demo/default/build/?serverUrl=http://www.qxtransformer.org/qooxdoo/RpcPhp/trunk/services/&runTest=methodHelp

I would like to propose that the other backends implement this simple
introspection as well. Of course, I am open to changes to the introspection
API in order to achieve interoperability.

Best,

Christian


-- 
View this message in context: 
http://n2.nabble.com/JSON-RPC-service-introspection-tp3917779p3917779.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to