Register a callback to handle custom portions of the service.
This callback may declare multiple methods:
1{2 initServiceClient: function() {3 // Create and return the internal service client object.4 // This is usually optional, except in the case of SOAP services.5 },67 // svc is the call-specific Service instance. For example, it may be an HTTPService or FTPService.8 // params are the arguments passed to the call method (if any).9 createRequest: function(svc:Service, params) {10 // Perform any required call-time configuration.11 // Optionally return a Service-specific object12 },1314 // svc is the call-specific Service instance.15 // arg is the output of createRequest.16 execute: function(svc:Service, arg:Object) {17 // Execute the service call and return a result18 // This method is not used by default for HTTP-related services unless executeOverride is set.19 },2021 // Use the execute function if it is present. This is only required to use the functionality with HTTP services.22 executeOverride: true,2324 // svc is the call-specific Service instance.25 // response is the output of execute.26 parseResponse: function(svc:Service, response: Object) {27 // Process the response object as needed.28 // The return value of this method will be the return value of the outer call method.29 },3031 // svc is the call-specific Service instance.32 // arg is the output of createRequest.33 mockCall: function(svc:Service, arg:Object) {34 // This method takes the place of the 'execute' phase when mocking is enabled.35 // Note initServiceClient, createRequest, and parseResponse still invoked.36 },3738 // svc is the call-specific Service instance.39 // params are the arguments passed to the call method (if any).40 mockFull: function(svc:Service, params) {41 // This method takes the place of the entire service call when mocking is enabled.42 // No other callbacks are invoked. The output of this method becomes the output of call.43 }4445}