You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2011/04/21 15:38:33 UTC

svn commit: r1095702 - in /tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src: main/java/itest/HelloworldService.java main/java/itest/HelloworldServiceImpl.java test/java/test/scaclient/SCAClientTestCase.java

Author: antelder
Date: Thu Apr 21 13:38:33 2011
New Revision: 1095702

URL: http://svn.apache.org/viewvc?rev=1095702&view=rev
Log:
Clean up, remove unused classes, and get working

Modified:
    tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java
    tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java
    tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java

Modified: tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java?rev=1095702&r1=1095701&r2=1095702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java (original)
+++ tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java Thu Apr 21 13:38:33 2011
@@ -18,6 +18,9 @@
  */
 package itest;
 
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
 public interface HelloworldService {
 
     String sayHello(String name);

Modified: tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java?rev=1095702&r1=1095701&r2=1095702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java Thu Apr 21 13:38:33 2011
@@ -21,24 +21,18 @@ package itest;
 import org.oasisopen.sca.annotation.EagerInit;
 import org.oasisopen.sca.annotation.Init;
 import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
 
 @EagerInit
 @Scope("COMPOSITE")
-@Service({HelloworldService.class, RemoteHelloworldService.class})
-public class HelloworldServiceImpl implements HelloworldService, RemoteHelloworldService {
+public class HelloworldServiceImpl implements HelloworldService {
 
     public String sayHello(String name) {
         return "Hello " + name;
     }
 
-    public String sayHelloRemote(String name) {
-        return "Hello " + name;
-    }
-    
     @Init
     public void init() {
-        System.out.println(sayHello("world"));
+        System.out.println("init: " + sayHello("world"));
     }
 
 }

Modified: tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java?rev=1095702&r1=1095701&r2=1095702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java (original)
+++ tuscany/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java Thu Apr 21 13:38:33 2011
@@ -19,7 +19,7 @@
 
 package test.scaclient;
 
-import itest.RemoteHelloworldService;
+import itest.HelloworldService;
 
 import java.net.URI;
 
@@ -38,8 +38,8 @@ public class SCAClientTestCase extends T
     @Test
     public void testDefault() throws Exception {
         SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("uri:default?wka=127.0.0.1:9876"));
-        RemoteHelloworldService service = clientFactory.getService(RemoteHelloworldService.class, "HelloworldComponent/HelloworldService");
-        assertEquals("Hello petra", service.sayHelloRemote("petra"));
+        HelloworldService service = clientFactory.getService(HelloworldService.class, "HelloworldComponent");
+        assertEquals("Hello petra", service.sayHello("petra"));
     }
 
 }