Methods Summary |
---|
private void | check()Check the configuration file attributes and remember whether
or not the file is read-only.
try {
readOnly = configFile.canRead() & !configFile.canWrite();
} catch (SecurityException se){
readOnly = true;
}
/*
* If file is read-only, log informational message
* as configuration changes will not persist.
*/
if (readOnly) {
log.info(Messages.getMessage("readOnlyConfigFile"));
}
|
public void | configureEngine(org.apache.axis.AxisEngine engine)
try {
if (getInputStream() == null) {
try {
setInputStream(new FileInputStream(configFile));
} catch (Exception e) {
if (searchClasspath)
setInputStream(ClassUtils.getResourceAsStream(engine.getClass(), filename, true));
}
}
if (getInputStream() == null) {
throw new ConfigurationException(
Messages.getMessage("noConfigFile"));
}
WSDDDocument doc = new WSDDDocument(XMLUtils.
newDocument(getInputStream()));
deployment = doc.getDeployment();
deployment.configureEngine(engine);
engine.refreshGlobalOptions();
setInputStream(null);
} catch (Exception e) {
throw new ConfigurationException(e);
}
|
public java.util.Iterator | getDeployedServices()Get an enumeration of the services deployed to this engine
return deployment.getDeployedServices();
|
public org.apache.axis.deployment.wsdd.WSDDDeployment | getDeployment()
return deployment;
|
public java.util.Hashtable | getGlobalOptions()Returns the global configuration options.
WSDDGlobalConfiguration globalConfig
= deployment.getGlobalConfiguration();
if (globalConfig != null)
return globalConfig.getParametersTable();
return null;
|
public org.apache.axis.Handler | getGlobalRequest()Returns a global request handler.
return deployment.getGlobalRequest();
|
public org.apache.axis.Handler | getGlobalResponse()Returns a global response handler.
return deployment.getGlobalResponse();
|
public org.apache.axis.Handler | getHandler(javax.xml.namespace.QName qname)retrieve an instance of the named handler
return deployment.getHandler(qname);
|
private java.io.InputStream | getInputStream()
return myInputStream;
|
public java.util.List | getRoles()Get a list of roles that this engine plays globally. Services
within the engine configuration may also add additional roles.
return deployment.getRoles();
|
public org.apache.axis.handlers.soap.SOAPService | getService(javax.xml.namespace.QName qname)retrieve an instance of the named service
SOAPService service = deployment.getService(qname);
if (service == null) {
throw new ConfigurationException(Messages.getMessage("noService10",
qname.toString()));
}
return service;
|
public org.apache.axis.handlers.soap.SOAPService | getServiceByNamespaceURI(java.lang.String namespace)Get a service which has been mapped to a particular namespace
return deployment.getServiceByNamespaceURI(namespace);
|
public org.apache.axis.Handler | getTransport(javax.xml.namespace.QName qname)retrieve an instance of the named transport
return deployment.getTransport(qname);
|
public org.apache.axis.encoding.TypeMappingRegistry | getTypeMappingRegistry()
return deployment.getTypeMappingRegistry();
|
public void | setDeployment(org.apache.axis.deployment.wsdd.WSDDDeployment deployment)
this.deployment = deployment;
|
public void | setInputStream(java.io.InputStream is)
myInputStream = is;
|
public void | setSearchClasspath(boolean searchClasspath)Determine whether or not we will look for a "*-config.wsdd" file
on the classpath if we don't find it in the specified location.
this.searchClasspath = searchClasspath;
|
public void | writeEngineConfig(org.apache.axis.AxisEngine engine)Save the engine configuration. In case there's a problem, we
write it to a string before saving it out to the actual file so
we don't screw up the file.
if (!readOnly) {
try {
Document doc = Admin.listConfig(engine);
Writer osWriter = new OutputStreamWriter(
new FileOutputStream(configFile),XMLUtils.getEncoding());
PrintWriter writer = new PrintWriter(new BufferedWriter(osWriter));
XMLUtils.DocumentToWriter(doc, writer);
writer.println();
writer.close();
} catch (Exception e) {
throw new ConfigurationException(e);
}
}
|