summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/implementation-java/src/test/java
diff options
context:
space:
mode:
authorvamsic007 <vamsic007@13f79535-47bb-0310-9956-ffa450edef68>2008-08-27 09:57:53 +0000
committervamsic007 <vamsic007@13f79535-47bb-0310-9956-ffa450edef68>2008-08-27 09:57:53 +0000
commit819ea724b3e7d7f272d281a2d628cd495e62e3db (patch)
tree76627c8ca56cdcdf1ad444416e54794004754896 /java/sca/modules/implementation-java/src/test/java
parent072a14b149051d36990d667a6feaf3c01ed47da6 (diff)
TUSCANY-2513 Java intfs with @WebService should be treated like @Remotable intfs wrt calculation of services implemented by a Java implementation
o Test for the @WebService annotation on an implemented interface resulting in a service. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@689430 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/implementation-java/src/test/java')
-rw-r--r--java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java b/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java
index 50a221722f..ff267cd938 100644
--- a/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java
+++ b/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java
@@ -22,6 +22,7 @@ import java.lang.reflect.Constructor;
import java.util.Collection;
import java.util.List;
+import javax.jws.WebService;
import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
@@ -268,6 +269,17 @@ public class HeuristicPojoProcessorTestCase extends AbstractProcessorTest {
assertTrue(type.getPropertyMembers().containsKey("gen4"));
}
+ /**
+ * Interfaces with "@WebService" annotation implemented by the class should result
+ * in a Service in the same manner as an "@Remotable" annotation would.
+ */
+ public void testInterfaceWithWebServiceAnnotation() throws Exception{
+ JavaImplementation type = javaImplementationFactory.createJavaImplementation();
+ visitEnd(SomeWebServiceImpl.class, type);
+ assertEquals(1, type.getServices().size());
+ assertEquals("SomeWebService", type.getServices().get(0).getName());
+ }
+
@Remotable
private interface ReferenceRemotableInterface {
void operation1(String param1);
@@ -532,4 +544,19 @@ public class HeuristicPojoProcessorTestCase extends AbstractProcessorTest {
}
+ @WebService
+ private interface SomeWebService {
+ void serviceOperation1();
+ }
+
+ @Service
+ private static class SomeWebServiceImpl implements SomeWebService {
+ public SomeWebServiceImpl() {
+
+ }
+
+ public void serviceOperation1() {
+ }
+ }
+
}