hstaudacher / osgi-jax-rs-connector

An OSGi - JAX-RS 2.0 Connector, software repository available on the link below
http://hstaudacher.github.io/osgi-jax-rs-connector
Other
190 stars 98 forks source link

WADL endpoint generation #153

Open xandros6 opened 8 years ago

xandros6 commented 8 years ago

Hi, according to https://jersey.java.net/documentation/latest/wadl.html is possible to generate and expose a WADL description of services for free. How is possible to achieve this with osgi-jax-rs-connector?

Thanks!

cedossan commented 7 years ago

Hi, I'm using osgi-jax-rs-connector and I'm also interested by the generation of a WADL file. It seems that the issue still remains. Is there any workaround or clues ? Thanks!

pbankovic commented 6 years ago

Hello, my comment came probably late on this topic, but I'm adding it just in case that somebody faces this issue in the future. I'm quite new to OSGi, but I played a little bit with these nice features that hstaudacher provided for us. After some experimenting, I found that not all Jersey features are enabled by default as they usually would, so I tried to enable the wadl feature manually, and it worked. You just need to add this line to the start method in your activator class:

bundleContext.registerService(WadlFeature.class, new WadlFeature(), null);

Then start your app and hit http://localhost:[port]/services/application.wadl

Best regards!