I do not have a step by step tutorial but the CXF-DOSGi samples should help you get started. I plan to do one though. Can you give me some hints what you want to see? Or maybe an example JAXRS
service outside OSGi. Just to see what customizations you want to do.

The first thing you need is a index for bndtools. You can simply start with this pom:
https://github.com/apache/cxf-dosgi/tree/master/samples/repository

Your service to export is just a DS service with JAXRS annotations and the RSA properties.
https://github.com/apache/cxf-dosgi/blob/master/samples/rest/impl/src/main/java/org/apache/cxf/dosgi/samples/rest/impl/TaskResourceImpl.java

For the customizations your use a DS component similar to:
https://github.com/apache/cxf-dosgi/blob/master/samples/ssl/ssl-intent/src/main/java/org/apache/cxf/dosgi/samples/ssl/SslIntent.java

You implement the Callable<List<Object>> interface and return the customizations you need like ExceptionHandler and MessageBodyWriter / reader. You export this as a service with the property org.apache.cxf.dosgi.IntentName=yourintentname to give it a name.

Then in your user service you use the property service.exported.intents=yourintentname to make the service use the intent.

This is how it works currently but we are thinking about using an annotation based approach to make this easier. As I am not yet sure how to best design this I would be happy about ideas.

I am currently also experimenting with an Aries RSA ExportPolicy for jaxrs. This would allow the service to omit the special RSA properties and simply be picked up if it has an @Path annotation.

Christian

On 07.11.2016 04:27, manoj.vrajam...@wipro.com wrote:

Do we hava a complete step by step tutorial on how to implement a full fledged REST (whether JAX RS or CFX-DoSGi) in OSGi/Enroute? If so, the link would be really helpful..Thanks..


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to