Java Virtal Machine.net

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

November/2024
SunMonTueWedThuFriSat
     12
3456789
1011121314 1516
17181920212223
24252627282930
       

[ Archives News
for 'Java Technology' ]

home > news > java technology > jax-ws web service in an osgi bundle

JAX-WS Web Service in an OSGi bundle

Recently a user in GlassFish forum asked about developing JAX-WS web service in an OSGi bundle. Here is a complete sample demonstrating a JAX-WS web service invoking an OSGi service via OSGi service registry. You can download it from here. The diagram below hopefully explains the organisation of the sample:   As the above diagram shows, we have three components, viz: 1) osgi-service.jar: This is an OSGi bundle which provides a service to other bundles. It contains two POJOs, viz: a) an interface called sahoo.hybridapp.jaxws1.service.Watch, b) an implementation of the same interface called sahoo.hybridapp.jaxws1.service.WatchImpl.  This bundle also contains a bundle activator called sahoo.hybridapp.jaxws1.service.Activator, which is responsible for registering an instance of WatchImpl in OSGi service registry. 2) web-service.war: This is a Web Application Bundle. A Web Application Bundle is a hybrid application - it's both a Java EE archive as well as an OSGi bundle. In this case, it is a war file as well as an OSGi bundle. It's a war file, because it contains a Servlet based JAX-WS end point. It's an OSGi bundle, because we want to make use of OSGi service in the implementation of our web service. It contains a single class called sahoo.hybridapp.jaxws1.webservice.WatchWebService which is defined like this:   package sahoo.hybridapp.jaxws1.webservice; import sahoo.hybridapp.jaxws1.service.Watch...


Date: April, 08 2010
Url: http://www.java.net/blog/ss141213/archive/2010/04/08/jax-ws-web-service-osgi-bundle


Others News

©2002-2019Java-Virtual-Machine.net https://mobirise.com/ | it | free icon fonts | bootstrap navbar template | css3 menu