JAX-WS Web Service support [message #1052134] |
Mon, 29 April 2013 13:23  |
Eclipse User |
|
|
|
Hi all,
I have read all the existing messages I could find on the topic, and after experimenting myself for a couple days with loading the Metro reference implementation into Virgo/Tomcat 3.6.1 I would like to get an update on the current status about JAX-WS support in Virgo (existing info is at least 1 year old), in particular:
- are there any plans / discussions by the dev. team to add support for JAX-WS at some point in the future?
- has anyone managed to get the JAX-WS RI working in Virgo 3.6.x? I have been starting from the instructions for Metro on Tomcat, but the metro distribs have loads of Glassfish/Sun specific dependencies which make then hard to load in Virgo.
I am now looking into https://jax-ws.java.net/2.2.5/ which hopefully should have less dependencies.
Thanks!
|
|
|
Re: JAX-WS Web Service support [message #1052470 is a reply to message #1052134] |
Tue, 30 April 2013 01:49   |
Eclipse User |
|
|
|
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.
Good luck,
Tin
|
|
|
Re: JAX-WS Web Service support [message #1052911 is a reply to message #1052470] |
Wed, 01 May 2013 05:30   |
Eclipse User |
|
|
|
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.
Franck
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_2.2.1.1)??
Import-Package: com.ibm.security.util;resolution:=optional
Export-Package: com.sun.wsit.security;uses:="com.ibm.security.util";version="2.2.1.1"
[Updated on: Wed, 01 May 2013 05:48] by Moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09279 seconds