On Sun, 6 Apr 2008, Brad O'Hearne wrote:
> I've moved to 2.1 SNAPSHOT -- my @UriTemplate annotations still won't
> compile. Is there another dependency needed?
>
I think @UriTemplate was deprecated/replaced by @Path by the JSR-311 folks,
but their spec documents aren't uptodate (thats my understanding anyway)
Something like the following works for me (from the 2.1 SNAPSHOT):
import javax.ws.rs.Path;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.core.HttpContext;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ProduceMime;
import javax.ws.rs.ConsumeMime;
import javax.ws.rs.UriParam;
import javax.ws.rs.WebApplicationException;
@Path("/rc")
public class ReflectionCoverageService {
@POST
@Path("init/{clientId}")
@ProduceMime("text/plain")
public String init(@UriParam("clientId") String id, @HttpContext
UriInfo
info, SomeJavaBeanClass sjbc) {
MultivaluedMap params = info.getQueryParameters();