axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r632933 - /webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/MultiRedirectionCatalogTest.java
Date Mon, 03 Mar 2008 02:59:12 GMT
Author: dims
Date: Sun Mar  2 18:59:12 2008
New Revision: 632933

URL: http://svn.apache.org/viewvc?rev=632933&view=rev
Log:
Fix the breaking catalong test

Modified:
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/MultiRedirectionCatalogTest.java

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/MultiRedirectionCatalogTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/MultiRedirectionCatalogTest.java?rev=632933&r1=632932&r2=632933&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/MultiRedirectionCatalogTest.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/MultiRedirectionCatalogTest.java
Sun Mar  2 18:59:12 2008
@@ -47,10 +47,9 @@
 		verifySuccess(ROOT_WSDL, TEST_RESOURCES + "basic-catalog.xml");
 	}
 
-// FIXME: This test breaks on windows now.    
-//	public void testNextCatalogSuccess() {
-//		verifySuccess(ROOT_WSDL, TEST_RESOURCES + "root-catalog.xml");
-//	}
+	public void testNextCatalogSuccess() {
+		verifySuccess(ROOT_WSDL, TEST_RESOURCES + "root-catalog.xml");
+	}
 	
 	public void testNextCatalogFailure() {
 		verifyFailure(ROOT_WSDL, TEST_RESOURCES + "fail/root-catalog.xml");		
@@ -76,8 +75,8 @@
 	    
 	    try{
 			OASISCatalogManager catalogManager = new OASISCatalogManager();
-			catalogManager.setCatalogFiles(getAbsolutePath(catalogFile));
-	    	WSDL4JWrapper w4j = new WSDL4JWrapper(url, catalogManager);
+			catalogManager.setCatalogFiles(getURLFromLocation(catalogFile).toString());
+            WSDL4JWrapper w4j = new WSDL4JWrapper(url, catalogManager);
 	    	Definition wsdlDef = w4j.getDefinition();
 	    	assertNotNull(wsdlDef);   
 	    	QName portTypeName = new QName("http://www.example.com/test/calculator",
@@ -108,7 +107,7 @@
 	    
 	    try{
 			OASISCatalogManager catalogManager = new OASISCatalogManager();
-			catalogManager.setCatalogFiles(getAbsolutePath(catalogFile));
+            catalogManager.setCatalogFiles(getURLFromLocation(catalogFile).toString());
 	    	WSDL4JWrapper w4j = new WSDL4JWrapper(url, catalogManager);
 	    	w4j.getDefinition();
 	    	fail("Should have received a WSDLException due to the invalid WSDL location " 
@@ -144,16 +143,5 @@
 	    }
 	    
 	    return url;
-	}
-
-	private String getAbsolutePath(String location) {
-	    try {
-	        String baseDir = new File(System.getProperty("basedir",".")).getCanonicalPath();
-	        return new File(baseDir + location).getAbsolutePath();
-	    } catch (Exception e) {
-	        e.printStackTrace();
-	        fail();
-                return null;
-	    }
 	}
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message