1 16 package org.apache.axis.deployment.wsdd.providers; 17 18 import org.apache.axis.ConfigurationException; 19 import org.apache.axis.EngineConfiguration; 20 import org.apache.axis.Handler; 21 import org.apache.axis.deployment.wsdd.WSDDConstants; 22 import org.apache.axis.deployment.wsdd.WSDDProvider; 23 import org.apache.axis.deployment.wsdd.WSDDService; 24 import org.apache.axis.utils.ClassUtils; 25 import org.apache.axis.utils.Messages; 26 27 33 public class WSDDHandlerProvider 34 extends WSDDProvider 35 { 36 public String getName() { 37 return WSDDConstants.PROVIDER_HANDLER; 38 } 39 40 public Handler newProviderInstance(WSDDService service, 41 EngineConfiguration registry) 42 throws Exception 43 { 44 String providerClass = service.getParameter("handlerClass"); 45 if (providerClass == null) { 46 throw new ConfigurationException(Messages.getMessage("noHandlerClass00")); 47 } 48 49 Class _class = ClassUtils.forName(providerClass); 50 51 if (!(Handler.class.isAssignableFrom(_class))) { 52 throw new ConfigurationException(Messages.getMessage("badHandlerClass00", 53 _class.getName())); 54 } 55 56 return (Handler)_class.newInstance(); 57 } 58 } 59 | Popular Tags |