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/08/20 23:05:22 UTC

svn commit: r687465 - in /cxf/branches/2.1.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/ tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/front...

Author: dkulp
Date: Wed Aug 20 14:05:21 2008
New Revision: 687465

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

........
  r687463 | dkulp | 2008-08-20 17:00:53 -0400 (Wed, 20 Aug 2008) | 3 lines
  
  Update to try and eliminate a NPE with service creation
  [CXF-1756] Remove name attribute from generated impls
........

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/support/JaxWsServiceConfiguration.java
    cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java
    cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
    cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
    cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 20 14:05:21 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687387
+/cxf/trunk:686333-686363,686764,686820,687096,687387,687463

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Aug 20 14:05:21 2008
@@ -1 +1 @@
-/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687387
+/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687387,687463

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?rev=687465&r1=687464&r2=687465&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java Wed Aug 20 14:05:21 2008
@@ -145,29 +145,31 @@
         if (method == null
             || method.getReturnType().equals(Future.class)
             || method.getReturnType().equals(Response.class)) {
-            return false;
+            return Boolean.FALSE;
         }
         
-        if (method != null) {
-            WebMethod wm = method.getAnnotation(WebMethod.class);
-            if (wm != null) {
-                if (wm.exclude()) {
-                    return Boolean.FALSE;
-                } else {
-                    return Boolean.TRUE;
-                }
+        WebMethod wm = method.getAnnotation(WebMethod.class);
+        if (wm != null) {
+            if (wm.exclude()) {
+                return Boolean.FALSE;
             } else {
-                if (method.getDeclaringClass().isInterface()) {
-                    return hasWebServiceAnnotation(method);
-                }
-                return hasWebServiceAnnotation(method);              
+                return Boolean.TRUE;
             }
+        } 
+        if (method.getDeclaringClass().isInterface()) {
+            return hasWebServiceAnnotation(method);
+        }
+        if (implInfo.getSEIClass() == null) {
+            return hasWebServiceAnnotation(method);
         }
-        return Boolean.FALSE;
+        return implInfo.getSEIClass().isAssignableFrom(method.getDeclaringClass());
     }
 
     @Override
     public Boolean isOperation(final Method method) {
+        if (Object.class.equals(method.getDeclaringClass())) {
+            return false;
+        }
         Class implClz = implInfo.getImplementorClass();
         if (isWebMethod(getDeclaredMethod(implClz, method))) {
             return true;
@@ -190,7 +192,7 @@
             } catch (SecurityException e) {
                 throw new ServiceConstructionException(e);
             } catch (NoSuchMethodException e) {
-                return null;
+                return isWebMethod(method) ? method : null;
             }
         }
         return method;

Modified: cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java?rev=687465&r1=687464&r2=687465&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java (original)
+++ cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java Wed Aug 20 14:05:21 2008
@@ -271,7 +271,7 @@
         File wsdlFile = outputFile("tmp.wsdl");
         String[] args = new String[] {"-wsdl", "-o", output.getPath() + "/tmp.wsdl", "-verbose", "-s",
                                       output.getPath(), "-frontend", "jaxws", "-client", "-server",
-                                      "org.apache.cxf.tools.fortest.GreeterImpl"};
+                                      org.apache.cxf.tools.fortest.GreeterImpl.class.getName()};
         JavaToWS.main(args);
         assertTrue("Failed to generate WSDL file", wsdlFile.exists());
 

Modified: cxf/branches/2.1.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.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm?rev=687465&r1=687464&r2=687465&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm (original)
+++ cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm Wed Aug 20 14:05:21 2008
@@ -34,7 +34,7 @@
  * 
  */
 
-@javax.jws.WebService(name = "$intf.Name",
+@javax.jws.WebService(
 #if ($service.ServiceName != "") 
                       serviceName = "$service.ServiceName",
 #end

Modified: cxf/branches/2.1.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.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=687465&r1=687464&r2=687465&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java (original)
+++ cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java Wed Aug 20 14:05:21 2008
@@ -94,7 +94,8 @@
 
         Class clz = classLoader.loadClass("org.apache.cxf.cxf1678.hello_world_soap_http.GreeterImpl");
         WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class);
-        assertEquals("Greeter", webServiceAnn.name());
+        assertEquals("org.apache.cxf.cxf1678.hello_world_soap_http.Greeter",
+                     webServiceAnn.endpointInterface());
     }
 
     @Test
@@ -119,7 +120,8 @@
         Class clz = classLoader.loadClass("org.apache.cxf.w2j.hello_world_soap_http.GreeterImpl");
 
         WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class);
-        assertEquals("Greeter", webServiceAnn.name());
+        assertTrue("Impl class should note generate name property value in webService annotation",
+                    webServiceAnn.name().equals(""));
         assertFalse("Impl class should generate portName property value in webService annotation",
                     webServiceAnn.portName().equals(""));
         assertFalse("Impl class should generate serviceName property value in webService annotation",

Modified: cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java?rev=687465&r1=687464&r2=687465&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java (original)
+++ cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java Wed Aug 20 14:05:21 2008
@@ -315,7 +315,6 @@
         assertTrue("Webservice annotation wsdlLocation should begin with file", ws.wsdlLocation()
             .startsWith("file"));
         assertEquals("org.apache.cxf.w2j.hello_world_rpclit.GreeterRPCLit", ws.endpointInterface());
-        assertEquals("GreeterRPCLit", ws.name());
 
     }