WSDDProviderpublic abstract class WSDDProvider extends Object WSDD provider element
Represents the liason to the application being exposed
as a Web Service.
Specific provider extension classes must be registered
by namespace URI. |
Fields Summary |
---|
protected static Log | log | private static final String | PLUGABLE_PROVIDER_FILENAME | private static Hashtable | providersXXX |
Methods Summary |
---|
public static org.apache.axis.Handler | getInstance(javax.xml.namespace.QName providerType, WSDDService service, org.apache.axis.EngineConfiguration registry)
if (providerType == null)
throw new WSDDException(Messages.getMessage("nullProvider00"));
WSDDProvider provider = (WSDDProvider)providers.get(providerType);
if (provider == null) {
throw new WSDDException(Messages.getMessage("noMatchingProvider00",
providerType.toString()));
}
return provider.newProviderInstance(service, registry);
| public abstract java.lang.String | getName()
| public WSDDOperation | getOperation(java.lang.String name)
return null;
| public WSDDOperation[] | getOperations()
return null;
| private static void | loadPluggableProviders()Look for file META-INF/services/org.apache.axis.deployment.wsdd.Provider
in all the JARS, get the classes listed in those files and add them to
providers list if they are valid providers.
Here is how the scheme would work.
A company providing a new provider will jar up their provider related
classes in a JAR file. The following file containing the name of the new
provider class is also made part of this JAR file.
META-INF/services/org.apache.axis.deployment.wsdd.Provider
By making this JAR part of the webapp, the new provider will be
automatically discovered.
providers.put(WSDDConstants.QNAME_JAVARPC_PROVIDER, new WSDDJavaRPCProvider());
providers.put(WSDDConstants.QNAME_JAVAMSG_PROVIDER, new WSDDJavaMsgProvider());
providers.put(WSDDConstants.QNAME_HANDLER_PROVIDER, new WSDDHandlerProvider());
providers.put(WSDDConstants.QNAME_EJB_PROVIDER, new WSDDJavaEJBProvider());
providers.put(WSDDConstants.QNAME_COM_PROVIDER, new WSDDComProvider());
providers.put(WSDDConstants.QNAME_BSF_PROVIDER, new WSDDBsfProvider());
providers.put(WSDDConstants.QNAME_CORBA_PROVIDER, new WSDDJavaCORBAProvider());
providers.put(WSDDConstants.QNAME_RMI_PROVIDER, new WSDDJavaRMIProvider());
try {
loadPluggableProviders();
} catch (Throwable t){
String msg=t + JavaUtils.LS + JavaUtils.stackToString(t);
log.info(Messages.getMessage("exception01",msg));
}
ClassLoader clzLoader = WSDDProvider.class.getClassLoader();
ClassLoaders loaders = new ClassLoaders();
loaders.put(clzLoader);
DiscoverServiceNames dsn = new DiscoverServiceNames(loaders);
ResourceNameIterator iter = dsn.findResourceNames(PLUGABLE_PROVIDER_FILENAME);
while (iter.hasNext()) {
String className = iter.nextResourceName();
try {
Object o = Class.forName(className).newInstance();
if (o instanceof WSDDProvider) {
WSDDProvider provider = (WSDDProvider) o;
String providerName = provider.getName();
QName q = new QName(WSDDConstants.URI_WSDD_JAVA, providerName);
providers.put(q, provider);
}
} catch (Exception e) {
String msg=e + JavaUtils.LS + JavaUtils.stackToString(e);
log.info(Messages.getMessage("exception01",msg));
continue;
}
}
| public abstract org.apache.axis.Handler | newProviderInstance(WSDDService service, org.apache.axis.EngineConfiguration registry)
| public static void | registerProvider(javax.xml.namespace.QName uri, org.apache.axis.deployment.wsdd.WSDDProvider prov)
providers.put(uri, prov);
|
|