Changes the method of client method invocation to allow a promise to be returned.