Perfect! That&#39;s exactly what I was going for but couldn&#39;t quite express since the coffee hadn&#39;t hit yet :)<br><br>Awesome!<br><br><div class="gmail_quote">On Fri, Oct 29, 2010 at 12:13 PM, Pete Muir <span dir="ltr">&lt;<a href="mailto:pmuir@bleepbleep.org.uk">pmuir@bleepbleep.org.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Very nice!<br>
<font color="#888888"><br>
--<br>
Pete Muir<br>
<a href="http://in.relation.to/Bloggers/Pete" target="_blank">http://in.relation.to/Bloggers/Pete</a><br>
</font><div><div></div><div class="h5"><br>
On 29 Oct 2010, at 17:14, Jozef Hartinger &lt;<a href="mailto:jharting@redhat.com">jharting@redhat.com</a>&gt; wrote:<br>
<br>
&gt; Thanks Lincoln, great ideas! The RESTEasy Client Framework also allows reusing of JAX-RS annotated interfaces, so we can have an interface<br>
&gt;<br>
&gt; @Path(&quot;/users&quot;)<br>
&gt; public interface UserService<br>
&gt; {<br>
&gt;   @GET<br>
&gt;   List&lt;User&gt; searchUsers(@QueryParam(&quot;search&quot;) String query,@QueryParam(&quot;start&quot;) int start, @QueryParam(&quot;limit&quot;) int limit);<br>
&gt; }<br>
&gt;<br>
&gt; which is implemented by the server. Then on the client, we can reuse it an simply do:<br>
&gt;<br>
&gt; @Inject @RestService(url=&quot;<a href="http://example.com/users" target="_blank">http://example.com/users</a>&quot;)<br>
&gt; private UserService users;<br>
&gt;<br>
&gt; ...<br>
&gt; List&lt;User&gt; jozefs = users.searchUsers(&quot;Jozef&quot;, 0, 20);<br>
&gt;<br>
&gt; which gets translated to the following and sent to the server:<br>
&gt; GET <a href="http://example.com/users?search=Jozef&amp;start=0&amp;show=20" target="_blank">http://example.com/users?search=Jozef&amp;start=0&amp;show=20</a><br>
&gt; The response is unmarshalled automatically.<br>
&gt;<br>
&gt; I&#39;ve opened <a href="https://jira.jboss.org/browse/SEAMREST-5" target="_blank">https://jira.jboss.org/browse/SEAMREST-5</a> Feel free to add.<br>
&gt;<br>
&gt; On 10/29/2010 03:43 PM, Lincoln Baxter, III wrote:<br>
&gt;&gt; Yes, exactly! Though I suppose if they are using RestEasy they will have<br>
&gt;&gt; this functionality by default, as you suggest. I wasn&#39;t thinking clearly<br>
&gt;&gt; when I wrote this, however. You are very correct. If RestEasy is already<br>
&gt;&gt; on the classpath, it should probably provide injection for web-service<br>
&gt;&gt; endpoints (via @Qualifer) annotations.<br>
&gt;&gt;<br>
&gt;&gt; @Inject @RestEndpoint<br>
&gt;&gt; private Endpoint&lt;DataService&gt; endpoint;<br>
&gt;&gt;<br>
&gt;&gt; The endpoint could then provide access to things like the HttpClient,<br>
&gt;&gt; the Request object, methods to invoke:<br>
&gt;&gt;<br>
&gt;&gt; endpoint.sendRequest();<br>
&gt;&gt; endpoint.getResponse();<br>
&gt;&gt;<br>
&gt;&gt; And would take care of the bootstrap / typing / (un)marshalling, etc...<br>
&gt;&gt;<br>
&gt;&gt; Pretty much a super-quick way of specifying a web-service endpoint and<br>
&gt;&gt; invoking it via RestEasy Client Framework (under the covers of course)<br>
&gt;&gt; If there&#39;s an easier way, then this wouldn&#39;t be needed, but that&#39;s my<br>
&gt;&gt; thought!<br>
&gt;&gt;<br>
&gt;&gt; --Lincoln<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Oct 29, 2010 at 4:09 AM, Jozef Hartinger &lt;<a href="mailto:jharting@redhat.com">jharting@redhat.com</a><br>
&gt;&gt; &lt;mailto:<a href="mailto:jharting@redhat.com">jharting@redhat.com</a>&gt;&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;    Do you mean making a fork of the client framework in seam-rest or<br>
&gt;&gt;    providing an integration with it (available when RESTEasy is on<br>
&gt;&gt;    classpath)? I&#39;ll add it to the project ideas page.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;    On 10/27/2010 04:06 PM, Lincoln Baxter, III wrote:<br>
&gt;&gt;<br>
&gt;&gt;        Excellent! I think that&#39;s a good call, and will help people adopt!<br>
&gt;&gt;<br>
&gt;&gt;        Have we considered moving the RestEast Client Framework into Seam<br>
&gt;&gt;        RestEasy, or at least pulling it in if we are not already? That<br>
&gt;&gt;        might be<br>
&gt;&gt;        another sweet feature to help wet people&#39;s appetite.<br>
&gt;&gt;<br>
&gt;&gt;        Since we&#39;re no longer directly targeting RESTEasy, having a client<br>
&gt;&gt;        consumer framework available to them would no longer be a<br>
&gt;&gt;        &quot;standard,&quot;<br>
&gt;&gt;        but it certainly would be nice.<br>
&gt;&gt;<br>
&gt;&gt;        I think we should consider this if not already done.<br>
&gt;&gt;        --Lincoln<br>
&gt;&gt;<br>
&gt;&gt;        On Wed, Oct 27, 2010 at 6:29 AM, Pete Muir<br>
&gt;&gt;        &lt;<a href="mailto:pmuir@bleepbleep.org.uk">pmuir@bleepbleep.org.uk</a> &lt;mailto:<a href="mailto:pmuir@bleepbleep.org.uk">pmuir@bleepbleep.org.uk</a>&gt;<br>
&gt;&gt;        &lt;mailto:<a href="mailto:pmuir@bleepbleep.org.uk">pmuir@bleepbleep.org.uk</a><br>
&gt;&gt;        &lt;mailto:<a href="mailto:pmuir@bleepbleep.org.uk">pmuir@bleepbleep.org.uk</a>&gt;&gt;&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;            Jozef has decided to target this module at the JAX-RS<br>
&gt;&gt;        standard only,<br>
&gt;&gt;            therefore the module name has changed slightly. We renamed<br>
&gt;&gt;        the repo<br>
&gt;&gt;            on github accordingly.<br>
&gt;&gt;            _______________________________________________<br>
&gt;&gt;            seam-dev mailing list<br>
&gt;&gt;        <a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a>&gt;<br>
&gt;&gt;        &lt;mailto:<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a>&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;        <a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;        --<br>
&gt;&gt;        Lincoln Baxter, III<br>
&gt;&gt;        <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt;&gt;        <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt;&gt;        &quot;Keep it Simple&quot;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;        _______________________________________________<br>
&gt;&gt;        seam-dev mailing list<br>
&gt;&gt;        <a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a>&gt;<br>
&gt;&gt;        <a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Lincoln Baxter, III<br>
&gt;&gt; <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt;&gt; <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt;&gt; &quot;Keep it Simple&quot;<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>&quot;Keep it Simple&quot;<br>