On 20/04/2017 08:38, Heiko Wagner wrote:

Sorry for my ignotance, but I need some advice on how to properly write
a desktop app that uses JAX-WS to pull some data from a WS-I Service.

I can understand why JAX-WS is deprecated and marked for removel to help
out the Java EE crwod to migrate their application servers to JDK9, but
I don't fully understand what the right thing would be to do in my
situation. Is the java.xml.ws module just "moved" to Java EE or is it
completely removed and replaced with a module that has a new name?

In the first case I ussume it would be the right thing to decare a
dependency on java.xml.ws and rely on the presence of the module in Java
SE 9 and ship a module implementing JAX-WS in Java SE 10 along my
application. I assume jlink would help me out to get a appropriate
runtime image in both cases. This would be just like the Java Mail API
case, where there is nothing wrong with using it in th Java SE context,
when you make sure you supply a implementation with your app and rely on
the platform to provide a implementation in the Java EE context.

In the latter case, is there already a proper new module name or module
alias I can depend on in my application?

With JDK 9 then you have several choices. For existing code then it should continue to work with any of the following:

1. Compile/run with `--add-modules java.xml.ws` to use the java.xml.ws module in the JDK.

2. Deploy the standalone version of JAX-WS on the class path.

3. Deploy the standalone version of the java.xml.ws module on the upgrade module path (to override the module in the JDK) and compile/run with `--add-modules java.xml.ws`

If you migrate your code to a module then your module will `requires java.xml.ws` so you won't need `--add-modules java.xml.ws` on the command line. You have the choice to use the java.xml.ws in the JDK or you can deploy the standalone version of the java.xml.ws on the upgrade module path.

If java.xml.ws is dropped in Java SE 10, and if JDK 10 declines to bundle it, then deployments using the standalone version should continue to just work.

To your question then I'm not aware of any proposal to rename the java.xml.ws module. However, I believe the standalone version has chosen to continue with the historical splitting of the API and implementation. The API module will be "java.xml.ws" and the implementation modules will have other names. This should be transparent to consumers of java.xml.ws of course. Dmitry Kornilov or Roman Grigoriadi may wish to comment on this as I think it would be useful to get some early testing of the standalone versions as modules to make sure that there aren't any issues.

-Alan

Reply via email to