Constructordojo.rpc.JsonService

dojo.require("dojo.rpc.JsonService");
defined in dojo/rpc/JsonService.js

Usage

function ()
parametertypedescription
argsObjectTakes a number of properties as kwArgs for defining the service. It also accepts a string. When passed a string, it is treated as a url from which it should synchronously retrieve an smd file. Otherwise it is a kwArgs object. It accepts serviceUrl, to manually define a url for the rpc service allowing the rpc system to be used without an smd definition. strictArgChecks forces the system to verify that the # of arguments provided in a call matches those defined in the smd. smdString allows a developer to pass a jsonString directly, which will be converted into an object or alternatively smdObject is accepts an smdObject directly.

Jump to PropertiesFunctionsBack to top

Functionbind(method: String, parameters: Array, deferredRequestHandler, url)
JSON-RPC bind method. Takes remote method, parameters, deferred, and a url, calls createRequest to make a JSON-RPC envelope and passes that off with bind.
FunctioncallRemote(method: String, params: Array)
call an arbitrary remote method without requiring it to be predefined with SMD
FunctioncreateRequest(method: String, params: Array)
create a JSON-RPC envelope for the request
FunctionerrorCallback(deferredRequestHandler: dojo.Deferred)
create callback that calls the Deferres errback method
FunctiongenerateMethod(method: String, parameters: Array, url: String)
generate the local bind methods for the remote object
parse the result envelope and pass the results back to the callback function
FunctionprocessSmd(object)
callback method for reciept of a smd object. Parse the smd and generate functions based on the description
FunctionresultCallback(deferredRequestHandler: dojo.Deferred)
create callback that calls the Deferred's callback method

Jump to FunctionsPropertiesBack to top