Version 1, changed by guest 12/28/2005. Show version history
Simple Method Description (SMD)
SMD is a JSON representation of a remote procedures methods. It allows a developer to easily define the rpc type, methods, a parameters for a remote objects, so that a remote client can easily communicate with that object. It is intended to be simple of course to minimize any overhead associated with its production, transfer, and processing.
An SMD looks like this:
{"SMDVersion":".1","objectName":"testClass","serviceType":"JSON-RPC","serviceURL":"test_JsonRPCMediator.php","methods":[{"name":"myecho","parameters":[{"name":"somestring","type":"STRING"}]}]}
The parameters for the SMD are as follows:
SMDVersion - The version of the SMD document created (do we really need this?)
objectName - The name of the object (or class name) being represented.
serviceType - The type of RPC used to communicate with this object. Currently in Dojo the only valid response is "JSON-RPC"
serviceURL - The URL to use for RPC communications, as appropriate for the serviceType.
methods - Array of methods available for this object. Each method itself contains a "name" and an array of "parameters" (if there are any). The parameters are represented by an array containing a "name" for that parameter as well as a "type" for that parameter. There is currently no definition of "type" and it is not used in Dojo at this time.