karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <ben...@basistech.com>
Subject Re: RESTful web service in Karaf using CXF and blueprint
Date Mon, 15 Aug 2016 17:10:57 GMT
I do this by making DS @Activate methods call the CXF API to publish
REST services.


On Mon, Aug 15, 2016 at 1:08 PM, Scott Lewis <slewis@composent.com> wrote:
> Hi Marc,
>
> The OSGi Remote Services specification (and the associated Remote Service
> Admin sepc) defines a standardized way to export OSGi services for remote
> access.   The specification is defined in a way that allows the use of
> arbitrary distribution providers that are responsible for making the OSGi
> service accessible from outside of the OSGi process.
>
> ECF [1] has an implementation of these specs that supports many distribution
> providers [2], including two that I'm working on now that supports any
> Jax-RS implementation (i.e. both CXF and Jersey).   These two distribution
> providers are here [3] and I'm finalizing them for an initial release.
> Note that for these providers, in addition to specifying jax-rs resources
> via OSGi services, the jax-rs configuration (e.g. MessageBodyReader/Writers,
> Features, etc) can also be specified via OSGi services.
>
> Scott
>
> [1] https://wiki.eclipse.org/ECF
> [2] https://wiki.eclipse.org/Distribution_Providers
> [3] https://github.com/ECF/JaxRSProviders
>
> On 8/15/2016 8:21 AM, Marc Durand wrote:
>>
>> Hello,
>> I was following Christian's tutorial here:
>>
>> http://liquid-reality.de/display/liquid/2011/12/22/Karaf+Tutorial+Part+4+-+CXF+Services+in+OSGi
>>
>> And I also found come blog posts from JB that show how to deploy RESTful
>> services using blueprint.
>>
>> What I couldn't find was an example on how to deploy a RESTful service
>> where
>> the resource class is an OSGi service (to take advantage of SCR references
>> to other services in the resource class).  I was able to do it by using a
>> <reference> element instead of a <bean> element in the blueprint file.
 Is
>> this approach correct or will it lead to other problems down the road?
>>
>> Thanks!
>> Marc
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/RESTful-web-service-in-Karaf-using-CXF-and-blueprint-tp4047529.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>
>
>

Mime
View raw message