00001
00026 package org.objectweb.jonas.ws.axis;
00027
00028 import javax.naming.Context;
00029 import javax.xml.namespace.QName;
00030
00031 import org.apache.axis.AxisProperties;
00032 import org.apache.axis.deployment.wsdd.WSDDConstants;
00033 import org.apache.axis.deployment.wsdd.WSDDProvider;
00034
00035 import org.objectweb.jonas_lib.loader.ThreadContextClassLoader;
00036
00037 import org.objectweb.jonas.ws.AbsWebServicesServiceImpl;
00038 import org.objectweb.jonas.ws.WSServiceException;
00039
00040 import org.objectweb.util.monolog.api.BasicLevel;
00041
00049 public class AxisWSServiceImpl extends AbsWebServicesServiceImpl {
00050
00052 private static final String AXIS_CONFIG_FACTORY_PROP =
00053 "axis.EngineConfigFactory";
00054
00056 private static final String AXIS_MODULE_CONFIG_CLASS =
00057 "org.objectweb.jonas.ws.axis.JServletEngineConfigurationFactory";
00058
00066 public void doInit(Context ctx) throws WSServiceException {
00067 super.doInit(ctx);
00068
00069 getLogger().log(BasicLevel.DEBUG, "Adding " + AXIS_MODULE_CONFIG_CLASS + " as ConfigurationFactory");
00070
00071
00072 QName javaURI = new QName(WSDDConstants.URI_WSDD_JAVA, WSDDJOnASEJBProvider.PROVIDER_NAME);
00073 WSDDProvider.registerProvider(javaURI, new WSDDJOnASEJBProvider());
00074
00075
00076 AxisProperties.setProperty(AXIS_CONFIG_FACTORY_PROP,
00077 AXIS_MODULE_CONFIG_CLASS);
00078
00079
00080
00081 ClassLoader old = Thread.currentThread().getContextClassLoader();
00082 Thread.currentThread().setContextClassLoader(new ThreadContextClassLoader());
00083 AxisProperties.getNameDiscoverer();
00084 Thread.currentThread().setContextClassLoader(old);
00085 }
00086
00087 }