DWR wrapper to support promises pattern along with callback