On 2 Sep,2014, at 9:27 , tolis emmanouilidis <tolisemm@gmail.com> wrote:

Hi Eric,

I have tried the jax-rs @Produces annotation both at method and class levels as shown here (http://docs.oracle.com/cd/E19798-01/821-1841/gipzh/index.html) and it works for me. I don't have to specify the Content-Type header in the request.The resource method or endpoint is chosen according the Accept header.


You are right, I must have done something wrong.


class level

@Path("/members")
@RequestScoped
@Produces({"application/vnd.aerogear.v102+json"})
public class MemberResourceRESTServiceV102 {

@Path("/members")
@RequestScoped
@Produces({"application/vnd.aerogear.v101+json"})
public class MemberResourceRESTService {


So this is also an option of doing it, what option do you like the best?

Cheers,
Erik Jan