summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/testing/itest/scaclient-remote/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-04-21 13:38:33 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-04-21 13:38:33 +0000
commit6cb18f33c19def84dc9919e8f0af99acd339f487 (patch)
treec632b7c14e30704002654cda7ea41b167a8eb221 /sca-java-2.x/trunk/testing/itest/scaclient-remote/src
parentbebf8c95215474a72e986ebe1a139d13e9022ab0 (diff)
Clean up, remove unused classes, and get working
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1095702 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest/scaclient-remote/src')
-rw-r--r--sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java3
-rw-r--r--sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java10
-rw-r--r--sca-java-2.x/trunk/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java6
3 files changed, 8 insertions, 11 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java b/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java
index 1c7edaefb6..708f313509 100644
--- a/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java
+++ b/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java
@@ -18,6 +18,9 @@
*/
package itest;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
public interface HelloworldService {
String sayHello(String name);
diff --git a/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java b/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java
index 5af221313e..86ba76ff50 100644
--- a/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java
+++ b/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java
@@ -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"));
}
}
diff --git a/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java b/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java
index defd823ad8..4e3a15c862 100644
--- a/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java
+++ b/sca-java-2.x/trunk/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java
@@ -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 TestCase {
@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"));
}
}