I followed the instructions here for properly installing the latest JAX-WS release (2.2.6) on top of my JDK v1.6.0_31 (i.e. copying the jaxws-api.jar and jaxb-api.jar from the JAX-WS release into my ${JAVA_HOME}/lib/endorsed directory). From inside Eclipse I can run the wsimport ant task properly and the generated code is giving a version stamp in the comments of:
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2.6b21
* Generated source version: 2.2
*
*/
The problem I'm having is that the generated client code is showing errors which lead me to believe that the compiler is still using JAX-WS version 2.1:
The constructor Service(URL, QName, WebServiceFeature[]) is undefined
and
The attribute required is undefined for the annotation type XmlElementRef
I tried explicitly setting the -Djava.endorsed.dir arg when starting Eclipse and I also tried setting this arg under Eclipse->Preferences->Java->InstalledJREs but neither of these helped. My wsimport ant task classpath is defined to look at the JAX-WS 2.2.6 jars. I also tried setting my project build path to pull in the 2.2.6 jars. Nothing seems to work. Am I missing something?