Good catch, that is a spec error. The @HttpMethod(GET) should be @GET.
Thanks,
Marc.
On Jun 15, 2008, at 1:41 PM, Markus KARG wrote:
> Dear Sirs,
>
> Reviewing the JSR311 Public Review Draft (April 18, 2008) I found
> this text:
>
> @HttpMethod(GET) 5
> 2 @ProduceMime{"text/plain"} 6
> 3 public String listHeaderNames(@Context HttpHeaders headers) { 7
> 4 StringBuilder buf = new StringBuilder(); 8
> 5 for (String header: headers.getRequestHeaders().keySet()) { 9
> 6 buf.append(header); 10
> 7 buf.append("\n"); 11
> 8 } 12
> 9 return buf.toString(); 13
> 10 }
>
> People might assume that they can use @HttpMethod to annotate a
> method. In fact, this is not possible using the current RI. The API
> definition of the @HttpMethod prohibits its use at a method. Only
> annotations can be annotated using @HttpMethod.
>
> So this is either a failure in the spec draft or in the RI.
>
> Regards
> Markus Karg
>
> --
> http://www.xing.com/go/invita/58469
>
---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.