You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/09/26 02:39:19 UTC
svn commit: r819073 - in /cxf/branches/2.1.x-fixes: ./
rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/
tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/
tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/...
Author: dkulp
Date: Sat Sep 26 00:39:19 2009
New Revision: 819073
URL: http://svn.apache.org/viewvc?rev=819073&view=rev
Log:
Merged revisions 818947 via svnmerge from
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes
................
r818947 | dkulp | 2009-09-25 14:46:20 -0400 (Fri, 25 Sep 2009) | 11 lines
Merged revisions 818696 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r818696 | dkulp | 2009-09-24 22:15:23 -0400 (Thu, 24 Sep 2009) | 3 lines
Fix an issue where java2ws tries to use the wsdlLocation attribute from
the impl to create a wsdl, but if that wsdlLocation is a URI (like
file://) that resulted in trying to create a file named "file://...".
........
................
Modified:
cxf/branches/2.1.x-fixes/ (props changed)
cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxwsServiceBuilder.java
cxf/branches/2.1.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/AbstractGenerator.java
cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxwsServiceBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxwsServiceBuilder.java?rev=819073&r1=819072&r2=819073&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxwsServiceBuilder.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxwsServiceBuilder.java Sat Sep 26 00:39:19 2009
@@ -20,6 +20,7 @@
package org.apache.cxf.jaxws;
import java.io.File;
+import java.net.URI;
import org.apache.cxf.common.util.StringUtils;
import org.apache.cxf.frontend.AbstractServiceFactory;
@@ -53,7 +54,23 @@
JaxWsImplementorInfo jaxwsImpl = serviceFactory.getJaxWsImplementorInfo();
String wsdlLocation = jaxwsImpl.getWsdlLocation();
if (!StringUtils.isEmpty(wsdlLocation)) {
- return new File(wsdlLocation);
+ try {
+ URI uri = new URI(wsdlLocation);
+ if ("file".equals(uri.getScheme())
+ || StringUtils.isEmpty(uri.getScheme())) {
+ File f = new File(uri);
+ if (f.exists()) {
+ return f;
+ }
+ }
+ } catch (Exception e) {
+ //ignore
+ }
+
+ File f = new File(wsdlLocation);
+ if (f.exists()) {
+ return f;
+ }
}
return super.getOutputFile();
}
Modified: cxf/branches/2.1.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/AbstractGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/AbstractGenerator.java?rev=819073&r1=819072&r2=819073&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/AbstractGenerator.java (original)
+++ cxf/branches/2.1.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/AbstractGenerator.java Sat Sep 26 00:39:19 2009
@@ -77,7 +77,7 @@
return null;
}
File parentDir = new File(parent);
- if (parentDir.isDirectory() && !parentDir.exists()) {
+ if (!parentDir.exists()) {
parentDir.mkdirs();
}
return parentDir;
Modified: cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java?rev=819073&r1=819072&r2=819073&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java (original)
+++ cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java Sat Sep 26 00:39:19 2009
@@ -34,8 +34,6 @@
import org.apache.cxf.service.model.BindingInfo;
import org.apache.cxf.service.model.ServiceInfo;
import org.apache.cxf.tools.common.ProcessorTestBase;
-import org.apache.cxf.tools.fortest.classnoanno.docbare.Stock;
-import org.apache.cxf.tools.fortest.withannotation.doc.Hello;
import org.apache.cxf.tools.java2wsdl.generator.wsdl11.WSDL11Generator;
import org.apache.cxf.tools.util.AnnotationUtil;
import org.apache.cxf.transport.DestinationFactoryManager;
@@ -68,16 +66,6 @@
}
@Test
- public void testGetOutputFile() {
- builder.setServiceClass(Stock.class);
- assertNull(builder.getOutputFile());
- builder.setServiceClass(Hello.class);
- assertNotNull(builder.getOutputFile());
- File expected = new File("file:///c:/tmp.wsdl");
- assertTrue(expected.equals(builder.getOutputFile()));
- }
-
- @Test
public void testDocLitWrappedWithWrapperClass() throws Exception {
builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.doc.StockWrapped.class);
ServiceInfo service = builder.createService();