Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1B1C7200B63 for ; Mon, 15 Aug 2016 19:11:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 19977160AA7; Mon, 15 Aug 2016 17:11:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5F4CC160A8A for ; Mon, 15 Aug 2016 19:11:04 +0200 (CEST) Received: (qmail 39579 invoked by uid 500); 15 Aug 2016 17:11:03 -0000 Mailing-List: contact user-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@karaf.apache.org Delivered-To: mailing list user@karaf.apache.org Received: (qmail 39569 invoked by uid 99); 15 Aug 2016 17:11:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Aug 2016 17:11:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 001E5C0E29 for ; Mon, 15 Aug 2016 17:11:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.492 X-Spam-Level: X-Spam-Status: No, score=0.492 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=basistech.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id RaTx7q9tgspM for ; Mon, 15 Aug 2016 17:10:59 +0000 (UTC) Received: from mail-ua0-f181.google.com (mail-ua0-f181.google.com [209.85.217.181]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 095B15F642 for ; Mon, 15 Aug 2016 17:10:58 +0000 (UTC) Received: by mail-ua0-f181.google.com with SMTP id 97so82484865uav.3 for ; Mon, 15 Aug 2016 10:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basistech.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=dC1Kuf4nzJZgx9oInu9PQOiM3W9IGt326VSo52Skf0Y=; b=xshE9htPjE50Jn4rZiwQtlc5N5f2iDBM1TUqAP2hUAkYorbk+bcjumgZyg/nqf89u6 qPPqMory8FfQSaanjZWVpBD+SMwG4I9UALk1Suwiw4f3wQv36ItROdH3jvuJExfjSAN5 TKZ4HwSp20Y/tgQInpY3Ztch4EaUWS6Idd4gM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=dC1Kuf4nzJZgx9oInu9PQOiM3W9IGt326VSo52Skf0Y=; b=CCdFW7rinUAdwm2xuvNWli/NJKQdr7FgLQRpLvvKGfky79wLhr544zxPwoY3eCxgMC rCMCoYvaymckVEQDOGkIJOOr135CdaHorWwp2lQoc7YpCWGEJfXOs2YnILrdMHXQqOjC n6ezoK9hF/Tz7oSS60jJj3u7qz3edLmNyjs9d+mfmXbZBhCsCNEIIpo5ZQaothTLBF5s IWSq3V6oxvKR6biXJItXJtFW3etBBXy361e54kux8sKFA+UZMudPddbi21ZBW5VINQRi FkmtZPPzE+efdqR6rTfTF3gAeUnfe/iQOALjynnnKs3Ur61gqNQGkJPe/XcRbGU8+GJN bXKg== X-Gm-Message-State: AEkoousNAmir5LdKneZgW77sdUozw1LdAIhhrazprBSH74dRedQQO1pZUh9x8l8dEr1KQitNWbJoE9NJIRtLsmc3 X-Received: by 10.31.236.66 with SMTP id k63mr3756488vkh.48.1471281058245; Mon, 15 Aug 2016 10:10:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.129.136 with HTTP; Mon, 15 Aug 2016 10:10:57 -0700 (PDT) In-Reply-To: <4b06eb12-34e5-60bd-46a4-7f2102201cbd@composent.com> References: <1471274502582-4047529.post@n3.nabble.com> <4b06eb12-34e5-60bd-46a4-7f2102201cbd@composent.com> From: Benson Margulies Date: Mon, 15 Aug 2016 13:10:57 -0400 Message-ID: Subject: Re: RESTful web service in Karaf using CXF and blueprint To: user@karaf.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Mon, 15 Aug 2016 17:11:05 -0000 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 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 >> element instead of a 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. > > >