It is definitely possible. Microbule (a library I'm working on) supports creating JAX-RS services using the "whiteboard pattern". The SCR example is here:
https://github.com/Microbule/microbule/blob/master/example/scr/src/main/java/org/microbule/example/scr/HelloScr.java The interesting part (where you actually create the server) is here: https://github.com/Microbule/microbule/blob/master/core/src/main/java/org/microbule/core/DefaultJaxrsServerFactory.java Microbule is under heavy construction, but feel free to pilfer it for what you need or use it as you wish. On Wed, May 10, 2017 at 4:32 AM Massimo Bono <[email protected]> wrote: > Hello, > > I'm playing with Apache Karaf and CXF and I'm trying to setup a REST hello > world application with Declarative Service. Several tutorial are available > on the internet (like > > http://liquid-reality.de/display/liquid/2011/12/22/Karaf+Tutorial+Part+4+-+CXF+Services+in+OSGi > or > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=55153391 > ). > > However, there seems to be no example exploiting DS. I'm not accustomed to > blueprints, but I thought i could transfer the parameters inside it to DS. > Sadly, I can't translate jaxrs:server values from BP to DS. > > So my question are: > 1) Is it possible to start CXF on apache karaf (4.1.1) with DS? > 2) If yes, can you provide an example or some basic step to achieve it? > > Thanks for any kind reply > > -- > *Ing. Massimo Bono* >
