String wsdlFileLocation = null;
try
{
ConfigContext serverContext = getConfigContext(mInstanceName);
InstanceEnvironment iEnv = new InstanceEnvironment(mInstanceName);
Applications applicationsConfigBean =
(Applications) ConfigBeansFactory.getConfigBeanByXPath(
serverContext, ServerXPathHelper.XPATH_APPLICATIONS);
String appLocation = null;
AbstractArchive moduleArchive = null;
switch (appType)
{
case DeploymentConstants.EAR :
AppsManager appsManager = new AppsManager(iEnv);
appLocation = appsManager.getGeneratedXMLLocation(appName);
if (appLocation == null || !FileUtils.safeIsDirectory(appLocation)) {
J2eeApplication app = applicationsConfigBean.
getJ2eeApplicationByName(appName);
appLocation = app.getLocation();
}
break;
case DeploymentConstants.EJB :
EjbModulesManager ejbManager = new EjbModulesManager(iEnv);
appLocation = ejbManager.getGeneratedXMLLocation(appName);
if (appLocation == null || !FileUtils.safeIsDirectory(appLocation)) {
EjbModule module = applicationsConfigBean.
getEjbModuleByName(appName);
appLocation = module.getLocation();
}
break;
case DeploymentConstants.WAR:
WebModulesManager webManager = new WebModulesManager(iEnv);
appLocation = webManager.getGeneratedXMLLocation(appName);
if (appLocation == null || !FileUtils.safeIsDirectory(appLocation)) {
WebModule webModule = applicationsConfigBean.
getWebModuleByName(appName);
appLocation = webModule.getLocation();
}
break;
}