AFAIK you can't use OSGi declarative services from inside webapps or any
deployent artifacts. Declarative services are only for other OSGi bundles.
Its true that you can instantiate the service class and use it, or use
PriviledgedCarbonContext.getOSGiService(), but they are not the same as
using
Hi,
I'm trying to do the following.
1. Create a JAX-RS web app deploy it in AS
2. Create an OSGi bundle which has all the business logic implementation
(exposed as OSGi services) for above JAX-RS web services
3. Consume above OSGi services inside JAX-RS web app
What is the best way
Hi Harshan,
On Sun, Oct 19, 2014 at 11:37 AM, Harshan Liyanage hars...@wso2.com wrote:
Hi,
I'm trying to do the following.
1. Create a JAX-RS web app deploy it in AS
2. Create an OSGi bundle which has all the business logic
implementation (exposed as OSGi services) for above
Hi Harshan!
Apart from Apache CXF, Jersey is also a very good alternative that you can
consider in writing your JAX-RS web applications.
I am personally impressed with the simplicity of getting up-and-running
Restful web services using Jersey.
Resources that you may find useful on this:
[1]
Hi Harshan,
Yes, you can use Apache CXF for this purpose. You can find a simpler
example here[1] with sample code.
[1] .
http://wso2.com/library/articles/2012/10/develop-cxf-based-jaxws-wso2-developer-studio/
Regards,
Inosh
On Sun, Oct 19, 2014 at 5:07 PM, Dilan Udara Ariyaratne dil...@wso2.com
Hi Inosh,
As per the offline discussion with InoshP, I've modified the web app libs.
Now I'm able to access the logic implemented in OSGi bundles.
Thanks,
Best Regards,
Lakshitha Harshan
Software Engineer
Mobile: *+94724423048*
Email: hars...@wso2.com
Blog :