1 16 package org.apache.axis.deployment.wsdd.providers; 17 18 import org.apache.axis.EngineConfiguration; 19 import org.apache.axis.Handler; 20 import org.apache.axis.deployment.wsdd.WSDDConstants; 21 import org.apache.axis.deployment.wsdd.WSDDProvider; 22 import org.apache.axis.deployment.wsdd.WSDDService; 23 import org.apache.axis.providers.BasicProvider; 24 import org.apache.axis.utils.ClassUtils; 25 26 27 30 public class WSDDComProvider 31 extends WSDDProvider 32 { 33 public static final String OPTION_PROGID = "ProgID"; 34 public static final String OPTION_THREADING_MODEL = "threadingModel"; 35 36 public String getName() { 37 return WSDDConstants.PROVIDER_COM; 38 } 39 40 public Handler newProviderInstance(WSDDService service, 41 EngineConfiguration registry) 42 throws Exception 43 { 44 Class _class = ClassUtils.forName("org.apache.axis.providers.ComProvider"); 45 46 BasicProvider provider = (BasicProvider) _class.newInstance(); 47 48 String option = service.getParameter("ProgID"); 49 50 if (!option.equals("")) { 51 provider.setOption(OPTION_PROGID, option); 52 } 53 54 option = service.getParameter("threadingModel"); 55 56 if (option!= null && !option.equals("")) { 57 provider.setOption(OPTION_THREADING_MODEL, option); 58 } 59 60 return provider; 61 } 62 } 63 | Popular Tags |