To answer my own question: the easiest solution was to fix the version number in the jar file, which is read from the version.properties file name (/com/sun/xml/ws/util/version.properties) and rebuild the jar jaxws-rt file. jar containing this class.
An alternative approach using a servlet filter in Tomcat also works, but has a performance limitation.
source share