Re: REST - Declarative Services

2018-09-06 Thread Jean-Baptiste Onofré
Hi, As said, let me finish the Decanter 2.1.0 release and I will add a full example. Thanks ! Regards JB On 06/09/2018 11:54, atouat wrote: > Good morning @jbonofre,thanks for your reply. I tried it, but unfortunately I > got the same results.Here are the generated service.xmls:*1) > RestApiApp*

Re: REST - Declarative Services

2018-09-06 Thread Francois Papon
Hi, There is an issue on the Apache Aries JAX-RS Whiteboard component, may be it's related to your problem : https://issues.apache.org/jira/browse/ARIES-1825 regards, François Papon fpa...@apache.org Le 06/09/2018 à 14:09, atouat a écrit : > Hi @Tim-Ward-2, > > thatns for your input. I cleaned

Re: REST - Declarative Services

2018-09-06 Thread atouat
Hi @Tim-Ward-2, thatns for your input. I cleaned my karaf and just installed my feature xml. Aöll Bunldes are active. karaf@root()> list START LEVEL 100 , List Threshold: 50 ID | State | Lvl | Version| Name ++-++---

Re: REST - Declarative Services

2018-09-06 Thread atouat
Good morning @jbonofre,thanks for your reply. I tried it, but unfortunately I got the same results.Here are the generated service.xmls:*1) RestApiApp*/ /*2) Api*//I can see the two services starting ( the sysouts are displayed int he karaf console).But the http:list and

Re: REST - Declarative Services

2018-09-06 Thread Jean-Baptiste Onofré
I will add a full example to test this. Thanks for your feedback. Regards JB On 06/09/2018 10:49, Tim Ward wrote: > Hi, > > So there have been a number of suggestions on this thread which are > unnecessary, and will confuse matters. > > 1. There is no need to provide a JAX-RS Application to u

Re: REST - Declarative Services

2018-09-06 Thread Tim Ward
Hi, So there have been a number of suggestions on this thread which are unnecessary, and will confuse matters. There is no need to provide a JAX-RS Application to use the JAX-RS whiteboard. The whiteboard always has a default application which is, unsurprisingly, what is used by default. The “

Re: REST - Declarative Services

2018-09-05 Thread Nicolas Brasey
Hi, Are you sure you are not missing the "cxf" prefix in the URL to access your endpoint? By default, cxf deploys your endpoint with the CXFNonSpringServlet, which listens on the cxf context path, so your endpoint should be available here: http://localhost:8181/cxf/hello

Re: REST - Declarative Services

2018-09-05 Thread Jean-Baptiste Onofré
Hi, did you try to add a application with your context. Something like: @Component( service = Application.class, property= { "osgi.jaxrs.name=RestApp", JAX_RS_APPLICATION_BASE + "=/rest",

Re: REST - Declarative Services

2018-09-05 Thread atouat
Hi Francois, I treid that too. See this excerpt: karaf@root()> service:list | grep -C 10 rest [de.rest.test.ExampleRest] -- component.id = 4 component.name = de.rest.test.ExampleRest osgi.jaxrs.application.select = (osgi.jaxrs.name=.default) * osgi.jaxrs.endpoint = /hel

Re: REST - Declarative Services

2018-09-05 Thread Francois Papon
Hi, May be you are missing the JAX_RS_SERVICE_ENDPOINT, there is a description in the specification : https://osgi.org/specification/osgi.cmpn/7.0.0/service.jaxrs.html#org.osgi.service.jaxrs.runtime.JaxrsServiceRuntimeConstants.JAX_RS_SERVICE_ENDPOINT regards, François Papon fpa...@apache.org

Re: REST - Declarative Services

2018-09-05 Thread atouat
Hi @all, Wow! Very active community here in the forum. I appreciate this, thanks. @jbonofre In a current project at work, we already have rest services running in karaf by using cxf and blueprint. I also tried out @cschneider's propositon wiht cxf-dosgi and I got that running too. I just wanted

Re: REST - Declarative Services

2018-09-05 Thread Jean-Baptiste Onofré
Got it ;) AFAIR, Christian started a PoC about a Karaf resolver. I will resume what he started. Regards JB On 05/09/2018 17:01, Tim Ward wrote: I wasn’t referring to Karaf, I was referring to the enRoute build output! Tim On 5 Sep 2018, at 16:00, Jean-Baptiste Onofré

Re: REST - Declarative Services

2018-09-05 Thread Tim Ward
I wasn’t referring to Karaf, I was referring to the enRoute build output! Tim > On 5 Sep 2018, at 16:00, Jean-Baptiste Onofré wrote: > > By the way, Karaf is "not just Maven after all" ;) It's a little more than > that ;) (actually largely more than that ;)). > > On 05/09/2018 16:41, Tim Ward

Re: REST - Declarative Services

2018-09-05 Thread Jean-Baptiste Onofré
By the way, Karaf is "not just Maven after all" ;) It's a little more than that ;) (actually largely more than that ;)). On 05/09/2018 16:41, Tim Ward wrote: OSGi enRoute is a project aimed at getting users with little/no OSGi experience familiar with OSGi specifications and best practices. It

Re: REST - Declarative Services

2018-09-05 Thread Tim Ward
> On 5 Sep 2018, at 15:54, Jean-Baptiste Onofré wrote: > > OK, it's what I knew ;) > > So, basically, you answer helped the user generally speaking but I guess it's > not exactly what the user expects. > I was attempting to answer the question: Can someone provide a working example wi

