I need to implement a webservice that uses the first query parameter to identify the operation, i.e. the client call would be something like: http://localhost:8080/ws/oper
I think method selection is based on the non parameter part of the URI. Can't you design this in a way the client invoke http://localhost:8080/ws/operation/info
and http://localhost:8080/ws/operation/create?name=something
instead?
That would be easy to achieve:
@Path("/operation")
public class Operation {
@GET
@Path("info")
public String info() {
return "info";
}
@GET
@Path("create")
public String create(@QueryParam("name") String name) {
return "create";
}
}