|Re: JAX-WS Web Service support [message #1052470 is a reply to message #1052134]
||Tue, 30 April 2013 05:49
| Tin N/A
Registered: December 2010
Unfortunately JAX-WS is a real mess, whether in OSGi or plain JEE environment. From my experience, the main reason for that is including a "lite" version of it into JDK and doing a very poor job of it (although the code itself and the documentation could use some/or plenty of work too). So when you need to use the full version you get all kinds of ugly exceptions stemming from the fact that the same classes work differently (contain different code) in JDK than in full JAX-WS.
You might be able to make full JAX-WS work though. I have a version that's working with 3.0.x using the following tricks (and it works for what I need it for, but can't say absolutely all functionalities will work):
1. use "-Djavax.xml.ws.spi.Provider=com.sun.xml.ws.spi.ProviderImpl -Djavax.xml.bind.context.factory=com.sun.xml.bind.v2.ContextFactory" when starting Virgo
2. put the following archives into virgo/endorsed directory: gmbal-api-only.jar, FastInfoset.jar, jaxb-api.jar, jaxb-impl.jar, jaxws-api.jar, stax-ex.jar, management-api.jar, mimepull.jar, streambuffer.jar, jmac-1.0-rev-1.jar
3. Put the JAX-WS implementation bundle, including WSIT into Virgo bundle repository
4. don't forget to start virgo with the -Djava.endorsed.dirs pointing to where you put the JARs from step 2
After that, in your bundle's MANIFEST, just import the whole JAX-WS implementation bundle, and you should hopefully be able to use full JAX-WS functionalities.
If I remember correctly, most or all of the JARs I mentioned above I "borrowed" from Glassfish installation and if some are not there, the rest I downloaded from Maven repos.
Finally, even though the above works for me, I'm not at all happy with how it's duct-taped together. So if there is a chance to make this work more cleanly, or use some other full JAX-WS implementation that's better engineered, documented and easier to integrate (both CXF and Axis2 at least advertise to be), I'd also be grateful if someone made an alternative tutorial or even officially include full JAX-WS into Virgo.
|Re: JAX-WS Web Service support [message #1052911 is a reply to message #1052470]
||Wed, 01 May 2013 09:30
| Franck Mising name
Registered: July 2009
Thanks Tin, I have tried four or five different approaches and I can't get anything working without suspicious tricks that I wouldn't dare deploy in production (because I don't understand their implications).|
I thought I was getting the hang of OSGFication, but the Jax-ws / Metro stuff takes the problem to a new level...
I was really liking Virgo so far, but I will probably have to look into JBoss because I need both JAX-WS and OSGI support.
My last attempt was to put my WSServlet-based webapp in its own plan, along with the metro WS bundles, hoping that the rest of the platform wouldn't see/pick up those bundles. But I can't even get a proper self-contained OSGI compatible version of metro, the OSGI bundles maintained by the Metro project have Glassfish specific dependencies and attempts at repackaging using BND led nowhere.
Edit: before I give up, a general OSGI question: in the headers below, does the "uses" directive mean that the IBM packages become non-optional? If not why would I get an UnableToSatisfyBundleDependenciesException trying to load that bundle (the headers are from org.glassfish.metro.webservices-osgi_126.96.36.199)??
[Updated on: Wed, 01 May 2013 09:48]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01788 seconds