Vishal.a wrote:
> Hello,
>
> I have created a rest service which takes UUID as one of the parameters
>
> @GET
> @Path("/person/{id}")
> public Person getPerson(@PathParam("id")UUID id);
>
> I have also written a MessageBodyReader for the UUID
MessageBodyReaders are only for reading the message body, they're not
used for PathParams.
PathParams can be any type with a constructor taking a String or with a
valueOf(String) method - UUID has neither, so I guess your only option
is to have a parameter of type String and do UUID.fromString in the body
of your method.
Ian
--
Ian Roberts | Department of Computer Science
[email protected] | University of Sheffield, UK