You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by de...@apache.org on 2006/04/03 14:21:51 UTC
svn commit: r391027 - in /webservices/axis2/trunk/java/modules/core:
src/org/apache/axis2/context/ src/org/apache/axis2/deployment/
src/org/apache/axis2/deployment/util/ src/org/apache/axis2/description/
src/org/apache/axis2/engine/ test/org/apache/axi...
Author: deepal
Date: Mon Apr 3 05:21:47 2006
New Revision: 391027
URL: http://svn.apache.org/viewcvs?rev=391027&view=rev
Log:
- Axis2 support URI based deployment
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/FileSystemConfigurator.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/RepositoryListener.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisModule.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL2AxisServiceBuilder.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/TransportDeploymentTest.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java?rev=391027&r1=391026&r2=391027&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java Mon Apr 3 05:21:47 2006
@@ -12,6 +12,8 @@
import org.apache.axis2.transport.TransportSender;
import org.apache.commons.logging.LogFactory;
+import java.io.File;
+import java.net.URI;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
@@ -79,6 +81,30 @@
public static ConfigurationContext createConfigurationContextFromFileSystem(
String path,
String axis2xml) throws AxisFault {
+ URI pathURI = null;
+ URI xmlURI = null;
+ try {
+ File repo = new File(path);
+ if (repo.exists()) {
+ pathURI = repo.toURI();
+ }
+ } catch (Exception e) {
+ //sorry I have to ignore this
+ }
+ try {
+ File axis2discriptor = new File(axis2xml);
+ if (axis2discriptor.exists()) {
+ xmlURI = axis2discriptor.toURI();
+ }
+ } catch (Exception e) {
+ //sorry I have to ignore this
+ }
+ return createConfigurationContext(new FileSystemConfigurator(pathURI, xmlURI));
+ }
+
+ public static ConfigurationContext createConfigurationContextFromURIs(
+ URI path,
+ URI axis2xml) throws AxisFault {
return createConfigurationContext(new FileSystemConfigurator(path, axis2xml));
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=391027&r1=391026&r2=391027&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 Mon Apr 3 05:21:47 2006
@@ -38,6 +38,7 @@
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
import java.io.*;
+import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -50,7 +51,7 @@
private Log log = LogFactory.getLog(getClass());
private boolean hotUpdate = true; // to do hot update or not
private boolean hotDeployment = true; // to do hot deployment or not
- public String axis2repository = null;
+ public URI axis2repository = null;
private boolean useDefault = false;
/**
@@ -76,7 +77,7 @@
*/
private AxisConfiguration axisConfig;
private ArchiveFileData currentArchiveFile;
- private String axis2_xml_file_name;
+ private URI axis2_xml_file_name;
/**
@@ -85,29 +86,24 @@
public DeploymentEngine() {
}
- public DeploymentEngine(String repositoryName, String xmlFile)
+ public DeploymentEngine(URI repositoryName, URI xmlFile)
throws DeploymentException {
- if ((repositoryName == null || "".equals(repositoryName.trim())) &&
- (xmlFile == null || "".equals(xmlFile.trim()))) {
+ if (repositoryName == null && xmlFile == null) {
String axis2_home = System.getProperty(Constants.AXIS2_HOME);
if (axis2_home != null && !"".equals(axis2_home)) {
File axisRepo = new File(axis2_home);
if (!axisRepo.exists()) {
throw new DeploymentException(
- Messages.getMessage("cannotfindrepo", axis2repository));
+ Messages.getMessage("cannotfindrepo", axis2repository.toString()));
}
File axis2conf = new File(axisRepo, "conf");
if (axis2conf.exists()) {
File axis2xml = new File(axis2conf, "axis2.xml");
- if (!axis2xml.exists()) {
- useDefault = true;
- } else {
- useDefault = false;
- }
+ useDefault = !axis2xml.exists();
} else {
useDefault = true;
- axis2repository = axis2_home;
+ axis2repository = axisRepo.toURI();
}
} else {
useDefault = true;
@@ -115,27 +111,27 @@
log.debug(Messages.getMessage("bothrepoandconfignull"));
}
- } else if (!(repositoryName == null || "".equals(repositoryName.trim()))) {
- axis2repository = repositoryName.trim();
+ } else if (repositoryName != null) {
+ axis2repository = repositoryName;
File axisRepo = new File(axis2repository);
if (!axisRepo.exists()) {
throw new DeploymentException(
- Messages.getMessage("cannotfindrepo", axis2repository));
+ Messages.getMessage("cannotfindrepo", axis2repository.toString()));
}
- if (xmlFile == null || "".equals(xmlFile.trim())) {
+ if (xmlFile == null) {
axis2_xml_file_name = null;
useDefault = true;
} else {
axis2_xml_file_name = xmlFile;
}
prepareRepository(repositoryName);
- } else if (!(xmlFile == null || "".equals(xmlFile.trim()))) {
+ } else if (xmlFile != null) {
axis2_xml_file_name = xmlFile;
axis2repository = null;
}
// All said and done, if both are still null, use the default.
- if(axis2_xml_file_name == null && axis2repository == null) {
+ if (axis2_xml_file_name == null && axis2repository == null) {
useDefault = true;
}
}
@@ -208,7 +204,7 @@
AxisService axisService = (AxisService) services.next();
axisService.setUseDefaultChains(false);
- axisService.setFileName(currentArchiveFile.getFile().getAbsolutePath());
+ axisService.setFileName(currentArchiveFile.getFile().toURI());
serviceGroup.addService(axisService);
// modules from <service>
@@ -481,7 +477,7 @@
archiveReader.readModuleArchive(currentArchiveFile.getAbsolutePath(),
this, metaData, explodedDir,
axisConfig);
- metaData.setFileName(currentArchiveFile.getAbsolutePath());
+ metaData.setFileName(currentArchiveFile.getFile().toURI());
addNewModule(metaData);
log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_MODULE,
metaData.getName().getLocalPart()));
@@ -550,7 +546,7 @@
in = cl.getResourceAsStream(AXIS2_CONFIGURATION_RESOURCE);
} else {
try {
- in = new FileInputStream(axis2_xml_file_name);
+ in = new FileInputStream(new File(axis2_xml_file_name));
} catch (FileNotFoundException e) {
throw new DeploymentException(e);
}
@@ -581,7 +577,7 @@
} else {
InputStream in = null;
try {
- in = new FileInputStream(axis2_xml_file_name);
+ in = new FileInputStream(new File(axis2_xml_file_name));
populateAxisConfiguration(in);
} catch (FileNotFoundException e) {
throw new DeploymentException(e);
@@ -607,7 +603,9 @@
throws DeploymentException {
Parameter axis2repoPara = axisConfig.getParameter(AXIS2_REPO);
if (axis2repoPara != null) {
- axis2repository = (String) axis2repoPara.getValue();
+ String repoString = (String) axis2repoPara.getValue();
+ File repo = new File(repoString);
+ axis2repository = repo.toURI();
setClassLoaders(axis2repository);
setDeploymentFeatures();
RepositoryListener repoListener = new RepositoryListener(
@@ -799,15 +797,15 @@
* MCL : module class loader
* SCL : Service class loader
*
- * @param axis2repo : The repository folder of Axis2
+ * @param axis2repoURI : The repository folder of Axis2
* @throws DeploymentException
*/
- private void setClassLoaders(String axis2repo) throws DeploymentException {
+ private void setClassLoaders(URI axis2repoURI) throws DeploymentException {
ClassLoader sysClassLoader =
- Utils.getClassLoader(Thread.currentThread().getContextClassLoader(), axis2repo);
+ Utils.getClassLoader(Thread.currentThread().getContextClassLoader(), axis2repoURI);
axisConfig.setSystemClassLoader(sysClassLoader);
-
+ File axis2repo = new File(axis2repoURI);
File services = new File(axis2repo, DIRECTORY_SERVICES);
if (services.exists()) {
@@ -862,7 +860,7 @@
* @param repositoryName
*/
- private void prepareRepository(String repositoryName) {
+ private void prepareRepository(URI repositoryName) {
File repository = new File(repositoryName);
File services = new File(repository, DIRECTORY_SERVICES);
@@ -888,7 +886,7 @@
log.info(Messages.getMessage("noaxis2xmlfound"));
} else {
useDefault = false;
- axis2_xml_file_name = axis2xml.getAbsolutePath();
+ axis2_xml_file_name = axis2xml.toURI();
}
}
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/FileSystemConfigurator.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/FileSystemConfigurator.java?rev=391027&r1=391026&r2=391027&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/FileSystemConfigurator.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/FileSystemConfigurator.java Mon Apr 3 05:21:47 2006
@@ -4,6 +4,11 @@
import org.apache.axis2.Constants;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.engine.AxisConfigurator;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.File;
+import java.net.URI;
/*
* Copyright 2004,2005 The Apache Software Foundation.
@@ -25,11 +30,12 @@
public class FileSystemConfigurator implements AxisConfigurator {
+ private Log log = LogFactory.getLog(getClass());
/**
* To check whether need to create a service side or client side
*/
- private String axis2xml;
- private String repoLocation;
+ private URI axis2xml = null;
+ private URI repoLocation = null;
/**
* Load an AxisConfiguration from the repository directory specified
@@ -37,16 +43,49 @@
* @param repoLocation
* @param axis2xml
*/
- public FileSystemConfigurator(String repoLocation, String axis2xml) {
+ public FileSystemConfigurator(URI repoLocation, URI axis2xml) {
if (repoLocation == null) {
//checking wether user has set the system property
- repoLocation = System.getProperty(Constants.AXIS2_REPO);
+ String propertyRepo = System.getProperty(Constants.AXIS2_REPO);
+ if (propertyRepo != null) {
+ try {
+ File repo = new File(propertyRepo);
+ if (repo.exists()) {
+ this.repoLocation = repo.toURI();
+ } else {
+ this.repoLocation = null;
+ }
+ } catch (Exception e) {
+ this.repoLocation = null;
+ log.info("Error in file creation inside FileSystemConfigurator");
+ }
+ } else {
+ this.repoLocation = null;
+ }
+ } else {
+ this.repoLocation = repoLocation;
}
if (axis2xml == null) {
- axis2xml = System.getProperty(Constants.AXIS2_CONF);
+ String propertyAxis2xml = System.getProperty(Constants.AXIS2_CONF);
+ if (propertyAxis2xml != null) {
+ try {
+ File axis2discriptor = new File(propertyAxis2xml);
+ if (axis2discriptor.exists()) {
+ this.axis2xml = axis2discriptor.toURI();
+ } else {
+ this.axis2xml = null;
+ }
+ } catch (Exception e) {
+ this.axis2xml = null;
+ log.info("Error in file (axis2.xml) creation inside FileSystemConfigurator");
+ }
+
+ } else {
+ this.axis2xml = null;
+ }
+ } else {
+ this.axis2xml = axis2xml;
}
- this.repoLocation = repoLocation;
- this.axis2xml = axis2xml;
}
/**
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/RepositoryListener.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/RepositoryListener.java?rev=391027&r1=391026&r2=391027&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/RepositoryListener.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/RepositoryListener.java Mon Apr 3 05:21:47 2006
@@ -23,15 +23,17 @@
import org.apache.commons.logging.LogFactory;
import java.io.File;
+import java.net.URI;
public class RepositoryListener implements DeploymentConstants {
protected Log log = LogFactory.getLog(getClass());
private DeploymentEngine deploymentEngine;
+ private File rootDir;
/**
* The parent directory of the modules and services directories
*/
- private String folderName;
+ private URI folderName;
/**
* Reference to a WSInfoList
@@ -46,8 +48,9 @@
* @param folderName path to parent directory that the listener should listen to
* @param deploymentEngine reference to engine registry for updates
*/
- public RepositoryListener(String folderName, DeploymentEngine deploymentEngine) {
+ public RepositoryListener(URI folderName, DeploymentEngine deploymentEngine) {
this.folderName = folderName;
+ rootDir = new File(this.folderName);
wsInfoList = new WSInfoList(deploymentEngine);
this.deploymentEngine = deploymentEngine;
init();
@@ -65,8 +68,7 @@
* Finds a list of modules in the folder and adds to wsInfoList.
*/
public void checkModules() {
- String modulepath = folderName + MODULE_PATH;
- File root = new File(modulepath);
+ File root = new File(rootDir, MODULE_PATH);
File[] files = root.listFiles();
if (files != null) {
@@ -152,9 +154,7 @@
* Finds a list of services in the folder and adds to wsInfoList.
*/
public void checkServices() {
- String servicedir = folderName + SERVICE_PATH;
-
- findServicesInDirectory(servicedir);
+ findServicesInDirectory();
update();
}
@@ -172,8 +172,8 @@
* Searches a given folder for jar files and adds them to a list in the
* WSInfolist class.
*/
- private void findServicesInDirectory(String folderName) {
- File root = new File(folderName);
+ private void findServicesInDirectory() {
+ File root = new File(rootDir, SERVICE_PATH);
File[] files = root.listFiles();
if (files != null) {
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java?rev=391027&r1=391026&r2=391027&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java Mon Apr 3 05:21:47 2006
@@ -21,6 +21,7 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
+import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
@@ -83,7 +84,7 @@
}
}
- public static ClassLoader getClassLoader(ClassLoader parent, String path)
+ public static ClassLoader getClassLoader(ClassLoader parent, URI path)
throws DeploymentException {
return getClassLoader(parent, new File(path));
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisModule.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisModule.java?rev=391027&r1=391026&r2=391027&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisModule.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisModule.java Mon Apr 3 05:21:47 2006
@@ -26,6 +26,7 @@
import javax.xml.namespace.QName;
import java.util.ArrayList;
import java.util.HashMap;
+import java.net.URI;
/**
* <p>This holds the information about a Module. </p>
@@ -50,7 +51,7 @@
private Module module;
private ClassLoader moduleClassLoader;
// To keep the File that moduel came from
- private String fileName = "";
+ private URI fileName ;
/**
* Field name
@@ -264,11 +265,11 @@
this.supportedPolicyNames = supportedPolicyNamespaces;
}
- public String getFileName() {
+ public URI getFileName() {
return fileName;
}
- public void setFileName(String fileName) {
+ public void setFileName(URI fileName) {
this.fileName = fileName;
}
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=391027&r1=391026&r2=391027&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java Mon Apr 3 05:21:47 2006
@@ -56,6 +56,7 @@
import java.io.OutputStream;
import java.io.Writer;
import java.net.URL;
+import java.net.URI;
import java.util.*;
/**
@@ -65,7 +66,7 @@
private int nsCount = 0;
private Log log = LogFactory.getLog(getClass());
- private String fileName = "";
+ private URI fileName;
private HashMap operationsAliasesMap = null;
// private HashMap operations = new HashMap();
@@ -586,7 +587,7 @@
return engagedModules;
}
- public String getFileName() {
+ public URI getFileName() {
return fileName;
}
@@ -719,7 +720,7 @@
this.serviceClassLoader = classLoader;
}
- public void setFileName(String fileName) {
+ public void setFileName(URI fileName) {
this.fileName = fileName;
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL2AxisServiceBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL2AxisServiceBuilder.java?rev=391027&r1=391026&r2=391027&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL2AxisServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL2AxisServiceBuilder.java Mon Apr 3 05:21:47 2006
@@ -39,20 +39,20 @@
/*
* Copyright 2004,2005 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
- *
- *
+ *
+ *
*/
public class WSDL2AxisServiceBuilder {
@@ -307,7 +307,7 @@
/**
* Simply Copy information.
- *
+ *
* @param wsdl4jPortType
*/
// FIXME Evaluate a way of injecting features and priperties with a general
@@ -412,7 +412,7 @@
/**
* Generates a referenceQName
- *
+ *
* @param wsdl4jMessage
*/
private QName generateReferenceQname(QName outerName,
@@ -783,7 +783,7 @@
* The intention of this procedure is to process the imports. When
* processing the imports the imported documents will be populating the
* items in the main document recursivley
- *
+ *
* @param wsdl4JDefinition
*/
private void processImports(Definition wsdl4JDefinition) {
@@ -873,7 +873,7 @@
/**
* Get the Extensible elements form wsdl4jExtensibleElements
* <code>Vector</code> if any and copy them to <code>Component</code>
- *
+ *
* @param wsdl4jExtensibleElements
* @param description
* @param location :
@@ -1245,58 +1245,6 @@
return WSDLConstants.MEP_URI_OUT_IN;
}
throw new WSDLProcessingException("Cannot Determine the MEP");
- }
-
- private int getProperLocation(int location, AxisDescription description) {
- switch (location) {
-
- case AxisExtensiblityElementWrapper.PORT_TYPE:
- if (description instanceof AxisOperation) {
-
- // wsdl:portType -> wsdl:operation
- return PolicyInclude.OPERATION_POLICY;
-
- } else if (description instanceof AxisMessage) {
-
- String direction = ((AxisMessage) description).getDirection();
-
- return (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN
- .equals(direction))
- // wsdl:portType -> wsdl:operation -> wsdl:input
- ? PolicyInclude.INPUT_POLICY
- // wsdl:portType -> wsdl:operation -> wsdl:output
- : PolicyInclude.OUTPUT_POLICY;
-
- } // else (descript instanceof AxisFaultMessage) {
- break;
-
- case AxisExtensiblityElementWrapper.PORT_BINDING:
- if (description instanceof AxisOperation) {
-
- // wsdl:binding -> wsdl:operation
- return PolicyInclude.BINDING_OPERATION_POLICY;
-
- } else if (description instanceof AxisMessage) {
-
- String direction = ((AxisMessage) description).getDirection();
-
- return (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN
- .equals(direction))
- // wsdl:binding -> wsdl:operation -> wsdl:input
- ? PolicyInclude.BINDING_INPUT_POLICY
- // wsdl:binding -> wsdl:operation -> wsdl:output
- : PolicyInclude.BINDING_OUTPUT_POLICY;
-
- } // else (descript instanceof AxisFaultMessage) {
- break;
-
- case AxisExtensiblityElementWrapper.PORT:
- // wsdl:service -> wsdl:port
- return PolicyInclude.PORT_POLICY;
- }
-
- return PolicyInclude.ANON_POLICY; // TODO something more like
- // PolicyInclude.UNKNOWN_POLICY
}
private void populatePolicyInclude(int location, AxisDescription description) {
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java?rev=391027&r1=391026&r2=391027&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java Mon Apr 3 05:21:47 2006
@@ -30,6 +30,7 @@
import javax.xml.namespace.QName;
import java.util.*;
+import java.net.URI;
/**
* Class AxisConfigurationImpl
@@ -54,7 +55,7 @@
// to store AxisObserver Objects
private ArrayList observersList = null;
- private String axis2Repository = null;
+ private URI axis2Repository = null;
private HashMap allservices = new HashMap();
/**
@@ -441,7 +442,7 @@
return phasesinfo;
}
- public String getRepository() {
+ public URI getRepository() {
return axis2Repository;
}
@@ -569,7 +570,7 @@
this.phasesinfo = phasesInfo;
}
- public void setRepository(String axis2Repository) {
+ public void setRepository(URI axis2Repository) {
this.axis2Repository = axis2Repository;
}
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/TransportDeploymentTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/TransportDeploymentTest.java?rev=391027&r1=391026&r2=391027&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/TransportDeploymentTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/TransportDeploymentTest.java Mon Apr 3 05:21:47 2006
@@ -25,6 +25,7 @@
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
+import java.io.File;
public class TransportDeploymentTest extends AbstractTestCase {
/**
@@ -38,8 +39,12 @@
PhaseException,
DeploymentException,
XMLStreamException {
+ String repositoryName = testResourceDir + "/deployment";
+ File repo = new File(repositoryName);
+ String xmlFile = testResourceDir + "/deployment/server-transport.xml";
+ File xml = new File(xmlFile);
DeploymentEngine engine = new DeploymentEngine(
- testResourceDir + "/deployment", testResourceDir + "/deployment/server-transport.xml");
+ repo.toURI(), xml.toURI());
engine.load();
AxisConfiguration er = engine.getAxisConfig();
TransportInDescription transport = er.getTransportIn(new QName("http"));