diff options
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest')
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")); } } |