This example uses the Dojo Toolkit to create a JavaScript object accountService for the service at http://localhost:8080/AccountJSONService using Dojo's RPC classes and providing them with http://localhost:8080/AccountJSONService?smd for Simple Method Description (SMD) input.
accountService
It then creates a Dojo button that will envoke the getAccountReport method of the accountService object.
getAccountReport