You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@openwebbeans.apache.org by dv...@craftwater.de on 2018/12/06 14:47:53 UTC

Use interfaces with JAX-RS Annotations in Meecrowave

Hi list,

I would like to use interfaces with JAX-RS annotations for a meecrowave service. Means the @Path, @GET, etc at the interface, @ApplicationScope at the implementation class which implements the interface.
The problem is that meecrowave seems not to register these classes as rest resources. If I annotate the implementation like in the examples everything works fine. The reason why I would like to have the annotations in an interface is, that I want to reuse them for a rest client.

Best wishes

Daniel

Re: Use interfaces with JAX-RS Annotations in Meecrowave

Posted by Romain Manni-Bucau <rm...@gmail.com>.
PS: also opened https://issues.apache.org/jira/browse/MEECROWAVE-165 for
that issue in the meantime

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 6 déc. 2018 à 15:57, Romain Manni-Bucau <rm...@gmail.com> a
écrit :

> Hello,
>
> the cxf-cdi discovery expects the impl to have @path, can you duplicate
> the anontation on the class (only, others will be inherited)?
>
> Side note: opened https://issues.apache.org/jira/browse/CXF-7921
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> | LinkedIn
> <https://www.linkedin.com/in/rmannibucau> | Book
> <https://www.packtpub.com/application-development/java-ee-8-high-performance>
>
>
> Le jeu. 6 déc. 2018 à 15:47, <dv...@craftwater.de> a écrit :
>
>> Hi list,
>>
>> I would like to use interfaces with JAX-RS annotations for a meecrowave
>> service. Means the @Path, @GET, etc at the interface, @ApplicationScope at
>> the implementation class which implements the interface.
>> The problem is that meecrowave seems not to register these classes as
>> rest resources. If I annotate the implementation like in the examples
>> everything works fine. The reason why I would like to have the annotations
>> in an interface is, that I want to reuse them for a rest client.
>>
>> Best wishes
>>
>> Daniel
>>
>

Re: Use interfaces with JAX-RS Annotations in Meecrowave

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hello,

the cxf-cdi discovery expects the impl to have @path, can you duplicate the
anontation on the class (only, others will be inherited)?

Side note: opened https://issues.apache.org/jira/browse/CXF-7921

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 6 déc. 2018 à 15:47, <dv...@craftwater.de> a écrit :

> Hi list,
>
> I would like to use interfaces with JAX-RS annotations for a meecrowave
> service. Means the @Path, @GET, etc at the interface, @ApplicationScope at
> the implementation class which implements the interface.
> The problem is that meecrowave seems not to register these classes as rest
> resources. If I annotate the implementation like in the examples everything
> works fine. The reason why I would like to have the annotations in an
> interface is, that I want to reuse them for a rest client.
>
> Best wishes
>
> Daniel
>