<div dir="ltr">Hi Eric,<div><br></div><div>I have tried the jax-rs @Produces annotation both at method and class levels as shown here (<a href="http://docs.oracle.com/cd/E19798-01/821-1841/gipzh/index.html">http://docs.oracle.com/cd/E19798-01/821-1841/gipzh/index.html</a>) and it works for me. I don&#39;t have to specify the Content-Type header in the request.The resource method or endpoint is chosen according the Accept header.</div>
<div><br></div><div>method level</div><div><br></div><div>@GET<br></div><div><div>@Produces({&quot;application/vnd.aerogear.v101+json&quot;})</div><div>public List&lt;Member&gt; listAllMembers() {</div><div>    return repository.findAllOrderedByName();</div>
<div>}</div></div><div><div><br></div><div>    </div><div>@GET</div><div>@Produces({&quot;application/vnd.aerogear.v102+json&quot;})</div><div>public List&lt;Member&gt; listAllMembersNew() {</div><div>    return null;</div>
<div>}</div></div><div><br></div><div>class level</div><div><br></div><div><div>@Path(&quot;/members&quot;)</div><div>@RequestScoped</div><div>@Produces({&quot;application/vnd.aerogear.v102+json&quot;})</div><div>public class MemberResourceRESTServiceV102 {</div>
</div><div><br></div><div><div>@Path(&quot;/members&quot;)</div><div>@RequestScoped</div><div>@Produces({&quot;application/vnd.aerogear.v101+json&quot;})</div><div>public class MemberResourceRESTService {</div></div><div>
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-09-02 9:24 GMT+03:00 Erik Jan de Wit <span dir="ltr">&lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div class=""><blockquote type="cite"><div dir="ltr"><div>Could you try the @produces annotation?</div>
</div></blockquote><div><br></div></div><div>Same effect</div><div><div class="h5"><br><blockquote type="cite"><div dir="ltr"><div><br></div>I believe it will work with the Accept header since it indicates the acceptable media-types from the client</div>
<div class="gmail_extra"><br>
<br><div class="gmail_quote">2014-09-01 14:33 GMT+03:00 Erik Jan de Wit <span dir="ltr">&lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><div><div><blockquote type="cite"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Another option that might work out of the box would be to use the jax-rs @Consumes annotation e.g <span style="color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:12px;line-height:16.799999237060547px;white-space:pre-wrap">@Consumes</span><span style="font-weight:bold;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:12px;line-height:16.799999237060547px;white-space:pre-wrap">({</span><span style="color:rgb(221,17,68);font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:12px;line-height:16.799999237060547px;white-space:pre-wrap">&quot;application/vnd.aerogear.v101+json&quot;</span><span style="font-weight:bold;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:12px;line-height:16.799999237060547px;white-space:pre-wrap">}) on the service endpoints</span>.      </div>

<div>So by making an abstract PushNotificationSenderEndpoint and and several PushNotificationSenderEndpointV101, PushNotificationSenderEndpointV102 with the right @Consumes annotation should work. I haven&#39;t tried it though </div>

</div></div></div></div></blockquote><br></div><div><br></div></div><div>Tried out this option as well, seems to work, but to use it one must set the Content-Type to “application/vnd.aerogear.v101+json” instead of the Accept header.</div>

<br></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote>
</div></div></div><br></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>