You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by jk...@apache.org on 2006/10/31 18:33:26 UTC

svn commit: r469575 - in /incubator/woden/trunk/java/test/org/apache/woden/resolver: OMSimpleURIResolverTest.java SimpleURIResolverTest.java

Author: jkaputin
Date: Tue Oct 31 09:33:25 2006
New Revision: 469575

URL: http://svn.apache.org/viewvc?view=rev&rev=469575
Log:
WODEN-14 Applied patch contributed by Graham Turrel
31/10/06 to handle use of %20 for spaces in URLs.

Modified:
    incubator/woden/trunk/java/test/org/apache/woden/resolver/OMSimpleURIResolverTest.java
    incubator/woden/trunk/java/test/org/apache/woden/resolver/SimpleURIResolverTest.java

Modified: incubator/woden/trunk/java/test/org/apache/woden/resolver/OMSimpleURIResolverTest.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/test/org/apache/woden/resolver/OMSimpleURIResolverTest.java?view=diff&rev=469575&r1=469574&r2=469575
==============================================================================
--- incubator/woden/trunk/java/test/org/apache/woden/resolver/OMSimpleURIResolverTest.java (original)
+++ incubator/woden/trunk/java/test/org/apache/woden/resolver/OMSimpleURIResolverTest.java Tue Oct 31 09:33:25 2006
@@ -17,6 +17,7 @@
 
 
 import java.io.IOException;
+import java.net.URI;
 import java.net.URL;
 import java.net.URLConnection;
 import java.util.Iterator;
@@ -102,7 +103,7 @@
         		catalogURL);
         // simulate the standard compiler "-D" option ...
         // (cater for URL space char representation)
-        fCatalogPropValue = System.setProperty(fCatalogProperty, catalogURL.getFile().replaceAll("%20", " ")); 
+        fCatalogPropValue = System.setProperty(fCatalogProperty, new URI(catalogURL.getFile()).getPath()); 
         
         WSDLFactory factory = OMWSDLFactory.newInstance("org.apache.woden.internal.OMWSDLFactory");
         WSDLReader reader = factory.newWSDLReader();
@@ -122,7 +123,7 @@
 		// (SimpleURIResolver() default constructor is the default behaviour)
 		reader.setURIResolver(new SimpleURIResolver(rootURL.toString()));
 		
-        DescriptionElement descElem = reader.readWSDL(wsdlURL.toString().replaceAll("%20", " "));
+        DescriptionElement descElem = reader.readWSDL(wsdlURL.toString());
         assertNotNull("The reader did not return a WSDL description.", descElem);
         Description descComp = descElem.toComponent();
         

Modified: incubator/woden/trunk/java/test/org/apache/woden/resolver/SimpleURIResolverTest.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/test/org/apache/woden/resolver/SimpleURIResolverTest.java?view=diff&rev=469575&r1=469574&r2=469575
==============================================================================
--- incubator/woden/trunk/java/test/org/apache/woden/resolver/SimpleURIResolverTest.java (original)
+++ incubator/woden/trunk/java/test/org/apache/woden/resolver/SimpleURIResolverTest.java Tue Oct 31 09:33:25 2006
@@ -17,6 +17,7 @@
 
 
 import java.io.IOException;
+import java.net.URI;
 import java.net.URL;
 import java.net.URLConnection;
 import java.util.Iterator;
@@ -101,7 +102,7 @@
         		catalogURL);
         // simulate the standard compiler "-D" option ...
         // (cater for URL space char representation)
-        fCatalogPropValue = System.setProperty(fCatalogProperty, catalogURL.getFile().replaceAll("%20", " ")); 
+        fCatalogPropValue = System.setProperty(fCatalogProperty, new URI(catalogURL.getFile()).getPath()); 
         
         WSDLFactory factory = WSDLFactory.newInstance();
         WSDLReader reader = factory.newWSDLReader();
@@ -121,7 +122,7 @@
 		// (SimpleURIResolver() default constructor is the default behaviour)
 		reader.setURIResolver(new SimpleURIResolver(rootURL.toString()));
 		
-        DescriptionElement descElem = reader.readWSDL(wsdlURL.toString().replaceAll("%20", " "));
+		DescriptionElement descElem = reader.readWSDL(wsdlURL.toString());
         assertNotNull("The reader did not return a WSDL description.", descElem);
         Description descComp = descElem.toComponent();
         



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