Argh! bad log message. Fixed using svn propset. It should read as follows:
- Get ?wsdl to work in the default axis2.war - Make default axis2.war even when the war is unpacked - tested using tomcat's unpackwar attribute in context.xml -- dims On 6/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Author: dims Date: Fri Jun 16 13:57:18 2006 New Revision: 414907 URL: http://svn.apache.org/viewvc?rev=414907&view=rev Log: modules\webapp\project.xml Modified: webservices/axis2/trunk/java/maven.xml webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java webservices/axis2/trunk/java/modules/webapp/project.xml Modified: webservices/axis2/trunk/java/maven.xml URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/maven.xml?rev=414907&r1=414906&r2=414907&view=diff ============================================================================== --- webservices/axis2/trunk/java/maven.xml (original) +++ webservices/axis2/trunk/java/maven.xml Fri Jun 16 13:57:18 2006 @@ -451,10 +451,17 @@ <ant:fileset file="modules/addressing/target/addressing-${addressing_version}.mar"/> </ant:copy> + <echo file="target/temp/war/toWEB-INF/modules/modules.list" append="false">addressing-${addressing_version}.mar + soapmonitor-${soapmonitor_version}.mar + </echo> + <!-- copy the sample services --> <ant:copy toDir="target/temp/war/toWEB-INF/services"> <ant:fileset file="modules/samples/target/toWar/services/version.aar"/> </ant:copy> + + <echo file="target/temp/war/toWEB-INF/services/services.list" append="false">version.aar + </echo> <!-- copy the axis2.xml into conf directoy --> <ant:copy toDir="target/temp/war/toWEB-INF/conf"> Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=414907&r1=414906&r2=414907&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java (original) +++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java Fri Jun 16 13:57:18 2006 @@ -152,23 +152,18 @@ public void loadServicesFromUrl(URL repoURL) { try { URL servicesDir = new URL(repoURL, DeploymentConstants.SERVICE_PATH); - InputStream serviceStream = servicesDir.openStream(); - if (serviceStream == null) { - log.info("No services dir found"); - } else { - URL filelisturl = new URL(servicesDir, "services/services.list"); - ArrayList files = getFileList(filelisturl); - Iterator fileIterator = files.iterator(); - while (fileIterator.hasNext()) { - String fileUrl = (String) fileIterator.next(); - if (fileUrl.endsWith(".aar")) { - AxisServiceGroup serviceGroup = new AxisServiceGroup(); - URL servicesURL = new URL(servicesDir, "services/" + fileUrl); - ArrayList servicelist = populateService(serviceGroup, - servicesURL, - fileUrl.substring(0, fileUrl.indexOf(".aar"))); - addServiceGroup(serviceGroup, servicelist, servicesURL); - } + URL filelisturl = new URL(servicesDir, "services/services.list"); + ArrayList files = getFileList(filelisturl); + Iterator fileIterator = files.iterator(); + while (fileIterator.hasNext()) { + String fileUrl = (String) fileIterator.next(); + if (fileUrl.endsWith(".aar")) { + AxisServiceGroup serviceGroup = new AxisServiceGroup(); + URL servicesURL = new URL(servicesDir, "services/" + fileUrl); + ArrayList servicelist = populateService(serviceGroup, + servicesURL, + fileUrl.substring(0, fileUrl.indexOf(".aar"))); + addServiceGroup(serviceGroup, servicelist, servicesURL); } } } catch (MalformedURLException e) { @@ -181,34 +176,28 @@ public void loadRepositoryFromURL(URL repoURL) throws DeploymentException { try { URL moduleDir = new URL(repoURL, DeploymentConstants.MODULE_PATH); - InputStream moduleStream = moduleDir.openStream(); - if (moduleStream == null) { - log.info("No module dir found"); - } else { - URL filelisturl = new URL(moduleDir, "modules/modules.list"); - ArrayList files = getFileList(filelisturl); - Iterator fileIterator = files.iterator(); - while (fileIterator.hasNext()) { - String fileUrl = (String) fileIterator.next(); - if (fileUrl.endsWith(".mar")) { - URL moduleurl = new URL(moduleDir, "modules/" + fileUrl); - DeploymentClassLoader deploymentClassLoader = - new DeploymentClassLoader( - new URL[]{moduleurl}, - axisConfig.getModuleClassLoader(), - antiJARLocking); - AxisModule module = new AxisModule(); - module.setModuleClassLoader(deploymentClassLoader); - module.setParent(axisConfig); - String moduleName = fileUrl.substring(0, fileUrl.indexOf(".mar")); - module.setName(new QName(moduleName)); - populateModule(module, moduleurl); - module.setFileName(moduleurl); - addNewModule(module); - } + URL filelisturl = new URL(moduleDir, "modules/modules.list"); + ArrayList files = getFileList(filelisturl); + Iterator fileIterator = files.iterator(); + while (fileIterator.hasNext()) { + String fileUrl = (String) fileIterator.next(); + if (fileUrl.endsWith(".mar")) { + URL moduleurl = new URL(moduleDir, "modules/" + fileUrl); + DeploymentClassLoader deploymentClassLoader = + new DeploymentClassLoader( + new URL[]{moduleurl}, + axisConfig.getModuleClassLoader(), + antiJARLocking); + AxisModule module = new AxisModule(); + module.setModuleClassLoader(deploymentClassLoader); + module.setParent(axisConfig); + String moduleName = fileUrl.substring(0, fileUrl.indexOf(".mar")); + module.setName(new QName(moduleName)); + populateModule(module, moduleurl); + module.setFileName(moduleurl); + addNewModule(module); } } - } catch (MalformedURLException e) { throw new DeploymentException(e); } catch (IOException e) { Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java?rev=414907&r1=414906&r2=414907&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java (original) +++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java Fri Jun 16 13:57:18 2006 @@ -120,10 +120,10 @@ log.warn("Using default configuration: " + DeploymentConstants.AXIS2_CONFIGURATION_RESOURCE); // not there, use default configuration from class path resource. } // catch - - if(axis2Stream == null) { - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - axis2Stream = cl.getResourceAsStream(DeploymentConstants.AXIS2_CONFIGURATION_RESOURCE); + + if(axis2Stream == null) { + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + axis2Stream = cl.getResourceAsStream(DeploymentConstants.AXIS2_CONFIGURATION_RESOURCE); } axisConfig = deploymentEngine.populateAxisConfiguration(axis2Stream); @@ -204,6 +204,15 @@ } if (repository == null) { + URL url = config.getServletContext().getResource("/WEB-INF/"); + if (url != null) { + repository = url.toString(); + deploymentEngine.loadRepositoryFromURL(url); + log.debug("loaded repository from /WEB-INF/ folder (URL)"); + } + } + + if (repository == null) { deploymentEngine.loadFromClassPath(); log.debug("loaded repository from classpath"); } @@ -250,6 +259,14 @@ log.debug("loaded services from webapp"); } } // else + + if (repository == null) { + URL url = config.getServletContext().getResource("/WEB-INF/"); + if (url != null) { + deploymentEngine.loadServicesFromUrl(url); + log.debug("loaded services from /WEB-INF/ folder (URL)"); + } + } } catch (MalformedURLException e) { log.info(e.getMessage()); } Modified: webservices/axis2/trunk/java/modules/webapp/project.xml URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/webapp/project.xml?rev=414907&r1=414906&r2=414907&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/webapp/project.xml (original) +++ webservices/axis2/trunk/java/modules/webapp/project.xml Fri Jun 16 13:57:18 2006 @@ -82,6 +82,14 @@ <artifactId>axiom-impl</artifactId> <version>${axiom.version}</version> </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + <version>${xalan.version}</version> + <properties> + <module>true</module> + </properties> + </dependency> <dependency> <groupId>geronimo-spec</groupId> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Davanum Srinivas : http://wso2.com/blogs/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