Re: REST - Declarative Services

2018-09-05 Thread Jean-Baptiste Onofré
OK, it's what I knew ;) So, basically, you answer helped the user generally speaking but I guess it's not exactly what the user expects. Karaf has exactly the same target for the runtime space. Karaf Boot is more on the same space as enRoute. I would be more than happy to help to support Ka

Re: REST - Declarative Services

2018-09-05 Thread Tim Ward
OSGi enRoute is a project aimed at getting users with little/no OSGi experience familiar with OSGi specifications and best practices. It produces bundles and repository indexes, but it is not itself a runtime. The project is deliberately not opinionated about server platforms, and so it doesn’

Re: REST - Declarative Services

2018-09-05 Thread Jean-Baptiste Onofré
Does it run in Karaf ? Regards JB On 05/09/2018 16:30, Tim Ward wrote: OSGi enRoute contains tutorials and examples which cover using the JAX-RS whiteboard. They’re pretty quick to run through. https://enroute.osgi.org/Tutorial/ Best Regards, Tim On 5 Sep 2018, at 15:18, atouat

Re: REST - Declarative Services

2018-09-05 Thread Jean-Baptiste Onofré
Hi, My example works for the http whiteboard, but not Aries JAXRS whiteboard. For JAXRS, I provided example based on CXF. If CXF is not convenient for you, I can add a Aries JAXRS Whiteboard example, no problem. If your case, 404 means that the "listener servlet" has not been deployed or n

Re: REST - Declarative Services

2018-09-05 Thread Tim Ward
OSGi enRoute contains tutorials and examples which cover using the JAX-RS whiteboard. They’re pretty quick to run through. https://enroute.osgi.org/Tutorial/ Best Regards, Tim > On 5 Sep 2018, at 15:18, atouat wrote: > > Hello to everybody, > > I wanted

Re: REST - Declarative Services

2018-09-05 Thread atouat
Hello to everybody, I wanted to try out using Aries JAXRS Whiteboard, since there is released version now. For this, I have donwloaded a new Karaf 4.2.1. I created a feature in order to install Aries Jaxrs Whiteboard. The feature.xml looks like this: http://karaf.apache.org/xmlns/features/v1.4

Re: REST - Declarative Services

2018-07-02 Thread Scott Lewis
On 5/30/2018 2:17 AM, Tim Ward wrote: Almost certainly the simplest option has already been suggested. The OSGi JAX-RS whiteboard provides a simple, standard mechanism for registering JAX-RS applications, resources, and extensions using the OSGi service registry. The Aries JAX-RS whiteboard is

Re: REST - Declarative Services

2018-05-30 Thread Tim Ward
Almost certainly the simplest option has already been suggested. The OSGi JAX-RS whiteboard provides a simple, standard mechanism for registering JAX-RS applications, resources, and extensions using the OSGi service registry. The Aries JAX-RS whiteboard is the Reference Implementation of this sp

Re: REST - Declarative Services

2018-05-29 Thread Scott Lewis
On 5/28/2018 10:40 AM, Guenther Schmidt wrote: Hello All, I’ve been developing services using Declarative Services for dependency injection and it was a breeze so far. Now I want to expose some of the functionality via a REST API and I’m stuck. So far I’ve deployed my bundles through bundle:i

Re: REST - Declarative Services

2018-05-29 Thread Steinar Bang
> Guenther Schmidt : > Then there’s also the requirements to “feature” install cxf. That’s OK > btw, I only have to do that once. But is there really no simple way to > create a simple REST service using merely DS? Take a look at these two: https://github.com/steinarb/post-body-capture A

Re: REST - Declarative Services

2018-05-28 Thread Alex Weirig
BTW: these should be the features I installed in karaf ... feature:repo-add cxf-dosgi feature:install cxf-dosgi-provider-rs Mat frëndleche Gréiss, Mit freundlichen Grüßen, Meilleures salutations, Kind regards, Alex Weirig Responsable Technique Ville de Luxembourg Service Enseignement Centre

Re: REST - Declarative Services

2018-05-28 Thread Alex Weirig
I'm using the approach Christian is referring to and I can confirm that it's really easy and convenient. I'm creating DS services to expose selected backend services with a REST API @Component(         immediate = true         , property = {                 "service.exported.interfaces=*",    

Re: REST - Declarative Services

2018-05-28 Thread Christian Schneider
Aries JAX-RS should work. It is not yet released though. So currently there is only a snapshot. A release should follow soon. Another option is to use CXF-DOSGi. You can find an example below. It is similar to Aries JAX-RS so a later switch should be easy. https://github.com/apache/cxf-dosgi/tree

Re: REST - Declarative Services

2018-05-28 Thread Jean-Baptiste Onofré
Hi Guenther, You can use CXF registering the CXF JAXRS server using DS. Another option could be to use Aries JAXRS with the whiteboard pattern. We are preparing samples about that: https://github.com/jbonofre/karaf/tree/DEV_GUIDE/examples/karaf-rest-example I will add an example with Aries JAX

REST - Declarative Services

2018-05-28 Thread Guenther Schmidt
Hello All, I’ve been developing services using Declarative Services for dependency injection and it was a breeze so far. Now I want to expose some of the functionality via a REST API and I’m stuck. So far I’ve deployed my bundles through bundle:install -s man: …. all very easy. But what should