Try the following code.
I would also consider the following things:
Pass Json data as application/json
instead of string as path parameter (note that you need to escape.
Use another method than GET
to start the engine (e.g. POST
), since get should be only used to retrieve data.
Use resources within the URL instead of start
or getreports
.
@Path("Reports")
public class ReportService {
@GET
@Path("/getreport/{parameters}")
@Produces(MediaType.TEXT_PLAIN)
public Response getReport(@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() {
return Response.status(200).entity("ok").build();
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…