Discussion:
How to use / install jaxws 2.2 in NetBeans
appercel
2011-06-09 13:54:28 UTC
Permalink
Historic:
- I've installed NetBeans 7.0, and the SOAP Web Services plugin.
- I've created a Java Library project in NetBeans 7.0.
- I've added a new Web Service Client.

When I look at the java code generated by the wsimport tool, I can see the following comment:
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.1.2-b05-RC1
* Generated source version: 2.1
*
*/

I would like that wsimport uses JAX-WS 2.2 instead. How can I do that ?
appercel
2011-06-09 14:38:16 UTC
Permalink
Hum, after having spent 3 or 4 hours on this topic, I've managed to find out that:

1) It's very important that BEFORE you add a new Web Service Client to your project, you need to first add the jax-ws 2.2 library to your project.

2) Otherwise, if you first add a new Web Service Client to your project, and then realize that it has been imported with wsimport version 2.1, then it's already too late: if you delete the imported Web Service Client, add the jax-ws 2.2 library to your project, and import the Web Service Client again, then it will just not work. Your project will still use the old wsimport version 2.1. This seems to be related to the fact that some project files have been created for a jax-ws version 2.1, and these project files are not or only partially updated when you switch to jax-ws 2.2.

IMHO, this is a bug, and this bug shall be addressed.


So I had do delete entirely my project in NetBeans, and recreate it from scratch. I've added the jax-ws 2.2 library to my project, and then I've added the Web Service Client references to my WSDL files. Now, when I look at the java code generated by the ws-import tool, I can see the following comment:
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2-hudson-752-
* Generated source version: 2.2
*
*/

Loading...