From 0cc8ed2208c9d04057bcb00859490290e3aa948c Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:08:11 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835129 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/helloworld/HelloWorldImpl.java | 33 --------- .../src/main/java/helloworld/HelloWorldServer.java | 46 ------------- .../main/java/helloworld/HelloWorldService.java | 31 --------- .../sca-deployables/helloworldws.composite | 33 --------- .../src/main/resources/wsdl/helloworld.wsdl | 79 ---------------------- .../java/helloworld/HelloWorldServerTestCase.java | 62 ----------------- 6 files changed, 284 deletions(-) delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/META-INF/sca-deployables/helloworldws.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java (limited to 'branches/sca-java-1.3.2/samples/helloworld-ws-service/src') diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 0de3c70303..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index c37bfcda65..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldServer.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This server program shows how to create an SCA runtime, and start it which - * activates the helloworld Web service endpoint. - */ -public class HelloWorldServer { - - public static void main(String[] args) { - - SCADomain scaDomain = SCADomain.newInstance("META-INF/sca-deployables/helloworldws.composite"); - - try { - System.out.println("HelloWorld server started (press enter to shutdown)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - scaDomain.close(); - System.out.println("HelloWorld server stopped"); - } - -} diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 7245513b2a..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetings(String name); -} - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/META-INF/sca-deployables/helloworldws.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/META-INF/sca-deployables/helloworldws.composite deleted file mode 100644 index d767625ae7..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/META-INF/sca-deployables/helloworldws.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 454763410c..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java deleted file mode 100644 index 189332be91..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; - -import java.io.IOException; -import java.net.Socket; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests that the helloworld server is available - */ -public class HelloWorldServerTestCase{ - - private SCADomain scaDomain; - - @Before - public void startServer() throws Exception { - scaDomain = SCADomain.newInstance("META-INF/sca-deployables/helloworldws.composite"); - } - - @Test - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - @Test - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - - assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); - } - - @After - public void stopServer() throws Exception { - scaDomain.close(); - } - -} -- cgit v1.2.3