Hey,

I just realized, that this is a Resteasy problem. It only happens, if one defines the JAX-RS annotation on the interface rather than on the implementation.
I created a small demo application that shows the problem: https://github.com/w0mbat/RESTTest
Will bug the Resteasy guys with my problem now ;)

Cheers,

Daniel

Am 05.11.2012 um 18:42 schrieb Daniel Sachse <sachsedaniel@gmail.com>:

Hi Christian,

First problem:
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.
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.

Second problem:
Yes I have seen the conversation and I always make my decorators dependent. Unfortunately the conversation didnīt help me :(
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.

Regards,

Daniel


Am 05.11.2012 um 16:42 schrieb Christian Sadilek <csadilek@redhat.com>:

Hi Daniel,

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 https://docs.jboss.org/author/display/ERRAI/Handling+Responses)

The second problem seems to imply that the CDI Decorators have to be dependent-scoped. Did you see this conversation:

Can you share more information about your beans? You can also post it to the errai or the weld forums, of course.

Cheers,
Christian

On 2012-11-05, at 6:50 AM, Daniel Sachse <sachsedaniel@gmail.com> wrote:

Hey guys,

I wanted to sum up some problems I ran into while using Errai and JAX-RS.

  1. I normally use the javax.ws.rs.core.Response Object in my REST services to return different Status codes depending on custom conditions. Unfortunately I get compiler errors telling me : "No source code is available for type javax.ws.rs.core.Response; did you forget to inherit a required module?". Any ideas about that?
  2. 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:  "org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001306 Attempting to inject an unproxyable normal scoped bean Decorator….", although the implementation is perfectly proxyable. Did anybody experience something similar?

Some technical infos:
I am using JBoss 7.1.1.Final and Errai 2.1.1.Final.

Hope somebody knows anything :)

Regards,

Daniel (w0mbat)
_______________________________________________
errai-dev mailing list
errai-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/errai-dev

_______________________________________________
errai-dev mailing list
errai-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/errai-dev