You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2008/04/23 07:03:29 UTC
svn commit: r650744 -
/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/description/DescriptionTestUtils2.java
Author: dims
Date: Tue Apr 22 22:03:27 2008
New Revision: 650744
URL: http://svn.apache.org/viewvc?rev=650744&view=rev
Log:
better way to construct the URL for a file. Don't rely on file://localhost
Modified:
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/description/DescriptionTestUtils2.java
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/description/DescriptionTestUtils2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/description/DescriptionTestUtils2.java?rev=650744&r1=650743&r2=650744&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/description/DescriptionTestUtils2.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/description/DescriptionTestUtils2.java Tue Apr 22 22:03:27 2008
@@ -32,6 +32,7 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
+import java.io.File;
/**
*
@@ -51,16 +52,15 @@
static public String getWSDLLocation(String wsdlFileName) {
// Get the URL to the WSDL file. Note that 'basedir' is setup by Maven
- String basedir = System.getProperty("basedir");
- String urlString = "file://localhost/" + basedir + "/test-resources/wsdl/" + wsdlFileName;
- return urlString;
+ String basedir = System.getProperty("basedir",".");
+ return basedir + "/test-resources/wsdl/" + wsdlFileName;
}
static public URL getWSDLURL(String wsdlFileName) {
URL wsdlURL = null;
String urlString = getWSDLLocation(wsdlFileName);
try {
- wsdlURL = new URL(urlString);
+ wsdlURL = new File(urlString).getAbsoluteFile().toURL();
} catch (Exception e) {
TestLogger.logger.debug(
"Caught exception creating WSDL URL :" + urlString + "; exception: " +
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org