Dojo dojox.rpc.Service and SMD gotchas
If you are using a SMD (
Service Mapping Description) to initialize a dojox.rpc.Service you may get "no match found" errors if you haven't required the right packages. If you are using "debugAtAllCosts:true" to try and figure out why you're getting "no match found" errors you may instead see "dojox.rpc.Service is not a constructor" errors instead. (As the
API documentation for dojox.rpc.Service notes, these errors may also be caused by not requiring the Service class before any other plugin services, so first check to make sure you're requiring things in the right order.)
I mentioned above that you have to include 'the right packages' but unfortunately I'm not sure these dependencies are documented anywhere. To figure out what you may be missing, look at what transport your SMD references and see if a similarly named class exists in dojo.rpc. For example, if your transport is REST, make you're requiring the dojo.rpc.Rest package; in the case of json-rpc, require dojox.rpc.JsonRpc.
I spent a few hours banging my head against this today and hopefully this will save someone else from experiencing the same headaches.