@GET @Path("/getvehiclelocation/{vehicle}") @Produces(MediaType.APPLICATION_JSON) public Response getVehicleLocation(@PathParam("vehicle") String vehicle) { Location result = service.getVehicleLocation(vehicle); return Response.status(201).entity(result).build(); }