@GET @Path("/all") @Produces(MediaType.APPLICATION_JSON) public AppResponse getAll() { AppResponse resp = new AppResponse(); try { CustomerDAO dao = new CustomerDAO(); List<Customer> custList = dao.getAll(); resp.setPayload(custList); } catch (AppException e) { e.printStackTrace(); resp.setMessage(e.getMessage()); } return resp; }