tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r688805 - in /tuscany/java/sca/modules/implementation-java/src: main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/
Date Mon, 25 Aug 2008 17:59:25 GMT
Author: rfeng
Date: Mon Aug 25 10:59:25 2008
New Revision: 688805

URL: http://svn.apache.org/viewvc?rev=688805&view=rev
Log:
Fix for TUSCANY-2513 (patch from Scott)

Modified:
    tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java
    tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessorTestCase.java

Modified: tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java?rev=688805&r1=688804&r2=688805&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java
(original)
+++ tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java
Mon Aug 25 10:59:25 2008
@@ -28,6 +28,8 @@
 import java.util.Set;
 import java.util.logging.Logger;
 
+import javax.jws.WebService;
+
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.Service;
 import org.apache.tuscany.sca.implementation.java.IntrospectionException;
@@ -64,7 +66,10 @@
             // scan interfaces for remotable
             Set<Class> interfaces = getAllInterfaces(clazz);
             for (Class<?> interfaze : interfaces) {
-                if (interfaze.isAnnotationPresent(Remotable.class) || interfaze.isAnnotationPresent(Callback.class))
{
+                if (interfaze.isAnnotationPresent(Remotable.class) 
+                    || interfaze.isAnnotationPresent(WebService.class)
+                    || interfaze.isAnnotationPresent(Callback.class)
+                    ) {
                     Service service;
                     try {
                         service = createService(interfaze);

Modified: tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessorTestCase.java?rev=688805&r1=688804&r2=688805&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessorTestCase.java
(original)
+++ tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessorTestCase.java
Mon Aug 25 10:59:25 2008
@@ -18,6 +18,8 @@
  */
 package org.apache.tuscany.sca.implementation.java.introspect.impl;
 
+import javax.jws.WebService;
+
 import junit.framework.TestCase;
 
 import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
@@ -65,6 +67,12 @@
         assertEquals(1, type.getServices().size());
     }
 
+
+    public void testMultipleWithWebServiceAnnotation() throws Exception {
+        processor.visitClass(FooMultipleWithWebService.class, type);
+        assertEquals(2, type.getServices().size());
+    }
+    
     public void testRemotableNoService() throws Exception {
         processor.visitClass(FooRemotableNoService.class, type);
         assertEquals(1, type.getServices().size());
@@ -102,6 +110,10 @@
 
     private interface Bar2 {
     }
+    
+    @WebService
+    private interface Bar3 {
+    }
 
     @Remotable
     private interface BazRemotable {
@@ -124,7 +136,10 @@
     private class FooMultipleWithCalback implements Baz, Bar {
 
     }
-
+    
+    private class FooMultipleWithWebService implements BazRemotable, Bar3 {
+    }
+    
     private class FooRemotableNoService implements BazRemotable, Bar {
 
     }



Mime
View raw message