public class TomeeJaxWsService implements Service, WebDeploymentListener {
@Override
public void init(Properties props) throws Exception {
// Install the Tomcat webservice registry
final SystemInstance system = SystemInstance.get();
TomcatWsRegistry tomcatSoapHandler = (TomcatWsRegistry) system.getComponent(WsRegistry.class);
if (tomcatSoapHandler == null) {
tomcatSoapHandler = new TomcatWsRegistry();
system.setComponent(WsRegistry.class, tomcatSoapHandler);
}
system.getComponent(WebDeploymentListeners.class).add(this);
}