I wrote a jax-rs service using jersey, and the class is as follows,
I want to define the url for the following like this,
One to get the reports by passing parameters
http://localhost:8085/DiginReport/rs/Reports/getreport/{test1:value,test2:value}
One to start the Engine:
http://localhost:8085/DiginReport/rs/Reports/start
@Path("Reports")
public class ReportService {
@GET
@Path("/getreport}/{parameters}")
@Produces(MediaType.TEXT_PLAIN)
public Response getReport(@PathParam("reportName") String reportName,@PathParam("parameters") String parameters) throws KettleXMLException, KettleMissingPluginsException, JSONException, UnknownParamException {
JSONArray jsonarr;
return Response.status(200).entity("ok").build();
}
@GET
@Path("{start}")
@Produces(MediaType.TEXT_PLAIN)
public Response startEngine(@PathParam("start") String command) {
return Response.status(200).entity("ok").build();
}
}
When i type this in url , it says resource not avaliable, http://localhost:8085/DiginReport/rs/Reports/start