You have two options: you can put them in the path, or you can use it as a query parameter.
i.e. you want it to look like this:
/{id}/{name}
or
/{id}?name={name}
For the first, just do:
@GET
@Path("/{id}/{name}")
@Produces({MediaType.APPLICATION_XML})
public Person fetchPerson(
@PathParam("id") Integer id,
@PathParam("name") String name) {
return personService.fetchPerson(id);
}
For the second, just add the name as RequestParam. You can mix PathParamand RequestParams.