Methods Summary |
---|
protected void | applyAndSaveSettings()actually update the engine and save the settings
AxisEngine engine = getEngine();
engine.refreshGlobalOptions();
engine.saveConfiguration();
|
protected void | autoRegister()register classes, log exceptions
String[] resources=getResourcesToRegister();
if(resources==null || resources.length==0) {
return;
}
for(int i=0;i<resources.length;i++) {
final String resource = resources[i];
registerAndLogResource(resource);
}
registerAnythingElse();
try {
applyAndSaveSettings();
} catch (Exception e) {
log.error(Messages.getMessage("autoRegServletApplyAndSaveSettings00"), e);
}
|
private org.apache.axis.deployment.wsdd.WSDDDeployment | getDeployment()get deployment
WSDDDeployment deployment;
AxisEngine engine = getEngine();
EngineConfiguration config = engine.getConfig();
if (config instanceof WSDDEngineConfiguration) {
deployment = ((WSDDEngineConfiguration) config).getDeployment();
} else {
deployment=null;
}
return deployment;
|
public java.lang.String[] | getResourcesToRegister()subclass this to return an array of resource names.
return null;
|
public void | init()init by registering
log.debug(Messages.getMessage("autoRegServletInit00"));
autoRegister();
|
protected void | logSuccess(java.lang.String item)handler for logging success, defaults to handing off to logging
at debug level
log.debug(Messages.getMessage("autoRegServletLoaded01",item));
|
public void | registerAndLogResource(java.lang.String resource)register a single resource; log trouble and success.
try {
registerResource(resource);
logSuccess(resource);
} catch (Exception e) {
log.error(Messages.getMessage("autoRegServletLoadFailed01",resource),e);
}
|
protected void | registerAnythingElse()override point for subclasses to add other registration stuff
|
public void | registerFile(java.io.File file)register a file
InputStream in=new BufferedInputStream(new FileInputStream(file));
registerStream(in);
|
public void | registerResource(java.lang.String resourcename)register a resource
InputStream in=getServletContext().getResourceAsStream(resourcename);
if(in==null) {
throw new FileNotFoundException(resourcename);
}
registerStream(in);
|
public void | registerStream(java.io.InputStream instream)register an open stream, which we close afterwards
try {
Document doc=XMLUtils.newDocument(instream);
WSDDDocument wsddDoc = new WSDDDocument(doc);
WSDDDeployment deployment;
deployment = getDeployment();
if(deployment!=null) {
wsddDoc.deploy(deployment);
}
} finally {
instream.close();
}
|