bundles/org.eclipse.orion.client.ui/web/orion/sites/siteClient.js
function _doServiceCall(service, methodName, args) {
		var serviceMethod = service[methodName];
		var clientDeferred = new Deferred();
		if (typeof serviceMethod !== 'function') { //$NON-NLS-0$
			throw messages['Service method missing: '] + methodName;
		}
		// On success, just forward the result to the client
		var onSuccess = function(result) {
			clientDeferred.resolve(result);
		};
		
		// On failure we might need to retry
		var onError = function(error) {
			// Forward other errors to client
			clientDeferred.reject(error);
		};
		serviceMethod.apply(service, args).then(onSuccess, onError);
		return clientDeferred;
	}
function _doServiceCall(service, methodName, args) {
		var serviceMethod = service[methodName];
		var clientDeferred = new Deferred();
		if (typeof serviceMethod !== 'function') { //$NON-NLS-0$
			throw messages['Service method missing: '] + methodName;
		}
		// On success, just forward the result to the client
		var onSuccess = function(result) {
			clientDeferred.resolve(result);
		};
		
		// On failure we might need to retry
		var onError = function(error) {
			// Forward other errors to client
			clientDeferred.reject(error);
		};
		serviceMethod.apply(service, args).then(onSuccess, onError);
		return clientDeferred;
	}
function _doServiceCall ( service , methodName , args ) { var serviceMethod = service [ methodName ] ; var clientDeferred = new Deferred ( ) ; if ( typeof serviceMethod !== 'function' ) { //$NON-NLS-0$ throw messages [ 'Service method missing: ' ] + methodName ; } // On success, just forward the result to the client var onSuccess = function ( result ) { clientDeferred . resolve ( result ) ; } ; // On failure we might need to retry var onError = function ( error ) { // Forward other errors to client clientDeferred . reject ( error ) ; } ; serviceMethod . apply ( service , args ) . then ( onSuccess , onError ) ; return clientDeferred ; }
Performs a service call, handling authentication and retrying after auth.
@returns {Promise}
Performs a service call handling authentication and retrying after auth .