java version of working vcloud query