cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r703523 - in /cxf/branches/2.1.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/
Date Fri, 10 Oct 2008 17:01:34 GMT
Author: dkulp
Date: Fri Oct 10 10:01:34 2008
New Revision: 703523

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

........
  r703501 | dkulp | 2008-10-10 11:36:02 -0400 (Fri, 10 Oct 2008) | 2 lines
  
  Log a warning if you use the Simple frontend with a class that has jaxws annotations on
it.   (sick of fielding support issues related to it)
........

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/JaxWsServiceFactoryBean.java
    cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 10 10:01:34 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501

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/support/JaxWsServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?rev=703523&r1=703522&r2=703523&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
Fri Oct 10 10:01:34 2008
@@ -174,6 +174,10 @@
         setJaxWsImplementorInfo(new JaxWsImplementorInfo(serviceClass));
         super.setServiceClass(getJaxWsImplementorInfo().getEndpointClass());
     }
+    @Override
+    protected void checkServiceClassAnnotations(Class<?> sc) {
+        //no need to check
+    }
 
     @Override
     protected void initializeDefaultInterceptors() {

Modified: cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=703523&r1=703522&r2=703523&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Fri Oct 10 10:01:34 2008
@@ -2048,6 +2048,35 @@
 
     public void setServiceClass(Class<?> serviceClass) {
         this.serviceClass = serviceClass;
+        checkServiceClassAnnotations(serviceClass);
+    }
+    protected void checkServiceClassAnnotations(Class<?> sc) {
+        Annotation anns[] = serviceClass.getAnnotations();
+        if (anns != null) {
+            for (Annotation ann : anns) {
+                String pkg = ann.annotationType().getPackage().getName(); 
+                if ("javax.xml.ws".equals(pkg)
+                    || "javax.jws".equals(pkg)) {
+                    
+                    LOG.log(Level.WARNING, "JAXWS_ANNOTATION_FOUND", serviceClass.getName());
+                    return;
+                }
+            }
+        }
+        for (Method m : serviceClass.getMethods()) {
+            anns = m.getAnnotations();
+            if (anns != null) {
+                for (Annotation ann : anns) {
+                    String pkg = ann.annotationType().getPackage().getName(); 
+                    if ("javax.xml.ws".equals(pkg)
+                        || "javax.jws".equals(pkg)) {
+                        
+                        LOG.log(Level.WARNING, "JAXWS_ANNOTATION_FOUND", serviceClass.getName());
+                        return;
+                    }
+                }
+            }
+        }
     }
 
     public String getWsdlURL() {

Modified: cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties?rev=703523&r1=703522&r2=703523&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties
Fri Oct 10 10:01:34 2008
@@ -30,4 +30,4 @@
   without the JAX-WS service factory bean.
 INTRACTABLE_PART= Message part {0} of Message {1} cannot be processed. This can be caused
by the use of JAX-WS-specific types \
  without the JAX-WS service factory bean.
- 
\ No newline at end of file
+JAXWS_ANNOTATION_FOUND=A JAX-WS Annotation was found on {0} while using the Simple frontend.
 For better results, use the JAX-WS frontend.
\ No newline at end of file



Mime
View raw message