Flashpix
Flashpix

Reputation: 166

How to remove JAX-WS generated header comment?

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?

Upvotes: 4

Views: 2099

Answers (1)

Flashpix
Flashpix

Reputation: 166

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.

Upvotes: 4

Related Questions