Tutorial :How to remove JAX-WS generated header comment?



Question:

a customer has asked us to remove the comments generated by JAX-WS from the generated WSDL and XSD files. The generated files have comments like these:

<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.x.x-xxx-. -->  

I didn't find anything to do this simply, so i'll ask here. Any easy solutions to this besides patching JAX-WS?


Solution:1

To answer my own question: The easiest solution was to patch the version number in the jar file which is read from a file name version.properties (/com/sun/xml/ws/util/version.properties) and rebuild the jar file jaxws-rt.jar, which contained this class.

An alternative approach using a servlet filter in Tomcat works also but has a performance penalty.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »