javaee / metro-jax-ws

https://javaee.github.io/metro-jax-ws/
Other
132 stars 68 forks source link

It looks the ProviderImpl has been moved to pacakge "com\sun\xml\ws\spi" from "com.sun.xml.internal.ws.spi", but the Provider class is still referring in the old package? #1247

Open FuminZhou opened 5 years ago

lukasj commented 5 years ago

which ProviderImpl from which version of which product? com.sun.xml.ws.spi.ProviderImpl or com.sun.xml.internal.ws.spi.ProviderImpl?

FuminZhou commented 5 years ago

I am using jaxws 2.3.0. It gave me "com.sun.xml.internal.ws.spi.ProviderImpl" not found. When I check the jar, I found a "ProviderImpl" under ""com.sun.xml.ws.spi" in jaxws-rt.jar. But when debug into Provider (under javax.xml.ws.spi, in jaxws-api.jar), it looks the decompiled class indicates its fallback Provider is "com.sun.xml.internal.ws.spi.ProviderImpl". Thus the question/issue. I have not gotten the source code of these yet.

lukasj commented 5 years ago

the 'internal' one is in the jdk - hence my question wrt 'product' and its explicit version. Can you share your classpath/modulepath/endorsed setup (basically command you use to launch java) as well as jdk version. Is this on Java SE or within some server? Are you using just jaxws-ri (jaxws-rt.jar) or metro (webservices-rt.jar)?

FuminZhou commented 5 years ago

Oh. Sorry for my omission. I am looking into java 11/java9, which does not have the jdk "internal" ProviderImpl anymore, and I thought the jaxws 2.30 is itself self contained with its Provider.

FuminZhou commented 5 years ago

Upon further debugging, it looks at least there is a workaround: the FactoryFinder used by the Provider could find a Provider specified by a jaxws.properties. After I point it to the "com.sun.xml.ws.spi.ProviderImpl" I am able to move forward. -Would we say the jaxws-ri 2.3.0 by itself does not appear to work out of the box for java 11?

(I thought the "com.sun.xml.ws.spi.ProviderImpl" was meant to replace the "com.sun.xml.internal" one - with jaxws being externalized from java 11, removing the "internal" kind of make sense.)

lukasj commented 5 years ago

the thing is that 2.3.0 has been released before jdk9 went final and jdk11 is still not yet final

FuminZhou commented 5 years ago

Got it - and thanks for your patience. There is another workaround which is to specify the Provider implementation using JVM properties. I thought this is an issue with my own presumption. -But worth to keep this in consideration for future development/release of jaxws?