How to use JAX-WS 2.2.6 with JDK 1.6
JDK 1.6 comes with spec + implementation of JAX-WS 2.1. If we add all libs of JAX-WS 2.2.6 in our project classpath, the JDK still prefers it own JAXWS API i.e. version 2.1. It will cause jar conflicts or MethodNotFoundError etc. To use JAX-WS 2.2.6 or later with JDK 1.6, we must force JDK to load spec+impl ver. 2.2.6. It is done by endorsing new library. There are two ways to endorse JDK to use our provided libraries instead of its own. From JAX-WS 2.2.6 downloaded bundle. Put only jaxws-api.jar and jaxb-api.jar to JDK1.6/jre/lib/endorsed directory. Set "java.endorsed.dirs" environment variable, it should point to directory than must contain jars to be endorsed. e.g. java.endorsed.dirs=d:\endorsedlibs, where endorsedlibs directory contains two jar files mentioned in step 1. We must not put all JAX-WS 2.2.6 jar files into endorsed directory. Only specifying two API jars (the specification) is enough. At runtime, the right implementation would be loaded from your project clas...