1 25 26 package org.objectweb.jonas.ws.axis; 27 28 import javax.naming.Context ; 29 import javax.xml.namespace.QName ; 30 31 import org.apache.axis.AxisProperties; 32 import org.apache.axis.deployment.wsdd.WSDDConstants; 33 import org.apache.axis.deployment.wsdd.WSDDProvider; 34 35 import org.objectweb.jonas_lib.loader.ThreadContextClassLoader; 36 37 import org.objectweb.jonas.ws.AbsWebServicesServiceImpl; 38 import org.objectweb.jonas.ws.WSServiceException; 39 40 import org.objectweb.util.monolog.api.BasicLevel; 41 42 49 public class AxisWSServiceImpl extends AbsWebServicesServiceImpl { 50 51 52 private static final String AXIS_CONFIG_FACTORY_PROP = 53 "axis.EngineConfigFactory"; 54 55 56 private static final String AXIS_MODULE_CONFIG_CLASS = 57 "org.objectweb.jonas.ws.axis.JServletEngineConfigurationFactory"; 58 59 66 public void doInit(Context ctx) throws WSServiceException { 67 super.doInit(ctx); 68 69 getLogger().log(BasicLevel.DEBUG, "Adding " + AXIS_MODULE_CONFIG_CLASS + " as ConfigurationFactory"); 70 71 QName javaURI = new QName (WSDDConstants.URI_WSDD_JAVA, WSDDJOnASEJBProvider.PROVIDER_NAME); 73 WSDDProvider.registerProvider(javaURI, new WSDDJOnASEJBProvider()); 74 75 AxisProperties.setProperty(AXIS_CONFIG_FACTORY_PROP, 77 AXIS_MODULE_CONFIG_CLASS); 78 79 ClassLoader old = Thread.currentThread().getContextClassLoader(); 82 Thread.currentThread().setContextClassLoader(new ThreadContextClassLoader()); 83 AxisProperties.getNameDiscoverer(); 84 Thread.currentThread().setContextClassLoader(old); 85 } 86 87 } 88 | Popular Tags |