How to programmatically publish webservice to tomcat

Viewed 1493

I would like to publish a webservice programmatically to tomcat.
With e.g JAX-WS or Apache CXF
Similar to Endpoint.publish(...).

//how to tell this tomcat?
Endpoint.publish("http://0.0.0.0:8080/SimpleService", serviceImpl);
//or better something like this:
Endpoint.publish("/SimpleService", serviceImpl);

Without need to use web.xml and/or sun-jaxws.xml (for each service)

Question:
Is there any known way to accomplish it (with JAX-WS or Apache CXF or ...)?

(I know there are similar questions already posted. But none of them really answers my question.)

1 Answers
Related