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 2008/07/18 21:50:17 UTC

svn commit: r678017 - in /cxf/branches/2.0.x-fixes: ./ tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/ tools...

Author: dkulp
Date: Fri Jul 18 12:50:17 2008
New Revision: 678017

URL: http://svn.apache.org/viewvc?rev=678017&view=rev
Log:
Merged revisions 678009 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r678009 | dkulp | 2008-07-18 15:36:17 -0400 (Fri, 18 Jul 2008) | 2 lines
  
  [CXF-1678] Patch from Mike Ramnarine applied
........

Added:
    cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-1678/
      - copied from r678009, cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-1678/
    cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-1678/hello_world_logical_only.wsdl
      - copied unchanged from r678009, cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-1678/hello_world_logical_only.wsdl
Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java
    cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/Messages.properties
    cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
    cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 18 12:50:17 2008
@@ -1 +1 @@
-/cxf/trunk:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004
+/cxf/trunk:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java?rev=678017&r1=678016&r2=678017&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java (original)
+++ cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java Fri Jul 18 12:50:17 2008
@@ -22,8 +22,6 @@
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.common.ToolContext;
 import org.apache.cxf.tools.common.ToolException;
@@ -73,17 +71,7 @@
         Map<String, JavaInterface> interfaces = javaModel.getInterfaces();
             
         Map<String, JavaServiceClass> services = javaModel.getServiceClasses();
-        
-        if (services.size() == 0) {
-            ServiceInfo serviceInfo = (ServiceInfo)env.get(ServiceInfo.class);
-            String wsdl = serviceInfo.getDescription().getBaseURI();
-            Message msg = new Message("CAN_NOT_GEN_IMPL", LOG, wsdl);
-            if (penv.isVerbose()) {
-                System.out.println(msg.toString());
-            }
-            return;
-        }
-        
+
         JavaServiceClass service = null;
         String port = "";
         if (!services.values().isEmpty()) {

Modified: cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/Messages.properties?rev=678017&r1=678016&r2=678017&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/Messages.properties (original)
+++ cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/Messages.properties Fri Jul 18 12:50:17 2008
@@ -24,7 +24,6 @@
 FAIL_TO_GET_WSDL = Fail to get wsdl url from : {0}
 CAN_NOT_GEN_ANT = WSDL2Java Warning : can not generate ant build.xml for the WSDL has no service : {0}
 CAN_NOT_GEN_SEI = WSDL2Java Warning : can not generate interface class for an WSDL has no PortType : {0}
-CAN_NOT_GEN_IMPL= WSDL2Java Warning : can not generate impl class for an WSDL has no service : {0}
 CAN_NOT_GEN_SRV = WSDL2Java Warning : can not generate server class for an WSDL has no PortType : {0} 
 CAN_NOT_GEN_SERVICE = WSDL2Java Warning : can not generate service class for an WSDL has no service : {0}
 CAN_NOT_GEN_CLIENT = WSDL2Java Warning : can not generate client for an WSDL has no service : {0}
\ No newline at end of file

Modified: cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm?rev=678017&r1=678016&r2=678017&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm (original)
+++ cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm Fri Jul 18 12:50:17 2008
@@ -35,9 +35,15 @@
  */
 
 @javax.jws.WebService(name = "$intf.Name",
+#if ($service.ServiceName != "") 
                       serviceName = "$service.ServiceName",
+#end
+#if ($port != "") 
                       portName = "$port",
+#end
+#if ($service.Namespace != "") 
                       targetNamespace = "$service.Namespace",
+#end
 #if ($intf.Location != "") 
                       wsdlLocation = "$intf.Location",
 #end

Modified: cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=678017&r1=678016&r2=678017&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java (original)
+++ cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java Fri Jul 18 12:50:17 2008
@@ -79,6 +79,21 @@
     }
 
     @Test
+    // Test for CXF-1678
+    public void testLogicalOnlyWSDL() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, 
+                getLocation("/wsdl2java_wsdl/cxf-1678/hello_world_logical_only.wsdl"));
+        processor.setContext(env);
+        processor.execute();
+
+        assertNotNull("Trouble processing logical only wsdl", output);
+
+        Class clz = classLoader.loadClass("org.apache.cxf.cxf1678.hello_world_soap_http.GreeterImpl");
+        WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class);
+        assertEquals("Greeter", webServiceAnn.name());
+    }
+
+    @Test
     public void testBug305729() throws Exception {
         env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/bug305729/hello_world.wsdl"));
         processor.setContext(env);