cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r533864 - in /incubator/cxf/trunk: rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/ tools/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwra...
Date Mon, 30 Apr 2007 22:11:28 GMT
Author: dkulp
Date: Mon Apr 30 15:11:28 2007
New Revision: 533864

URL: http://svn.apache.org/viewvc?view=rev&rev=533864
Log:
Fix issue of not detecting JAX-WS code if it has only a WebService annotation.  This results
in invalid WSDL's in some cases.

Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/FrontendFactory.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/Calculator.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?view=diff&rev=533864&r1=533863&r2=533864
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Mon Apr 30 15:11:28 2007
@@ -52,6 +52,12 @@
 public class JaxWsServiceConfiguration extends AbstractServiceConfiguration {
 
     private JaxWsImplementorInfo implInfo;
+    
+    
+    
+    public JaxWsServiceConfiguration() {
+        
+    }
 
     @Override
     public void setServiceFactory(ReflectionServiceFactoryBean serviceFactory) {
@@ -383,11 +389,9 @@
 
         ResponseWrapper rw = m.getAnnotation(ResponseWrapper.class);
         String clsName = "";
-        boolean isWrapperSpecifiedByAnno = true;
         if (rw == null) {
             clsName = getPackageName(selected) + ".jaxws." + AnnotationUtil.capitalize(selected.getName())
                       + "Response";
-            isWrapperSpecifiedByAnno = false;
         } else {
             clsName = rw.className();
         }
@@ -396,11 +400,7 @@
             try {
                 return ClassLoaderUtils.loadClass(clsName, implInfo.getEndpointClass());
             } catch (ClassNotFoundException e) {
-                if (isWrapperSpecifiedByAnno) {
-                    throw new ServiceConstructionException(e);
-                } else {
-                    //do nothing, we will mock a schema for wrapper bean later on
-                }
+                //do nothing, we will mock a schema for wrapper bean later on
             }
         }
 
@@ -413,10 +413,8 @@
 
         RequestWrapper rw = m.getAnnotation(RequestWrapper.class);
         String clsName = "";
-        boolean isWrapperSpecifiedByAnno = true;
         if (rw == null) {
             clsName = getPackageName(selected) + ".jaxws." + AnnotationUtil.capitalize(selected.getName());
-            isWrapperSpecifiedByAnno = false;
         } else {
             clsName = rw.className();
         }
@@ -425,11 +423,7 @@
             try {
                 return ClassLoaderUtils.loadClass(clsName, implInfo.getEndpointClass());
             } catch (ClassNotFoundException e) {
-                if (isWrapperSpecifiedByAnno) {
-                    throw new ServiceConstructionException(e);
-                } else {
-                    //do nothing, we will mock a schema for wrapper bean later on
-                }
+                //do nothing, we will mock a schema for wrapper bean later on
             }
         }
 

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/FrontendFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/FrontendFactory.java?view=diff&rev=533864&r1=533863&r2=533864
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/FrontendFactory.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/FrontendFactory.java
Mon Apr 30 15:11:28 2007
@@ -26,7 +26,9 @@
 
 import javax.jws.WebMethod;
 import javax.jws.WebParam;
+import javax.jws.WebService;
 import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.WebServiceProvider;
 
 import org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.WrapperUtil;
 import org.apache.cxf.tools.util.AnnotationUtil;
@@ -35,7 +37,9 @@
     private static FrontendFactory instance;
     private Class serviceClass;
     private List<Method> wsMethods;
-    private Class[] annotations = new Class[] {SOAPBinding.class};
+    private Class[] annotations = new Class[] {SOAPBinding.class,
+                                               WebService.class,
+                                               WebServiceProvider.class};
 
     public enum Style {
         Jaxws,

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/Calculator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/Calculator.java?view=diff&rev=533864&r1=533863&r2=533864
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/Calculator.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/Calculator.java
Mon Apr 30 15:11:28 2007
@@ -19,9 +19,7 @@
 
 package org.apache.cxf.tools.fortest.classnoanno.docwrapped;
 
-import javax.jws.WebService;
 
-@WebService
 public class Calculator {
     public int add(int a, int b) throws AddException {
         if (a < 0 || b < 0) {



Mime
View raw message