<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Daniel,<div><br></div><div>I think we can make the JAX-RS Response type work by overriding it. The internal ResponseBuilder needs to be stripped out etc. because I guess building a response on the client isn't very useful. However, I can't promise it for 2.2.0 but I will try.</div><div><br></div><div>Accessing the entity using a plain GWT response should be possible but you will need to call the marshaller yourself e.g. Marshalling.fromJson(response.getText(), MyEntity.class); or use MarshallingWrapper if you use Jackson instead of Errai's JSON.</div><div><br></div><div>Cheers,</div><div>Christian</div><div><br></div><div><br><div><div>On 2012-11-05, at 12:42 PM, Daniel Sachse <<a href="mailto:sachsedaniel@gmail.com">sachsedaniel@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Christian,<div><br></div><div>First problem:</div><div>I could also live with GWTīs Response type, if I could access the entity I provided with my REST Response. Unfortunately this doesnīt seem to be possible.</div><div>I want to stay DRY and I donīt want to implement REST services especially for the ERRAI frontend. At the moment I am trying to implement another frontend for my existing application with Errai.</div><div><br></div><div>Second problem:</div><div>Yes I have seen the conversation and I always make my decorators dependent. Unfortunately the conversation didnīt help me :(</div><div>Well, which information would you need about my beans? I am just trying to have a normal interface attached with JAX-RS annotations, a normal "@Dependent" scoped REST service and a decorator. I donīt inject anything all. Just decorating a plain REST implementation with some mock data.</div><div><br></div><div>Regards,</div><div><br></div><div>Daniel</div><div><br>
<br><div><div>Am 05.11.2012 um 16:42 schrieb Christian Sadilek <<a href="mailto:csadilek@redhat.com">csadilek@redhat.com</a>>:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Daniel,<div><br></div><div>Yes, the javax.ws.rs.core.Response object is not GWT-translatable. We could try and workaround this by overriding the type (we already did this for various other but simpler EE classes). Nobody requested this yet but it might be worth doing. GWT's Response type is somewhat similar from a client's point of view and can be used in a callback (see <a href="https://docs.jboss.org/author/display/ERRAI/Handling+Responses">https://docs.jboss.org/author/display/ERRAI/Handling+Responses</a>)</div><div><br></div><div>The second problem seems to imply that the CDI Decorators have to be dependent-scoped. Did you see this conversation:</div><div><a href="http://transcripts.jboss.org/channel/irc.freenode.org/#weld-dev/2011/#weld-dev.2011-10-17.log">http://transcripts.jboss.org/channel/irc.freenode.org/%23weld-dev/2011/%23weld-dev.2011-10-17.log</a></div><div><br></div><div>Can you share more information about your beans? You can also post it to the errai or the weld forums, of course.</div><div><br></div><div>Cheers,</div><div>Christian</div><div><br><div><div>On 2012-11-05, at 6:50 AM, Daniel Sachse <<a href="mailto:sachsedaniel@gmail.com">sachsedaniel@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><font face="Arial">Hey guys,</font><div><font face="Arial"><br></font></div><div><font face="Arial">I wanted to sum up some problems I ran into while using Errai and JAX-RS.</font></div><div><font face="Arial"><br></font></div><div><ol class="MailOutline"><li><font face="Arial">I normally use the <i>javax.ws.rs.core.Response</i> Object in my REST services to return different Status codes depending on custom conditions. Unfortunately I get compiler errors telling me : "</font><i>No source code is available for type javax.ws.rs.core.Response; did you forget to inherit a required module?". </i>Any ideas about that?</li><li>Using Interfaces with JAX-RS annotations like @Path, @GET, etc. with "normal" Object responses work fine so far. BUT, as soon as I try to attach CDI decorators to such an Interface, Weld complains with: "<i>org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001306 Attempting to inject an unproxyable normal scoped bean Decorator
.</i>", although the implementation is perfectly proxyable. Did anybody experience something similar?</li></ol><div><br></div></div><div>Some technical infos:</div><div>I am using JBoss 7.1.1.Final and Errai 2.1.1.Final.</div><div><br></div><div>Hope somebody knows anything :)</div><div><br></div><div>Regards,</div><div><br></div><div>Daniel (w0mbat)</div></div>_______________________________________________<br>errai-dev mailing list<br><a href="mailto:errai-dev@lists.jboss.org">errai-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/errai-dev">https://lists.jboss.org/mailman/listinfo/errai-dev</a><br></blockquote></div><br></div></div>_______________________________________________<br>errai-dev mailing list<br><a href="mailto:errai-dev@lists.jboss.org">errai-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/errai-dev">https://lists.jboss.org/mailman/listinfo/errai-dev</a><br></blockquote></div><br></div></div>_______________________________________________<br>errai-dev mailing list<br><a href="mailto:errai-dev@lists.jboss.org">errai-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/errai-dev<br></blockquote></div><br></div></body></html>