diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-20 23:53:35 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-20 23:53:35 +0000 |
commit | a3c48da9bb8971497d414f86e352123d95b9c3da (patch) | |
tree | fdf0f3636b65946c061c8b2e89d657b488be274e /java/sca/itest | |
parent | cc7496466097c3cb8e793ebf3e332b025705aaa7 (diff) |
Moving 2.x trunk
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@882795 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest')
921 files changed, 0 insertions, 49141 deletions
diff --git a/java/sca/itest/bpel/helloworld-reference/pom.xml b/java/sca/itest/bpel/helloworld-reference/pom.xml deleted file mode 100644 index 75134e7b11..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/pom.xml +++ /dev/null @@ -1,288 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-bpel</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>itest-bpel-helloworld-reference</artifactId> - <name>Apache Tuscany SCA iTest HelloWorld Reference BPEL</name> - - <repositories> - <repository> - <id>apache.incubator</id> - <url>http://people.apache.org/repo/m2-incubating-repository</url> - </repository> - </repositories> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-bpel-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.ode</groupId> - <artifactId>ode-dao-jpa-ojpa-derby</artifactId> - <version>1.1</version> - <type>zip</type> - </dependency> - - <dependency> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - <version>2.8.0</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <!-- http://jira.codehaus.org/browse/SUREFIRE-322 --> - <version>2.3.1</version> - <configuration> - <useFile>false</useFile> - <trimStackTrace>false</trimStackTrace> - <useSystemClassLoader>true</useSystemClassLoader> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>unpack</id> - <phase>generate-sources</phase> - <goals> - <goal>unpack</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.apache.ode</groupId> - <artifactId>ode-dao-jpa-ojpa-derby</artifactId> - <version>1.1</version> - <type>zip</type> - <overWrite>true</overWrite> - <outputDirectory>${project.build.directory}/test-classes/</outputDirectory> - </artifactItem> - </artifactItems> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <argLine>-Djava.endorsed.dirs=target/endorsed</argLine> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy</id> - <phase>generate-sources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>javax.xml.ws</groupId> - <artifactId>jaxws-api</artifactId> - <version>2.1</version> - <type>jar</type> - </artifactItem> - <artifactItem> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - <version>2.1</version> - <type>jar</type> - </artifactItem> - </artifactItems> - <outputDirectory>${project.build.directory}/endorsed</outputDirectory> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-test-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-test-source</goal> - </goals> - <configuration> - <sources> - <source>target/jaxws-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> - <version>1.12</version> - <!-- - Explicitly add the transitive dependencies for jaxws-api - http://jira.codehaus.org/browse/MEV-498 - --> - <dependencies> - <dependency> - <groupId>javax.jws</groupId> - <artifactId>jsr181-api</artifactId> - <version>1.0-MR1</version> - </dependency> - <dependency> - <groupId>javax.annotation</groupId> - <artifactId>jsr250-api</artifactId> - <version>1.0</version> - </dependency> - </dependencies> - <executions> - <execution> - <id>wsimport</id> - <phase>generate-test-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>org.apache.tuscany.implementation.bpel.example.helloworld</packageName> - <wsdlDirectory>${basedir}/src/test/resources/helloworld/</wsdlDirectory> - <wsdlFiles> - <wsdlFile>helloworld.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - - <!-- - <execution> - <id>wsgen</id> - <phase>process-test-classes</phase> - <goals> - <goal>wsgen-test</goal> - </goals> - <configuration> - <sei>org.apache.tuscany.sca.interfacedef.java.jaxws.MyServiceImpl</sei> - <genWsdl>true</genWsdl> - <keep>true</keep> - <resourceDestDir>${project.build.directory}/jaxws-source</resourceDestDir> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - </configuration> - </execution> - --> - </executions> - - </plugin> - - <!-- - wsimport cannot handle WSDL files without a service/binding element. - CXF wsdl2java plugin does support that. I had to override the default - value of wsdlRoot/testWsdlRoot to a non-existent file to avoid NPE --> - <!-- - <plugin> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-codegen-plugin</artifactId> - <version>2.1</version> - <executions> - <execution> - <id>generate-sources</id> - <phase>generate-sources</phase> - - <configuration> - <sourceRoot>${basedir}/target/jaxws-source</sourceRoot> - <wsdlRoot>NONE</wsdlRoot> - <testWsdlRoot>NONE</testWsdlRoot> - <wsdlOptions> - <wsdlOption> - <wsdl>${basedir}/src/test/resources/wsdl/Stock.wsdl</wsdl> - <outputDir>${basedir}/target/jaxws-source</outputDir> - <packagenames> - <packagename>com.example.stock.cxf</packagename> - </packagenames> - </wsdlOption> - </wsdlOptions> - </configuration> - <goals> - <goal>wsdl2java</goal> - </goals> - </execution> - </executions> - </plugin> - --> - </plugins> - </build> - -</project> diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java b/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java deleted file mode 100644 index d7dff093f9..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.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 greetings; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface GreetingsService { - - public String getGreetings(String name); -} - diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.java b/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.java deleted file mode 100644 index 5ecf5494be..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.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 greetings; - -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(GreetingsService.class) -public class GreetingsServiceImpl implements GreetingsService { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java b/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java deleted file mode 100644 index 24ab0a4181..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java +++ /dev/null @@ -1,65 +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 greetings; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests the Greetings service - * - * @version $Rev$ $Date$ - */ -public class GreetingsTestCase { - - private static Node node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("greetings/greetings.composite"); - node = NodeFactory.newInstance().createNode("greetings/greetings.composite", new Contribution("c1", location)); - node.start(); - } - - /** - * @throws java.lang.Exception - */ - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } - - @Test - public void testInvoke() { - GreetingsService greetingsService = node.getService(GreetingsService.class, "GreetingsServiceComponent"); - String response = greetingsService.getGreetings("Luciano"); - Assert.assertEquals("Hello Luciano", response); - } -} diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java b/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java deleted file mode 100644 index f46893481b..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,29 +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.oasisopen.sca.annotation.Remotable; - -/** - * The interface for the helloworld service - */ -@Remotable -public interface HelloWorldService { - public String hello(String name); -} diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index a687534bb2..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,47 +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 greetings.GreetingsService; - -import org.oasisopen.sca.annotation.Reference; - -/** - * The HelloWorld service implementation - */ -public class HelloWorldServiceImpl implements HelloWorldService { - - protected GreetingsService greetingsService; - - public GreetingsService getGreetingsService() { - System.out.println("Got Injected greetingsService"); - return greetingsService; - } - - @Reference - public void setGreetingsService(GreetingsService greetingsService) { - System.out.println("Injected greetingsService"); - this.greetingsService = greetingsService; - } - - public String hello(String name) { - System.out.println("Calling greeting services getGreetings"); - return greetingsService.getGreetings(name); - } -}
\ No newline at end of file diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java b/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java deleted file mode 100644 index a9268ac1b5..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java +++ /dev/null @@ -1,64 +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 junit.framework.Assert; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests the BPEL Helloworld Service - * - * @version $Rev$ $Date$ - */ -public class HelloWorldTestCase { - private static Node node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("helloworld/helloworld.composite"); - node = NodeFactory.newInstance().createNode("helloworld/helloworld.composite", new Contribution("c1", location)); - node.start(); - } - - /** - * @throws java.lang.Exception - */ - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } - - @Test - public void testServiceInvocation() { - HelloWorldService bpelService = node.getService(HelloWorldService.class, "HelloWorldService"); - String response = bpelService.hello("Luciano"); - Assert.assertEquals("Hello Luciano", response); - } -} diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite b/java/sca/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite deleted file mode 100644 index faa10b90ca..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://greetings" - xmlns:hw="http://greetings" - name="greetings"> - - <component name="GreetingsServiceComponent"> - <implementation.java class="greetings.GreetingsServiceImpl" /> - <service name="GreetingsService"> - <interface.wsdl interface="http://greetings#wsdl.interface(Greetings)" /> - </service> - </component> - -</composite> diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl b/java/sca/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl deleted file mode 100644 index b976a53970..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<wsdl:definitions name="greetings" - targetNamespace="http://greetings" - xmlns:tns="http://greetings" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - - <wsdl:types> - <schema elementFormDefault="qualified" targetNamespace="http://greetings" xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="greetings"> - <complexType> - <sequence> - <element name="greetings" type="xsd:string"/> - </sequence> - </complexType> - </element> - - <element name="greetingsResponse"> - <complexType> - <sequence> - <element name="greetingsResponse" type="xsd:string"/> - </sequence> - </complexType> - </element> - - </schema> - </wsdl:types> - - <wsdl:message name="GreetingsRequest"> - <wsdl:part element="tns:greetings" name="request"/> - </wsdl:message> - - <wsdl:message name="GreetingsResponse"> - <wsdl:part element="tns:greetingsResponse" name="response"/> - </wsdl:message> - - <wsdl:portType name="Greetings"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:GreetingsRequest" name="GreetingsRequest"/> - <wsdl:output message="tns:GreetingsResponse" name="GreetingsResponse"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="GreetingsSoapBinding" type="tns:Greetings"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="GreetingsRequest"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="GreetingsResponse"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="GreetingsService"> - <wsdl:port name="GreetingsSoapPort" binding="tns:GreetingsSoapBinding"> - <wsdlsoap:address location="http://localhost:8085/ode/processes/greetings"/> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="GreetingsPartnerLinkType"> - <plnk:role name="Provider" portType="tns:Greetings"/> - </plnk:partnerLinkType> -</wsdl:definitions> diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel b/java/sca/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel deleted file mode 100644 index c0317687df..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel +++ /dev/null @@ -1,84 +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. - --> -<process name="HelloWorld" - targetNamespace="http://helloworld" - xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:tns="http://helloworld" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:helloworld="http://helloworld"
- xmlns:greetings="http://greetings" - queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" - expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"> - - <import location="helloworld.wsdl" importType="http://schemas.xmlsoap.org/wsdl/" - namespace="http://helloworld"/> -
- <import location="../greetings/greetings.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"
- namespace="http://greetings"/>
- - <partnerLinks> - <partnerLink name="helloPartnerLink" partnerLinkType="helloworld:HelloPartnerLinkType" myRole="me" />
- <partnerLink name="greetingsPartnerLink" partnerLinkType="greetings:GreetingsPartnerLinkType" partnerRole="Provider" initializePartnerRole="yes" /> - </partnerLinks> - - <variables> - <variable name="helloMessage" messageType="helloworld:HelloMessage"/>
- <variable name="helloMessageResponse" messageType="helloworld:HelloMessageResponse"/>
- <variable name="greetingsRequest" messageType="greetings:GreetingsRequest"/>
- <variable name="greetingsResponse" messageType="greetings:GreetingsResponse"/>
- </variables> - - <sequence> - <receive - name="start"
- createInstance="yes" - operation="hello"
- variable="helloMessage"
- partnerLink="helloPartnerLink" - portType="helloworld:HelloWorld" /> -
- <assign name="assignToGreetingsRequest">
- <copy>
- <from>$helloMessage.TestPart</from>
- <to>$greetingsRequest.request</to>
- </copy>
- </assign>
- - <invoke name="invokeGreetings"
- operation="getGreetings"
- inputVariable="greetingsRequest"
- outputVariable="greetingsResponse"
- partnerLink="greetingsPartnerLink"
- portType="greetings:Greetings" />
-
- <assign name="assignToHelloResponse">
- <copy>
- <from>$greetingsResponse.parameters/greetings:GreetingsResponse</from>
- <to>$helloMessageResponse.TestPart</to>
- </copy>
- </assign>
-
- <reply name="end"
- operation="hello" - partnerLink="helloPartnerLink" - portType="helloworld:HelloWorld" - variable="helloMessageResponse"/> - </sequence> -</process> diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite b/java/sca/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite deleted file mode 100644 index 590f05ee84..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://bpel" - xmlns:hns="http://helloworld" - name="helloworld"> - - <component name="HelloWorldService"> - <implementation.bpel process="hns:HelloWorld"/> - <reference name="greetingsPartnerLink" target="GreetingsServiceComponent"/> - </component> - - <component name="GreetingsServiceComponent"> - <implementation.java class="greetings.GreetingsServiceImpl" /> - <service name="GreetingsService"> - <interface.wsdl interface="http://greetings#wsdl.interface(Greetings)" /> - </service> - </component> -</composite> diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl b/java/sca/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl deleted file mode 100644 index 541a713112..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl +++ /dev/null @@ -1,94 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- - ~ 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. - --> - -<wsdl:definitions name="helloworld" - targetNamespace="http://helloworld" - xmlns="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://helloworld" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - - <wsdl:types> - <schema elementFormDefault="qualified" - targetNamespace="http://helloworld" - xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="hello"> - <complexType> - <sequence> - <element name="message" type="xsd:string"/> - </sequence> - </complexType> - </element> - - <element name="helloResponse"> - <complexType> - <sequence> - <element name="messageResponse" type="xsd:string"/> - </sequence> - </complexType> - </element> - </schema> - </wsdl:types> - - <wsdl:message name="HelloMessage"> - <wsdl:part element="tns:hello" name="TestPart"/> - </wsdl:message> - - <wsdl:message name="HelloMessageResponse"> - <wsdl:part element="tns:helloResponse" name="TestResponse"/> - </wsdl:message> - - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="hello"> - <wsdl:input message="tns:HelloMessage" name="TestIn"/> - <wsdl:output message="tns:HelloMessageResponse" name="TestOut"/> - </wsdl:operation> - </wsdl:portType> - - - <wsdl:binding name="HelloSoapBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="hello"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="TestIn"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="TestOut"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="HelloWorldService"> - <wsdl:port name="HelloSoapPort" binding="tns:HelloSoapBinding"> - <soap:address location="http://localhost:8085/ode/processes/helloWorld"/> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="HelloPartnerLinkType"> - <plnk:role name="me" portType="tns:HelloWorld"/> - <plnk:role name="you" portType="tns:HelloWorld"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/resources/log4j.properties b/java/sca/itest/bpel/helloworld-reference/src/test/resources/log4j.properties deleted file mode 100644 index 4e13380e0b..0000000000 --- a/java/sca/itest/bpel/helloworld-reference/src/test/resources/log4j.properties +++ /dev/null @@ -1,36 +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. -# - -# Set root logger level to WARN and its only appender to CONSOLE -log4j.rootLogger=OFF, CONSOLE - -# log4j properties to work with commandline tools. -log4j.category.org.mortbay=OFF -log4j.category.org.hibernate.type=OFF -log4j.category.org.objectweb=OFF -log4j.category.org.apache.ode.axis2=OFF -log4j.category.org.apache.ode.bpel.engine=OFF -log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF -log4j.category.org.apache.ode.bpel.epr=OFF -log4j.category.org.apache.tuscany.sca.implementation.bpel=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.ode=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.provider=DEBUG - -# Console appender -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=[%p] - %C{1}.%M(%L) | %m%n diff --git a/java/sca/itest/bpel/helloworld-ws/pom.xml b/java/sca/itest/bpel/helloworld-ws/pom.xml deleted file mode 100644 index 4d2092e72f..0000000000 --- a/java/sca/itest/bpel/helloworld-ws/pom.xml +++ /dev/null @@ -1,178 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - <!-- - * 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. - --> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-bpel</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>itest-bpel-helloworld-ws - </artifactId> - <name>Apache Tuscany SCA iTest HelloWorld BPEL Over Web Services - </name> - - <repositories> - <repository> - <id>apache.incubator</id> - <url>http://people.apache.org/repo/m2-incubating-repository - </url> - </repository> - </repositories> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-bpel-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - <version>2.8.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <!-- http://jira.codehaus.org/browse/SUREFIRE-322 --> - <version>2.3.1</version> - <configuration> - <useFile>false</useFile> - <trimStackTrace>false</trimStackTrace> - <useSystemClassLoader>true</useSystemClassLoader> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin - </artifactId> - <executions> - <execution> - <id>unpack</id> - <phase>test-compile</phase> - <goals> - <goal>unpack</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.apache.ode</groupId> - <artifactId>ode-dao-jpa-ojpa-derby - </artifactId> - <version>1.1</version> - <type>zip</type> - <overWrite>true</overWrite> - <outputDirectory>${project.build.directory}/test-classes/ - </outputDirectory> - </artifactItem> - </artifactItems> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.tuscany.sdo</groupId> - <artifactId>tuscany-sdo-plugin</artifactId> - <version>1.1.1</version> - <executions> - <execution> - <id>generate-bpel-helloworld</id> - <phase>generate-sources</phase> - <configuration> - <schemaFile> - ${basedir}/src/test/resources/helloworld/helloworld.wsdl - </schemaFile> - <targetDirectory>${basedir}/target/wsdl2java-source - </targetDirectory> - <prefix>HelloWorld</prefix> - <noNotification>true</noNotification> - <noContainer>true</noContainer> - <noUnsettable>true</noUnsettable> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-maven-wsdl2java - </artifactId> - <version>1.6-SNAPSHOT</version> - <executions> - <execution> - <configuration> - <wsdlFiles> - <wsdlFile> - <fileName> - ${basedir}/src/test/resources/helloworld/helloworld.wsdl - </fileName> - </wsdlFile> - </wsdlFiles> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - -</project> diff --git a/java/sca/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorld.java b/java/sca/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorld.java deleted file mode 100644 index 0999e97065..0000000000 --- a/java/sca/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorld.java +++ /dev/null @@ -1,45 +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.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.oasisopen.sca.annotation.Reference; - -/** - * @version $Rev$ $Date$ - */ -public class HelloWorld { - private HelloPortType helloService; - - public HelloWorld() { - super(); - } - - @Reference - public void setHelloService(HelloPortType helloService){ - this.helloService = helloService; - } - - public String hello(String hello) throws java.rmi.RemoteException { - System.out.println(">>> Invoking helloService.hello with : " + hello); - return this.helloService.hello(hello); - } - -} diff --git a/java/sca/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorldTestCase.java b/java/sca/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorldTestCase.java deleted file mode 100644 index 315591fb98..0000000000 --- a/java/sca/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorldTestCase.java +++ /dev/null @@ -1,71 +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 java.net.Socket; - -import junit.framework.Assert; - -import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; - -/** - * Tests the BPEL Helloworld Service - * - * @version $Rev$ $Date$ - */ -public class HelloWorldTestCase { - - private Node node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - protected void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("helloworld/helloworld.composite"); - node = NodeFactory.newInstance().createNode("CallBackApiTest.composite", new Contribution("c1", location)); - node.start(); - } - - /** - * @throws java.lang.Exception - */ - @AfterClass - protected void tearDown() throws Exception { - node.stop(); - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - public void testServiceInvocation() throws Exception { - HelloPortType bpelService = node.getService(HelloPortType.class, "BPELHelloWorldServiceComponent"); - String response = bpelService.hello("Hello"); - Assert.assertEquals("Hello World", response); - } -} diff --git a/java/sca/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.bpel b/java/sca/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.bpel deleted file mode 100644 index 8cf91adc2c..0000000000 --- a/java/sca/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.bpel +++ /dev/null @@ -1,66 +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. - --> -<process name="HelloWorld" - targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld" - xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:test="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl" - queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" - expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"> - - <import location="helloworld.wsdl" importType="http://schemas.xmlsoap.org/wsdl/" - namespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"/> - - <partnerLinks> - <partnerLink name="helloPartnerLink" partnerLinkType="test:HelloPartnerLinkType" myRole="me" /> - </partnerLinks> - - <variables> - <variable name="helloMessage" messageType="test:HelloMessage"/> - <variable name="tmpVar" type="xsd:string"/> - </variables> - - <sequence> - <receive - name="start" - partnerLink="helloPartnerLink" - portType="test:HelloPortType" - operation="hello" - variable="helloMessage" - createInstance="yes"/> - - <assign name="assign1"> - <copy> - <from variable="helloMessage" part="TestPart"/> - <to variable="tmpVar"/> - </copy> - <copy> - <from>concat($tmpVar,' World')</from> - <to variable="helloMessage" part="TestPart"/> - </copy> - </assign> - <reply name="end" - partnerLink="helloPartnerLink" - portType="test:HelloPortType" - operation="hello" - variable="helloMessage"/> - </sequence> -</process> diff --git a/java/sca/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.composite b/java/sca/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.composite deleted file mode 100644 index f42325910d..0000000000 --- a/java/sca/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.composite +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://bpel" - xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld" - name="helloworld"> - - <component name="BPELHelloWorldServiceComponent"> - <implementation.bpel process="hns:HelloWorld"/> - <service name="helloPartnerLink"> - <interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl#wsdl.interface(HelloPortType)" /> - <binding.ws uri="http://localhost:8085/HelloPartnerLink" wsdlElement="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl#wsdl.service(HelloService)"/> - </service> - </component> -</composite> diff --git a/java/sca/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.wsdl b/java/sca/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.wsdl deleted file mode 100644 index 610bda3cc4..0000000000 --- a/java/sca/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.wsdl +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- - ~ 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. - --> - -<wsdl:definitions name="helloworld" - targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl" - xmlns="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - - <wsdl:types> - <schema elementFormDefault="qualified" - targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl" - xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="hello"> - <complexType> - <sequence> - <element name="message" type="xsd:string"/> - </sequence> - </complexType> - </element> - </schema> - </wsdl:types> - - <wsdl:message name="HelloMessage"> - <wsdl:part element="tns:hello" name="TestPart"/> - </wsdl:message> - - <wsdl:portType name="HelloPortType"> - <wsdl:operation name="hello"> - <wsdl:input message="tns:HelloMessage" name="TestIn"/> - <wsdl:output message="tns:HelloMessage" name="TestOut"/> - </wsdl:operation> - </wsdl:portType> - - - <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="hello"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="TestIn"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="TestOut"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="HelloService"> - <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding"> - <soap:address location="http://localhost:8085/ode/processes/helloWorld"/> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="HelloPartnerLinkType"> - <plnk:role name="me" portType="tns:HelloPortType"/> - <plnk:role name="you" portType="tns:HelloPortType"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/java/sca/itest/bpel/helloworld-ws/src/test/resources/log4j.properties b/java/sca/itest/bpel/helloworld-ws/src/test/resources/log4j.properties deleted file mode 100644 index 37f66e4189..0000000000 --- a/java/sca/itest/bpel/helloworld-ws/src/test/resources/log4j.properties +++ /dev/null @@ -1,36 +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. -# - -# Set root logger level to WARN and its only appender to CONSOLE
-log4j.rootLogger=OFF, CONSOLE
-
-# log4j properties to work with commandline tools.
-log4j.category.org.mortbay=OFF
-log4j.category.org.hibernate.type=OFF
-log4j.category.org.objectweb=OFF
-log4j.category.org.apache.ode.axis2=OFF
-log4j.category.org.apache.ode.bpel.engine=OFF
-log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF
-log4j.category.org.apache.ode.bpel.epr=OFF -log4j.category.org.apache.tuscany.sca.implementation.bpel=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.ode=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.provider=DEBUG
-
-# Console appender
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=[%p] - %C{1}.%M(%L) | %m%n
diff --git a/java/sca/itest/bpel/helloworld/pom.xml b/java/sca/itest/bpel/helloworld/pom.xml deleted file mode 100644 index 8cc4639bfb..0000000000 --- a/java/sca/itest/bpel/helloworld/pom.xml +++ /dev/null @@ -1,270 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-bpel</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>itest-bpel-helloworld</artifactId> - <name>Apache Tuscany SCA iTest HelloWorld BPEL</name> - - <repositories> - <repository> - <id>apache.incubator</id> - <url>http://people.apache.org/repo/m2-incubating-repository - </url> - </repository> - </repositories> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-bpel-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - <version>2.8.1</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <!-- http://jira.codehaus.org/browse/SUREFIRE-322 --> - <version>2.3.1</version> - <configuration> - <useFile>false</useFile> - <trimStackTrace>false</trimStackTrace> - <useSystemClassLoader>true</useSystemClassLoader> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>unpack</id> - <phase>test-compile</phase> - <goals> - <goal>unpack</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.apache.ode</groupId> - <artifactId>ode-dao-jpa-ojpa-derby</artifactId> - <version>1.1</version> - <type>zip</type> - <overWrite>true</overWrite> - <outputDirectory>${project.build.directory}/test-classes/</outputDirectory> - </artifactItem> - </artifactItems> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <argLine>-Djava.endorsed.dirs=target/endorsed</argLine> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy</id> - <phase>generate-sources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>javax.xml.ws</groupId> - <artifactId>jaxws-api</artifactId> - <version>2.1</version> - <type>jar</type> - </artifactItem> - <artifactItem> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - <version>2.1</version> - <type>jar</type> - </artifactItem> - </artifactItems> - <outputDirectory>${project.build.directory}/endorsed</outputDirectory> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-test-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-test-source</goal> - </goals> - <configuration> - <sources> - <source>target/jaxws-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> - <version>1.12</version> - <!-- - Explicitly add the transitive dependencies for jaxws-api - http://jira.codehaus.org/browse/MEV-498 - --> - <dependencies> - <dependency> - <groupId>javax.jws</groupId> - <artifactId>jsr181-api</artifactId> - <version>1.0-MR1</version> - </dependency> - <dependency> - <groupId>javax.annotation</groupId> - <artifactId>jsr250-api</artifactId> - <version>1.0</version> - </dependency> - </dependencies> - <executions> - <execution> - <id>wsimport</id> - <phase>generate-test-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>org.apache.tuscany.implementation.bpel.example.helloworld</packageName> - <wsdlDirectory>${basedir}/src/test/resources/helloworld/</wsdlDirectory> - <wsdlFiles> - <wsdlFile>helloworld.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - - <!-- - <execution> - <id>wsgen</id> - <phase>process-test-classes</phase> - <goals> - <goal>wsgen-test</goal> - </goals> - <configuration> - <sei>org.apache.tuscany.sca.interfacedef.java.jaxws.MyServiceImpl</sei> - <genWsdl>true</genWsdl> - <keep>true</keep> - <resourceDestDir>${project.build.directory}/jaxws-source</resourceDestDir> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - </configuration> - </execution> - --> - </executions> - - </plugin> - - <!-- - wsimport cannot handle WSDL files without a service/binding element. - CXF wsdl2java plugin does support that. I had to override the default - value of wsdlRoot/testWsdlRoot to a non-existent file to avoid NPE --> - <!-- - <plugin> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-codegen-plugin</artifactId> - <version>2.1</version> - <executions> - <execution> - <id>generate-sources</id> - <phase>generate-sources</phase> - - <configuration> - <sourceRoot>${basedir}/target/jaxws-source</sourceRoot> - <wsdlRoot>NONE</wsdlRoot> - <testWsdlRoot>NONE</testWsdlRoot> - <wsdlOptions> - <wsdlOption> - <wsdl>${basedir}/src/test/resources/wsdl/Stock.wsdl</wsdl> - <outputDir>${basedir}/target/jaxws-source</outputDir> - <packagenames> - <packagename>com.example.stock.cxf</packagename> - </packagenames> - </wsdlOption> - </wsdlOptions> - </configuration> - <goals> - <goal>wsdl2java</goal> - </goals> - </execution> - </executions> - </plugin> - --> - - </plugins> - </build> - -</project> diff --git a/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java b/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java deleted file mode 100644 index 0999e97065..0000000000 --- a/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java +++ /dev/null @@ -1,45 +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.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.oasisopen.sca.annotation.Reference; - -/** - * @version $Rev$ $Date$ - */ -public class HelloWorld { - private HelloPortType helloService; - - public HelloWorld() { - super(); - } - - @Reference - public void setHelloService(HelloPortType helloService){ - this.helloService = helloService; - } - - public String hello(String hello) throws java.rmi.RemoteException { - System.out.println(">>> Invoking helloService.hello with : " + hello); - return this.helloService.hello(hello); - } - -} diff --git a/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java b/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java deleted file mode 100644 index 86e6e4e9c5..0000000000 --- a/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java +++ /dev/null @@ -1,73 +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 junit.framework.Assert; - -import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests the BPEL Helloworld Service - * - * @version $Rev$ $Date$ - */ -public class HelloWorldTestCase { - - private static Node node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("helloworld/helloworld.composite"); - node = NodeFactory.newInstance().createNode("helloworld/helloworld.composite", new Contribution("c1", location)); - node.start(); - } - - /** - * @throws java.lang.Exception - */ - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } - - @Test - public void testServiceInvocation() throws Exception { - HelloPortType bpelService = node.getService(HelloPortType.class, "BPELHelloWorldService"); - String response = bpelService.hello("Hello"); - Assert.assertEquals("Hello World", response); - } - - @Test - public void testReferenceInvocation() throws Exception { - HelloWorld bpelService = node.getService(HelloWorld.class, "BPELHelloWorld"); - String response = bpelService.hello("Hello"); - Assert.assertEquals("Hello World", response); - } -} diff --git a/java/sca/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.bpel b/java/sca/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.bpel deleted file mode 100644 index 156e32e9ee..0000000000 --- a/java/sca/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.bpel +++ /dev/null @@ -1,78 +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. - --> -<process name="HelloWorld" - targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld" - xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:test="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl" - queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" - expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"> - - <import location="helloworld.wsdl" importType="http://schemas.xmlsoap.org/wsdl/" - namespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"/> - - <partnerLinks> - <partnerLink name="helloPartnerLink" partnerLinkType="test:HelloPartnerLinkType" myRole="me" /> - </partnerLinks> - - <variables> - <variable name="helloMessage" messageType="test:HelloMessage"/> - <variable name="helloMessageResponse" messageType="test:HelloMessageResponse"/> - <variable name="tmpVar" type="xsd:string"/> - </variables> - - <sequence> - <receive - name="start" - partnerLink="helloPartnerLink" - portType="test:HelloPortType" - operation="hello" - variable="helloMessage" - createInstance="yes"/> - - <assign name="assign1"> - <copy> - <from>concat($helloMessage.TestPart/test:message/text(), ' World')</from> - <to variable="tmpVar"/> - </copy> - <!-- Initialize the response --> - <copy> - <from> - <literal> - <test:helloResponse> - <test:messageResponse>Dummy</test:messageResponse> - </test:helloResponse> - </literal> - </from> - <to variable="helloMessageResponse" part="TestResponse"/> - </copy> - <copy> - <from variable="tmpVar"/> - <to>$helloMessageResponse.TestResponse/test:messageResponse</to> - </copy> - </assign> - <reply name="end" - partnerLink="helloPartnerLink" - portType="test:HelloPortType" - operation="hello" - variable="helloMessageResponse"/> - </sequence> -</process> diff --git a/java/sca/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.composite b/java/sca/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.composite deleted file mode 100644 index 832c8f3702..0000000000 --- a/java/sca/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.composite +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://bpel" - xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld" - name="helloworld"> - - <component name="BPELHelloWorld"> - <implementation.java class="helloworld.HelloWorld"/> - <reference name="helloService" target="BPELHelloWorldService"> - <!-- Workaround for databinding issue --> - <!-- interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl#wsdl.interface(HelloPortType)" / --> - </reference> - </component> - - <component name="BPELHelloWorldService"> - <implementation.bpel process="hns:HelloWorld"/> - </component> -</composite> diff --git a/java/sca/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.wsdl b/java/sca/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.wsdl deleted file mode 100644 index c77318e8fd..0000000000 --- a/java/sca/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.wsdl +++ /dev/null @@ -1,94 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- - ~ 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. - --> - -<wsdl:definitions name="helloworld" - targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl" - xmlns="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - - <wsdl:types> - <schema elementFormDefault="qualified" - targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl" - xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="hello"> - <complexType> - <sequence> - <element name="message" type="xsd:string"/> - </sequence> - </complexType> - </element> - - <element name="helloResponse"> - <complexType> - <sequence> - <element name="messageResponse" type="xsd:string"/> - </sequence> - </complexType> - </element> - </schema> - </wsdl:types> - - <wsdl:message name="HelloMessage"> - <wsdl:part element="tns:hello" name="TestPart"/> - </wsdl:message> - - <wsdl:message name="HelloMessageResponse"> - <wsdl:part element="tns:helloResponse" name="TestResponse"/> - </wsdl:message> - - <wsdl:portType name="HelloPortType"> - <wsdl:operation name="hello"> - <wsdl:input message="tns:HelloMessage" name="TestIn"/> - <wsdl:output message="tns:HelloMessageResponse" name="TestOut"/> - </wsdl:operation> - </wsdl:portType> - - - <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="hello"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="TestIn"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="TestOut"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="HelloService"> - <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding"> - <soap:address location="http://localhost:8085/ode/processes/helloWorld"/> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="HelloPartnerLinkType"> - <plnk:role name="me" portType="tns:HelloPortType"/> - <plnk:role name="you" portType="tns:HelloPortType"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/java/sca/itest/bpel/helloworld/src/test/resources/log4j.properties b/java/sca/itest/bpel/helloworld/src/test/resources/log4j.properties deleted file mode 100644 index 37f66e4189..0000000000 --- a/java/sca/itest/bpel/helloworld/src/test/resources/log4j.properties +++ /dev/null @@ -1,36 +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. -# - -# Set root logger level to WARN and its only appender to CONSOLE
-log4j.rootLogger=OFF, CONSOLE
-
-# log4j properties to work with commandline tools.
-log4j.category.org.mortbay=OFF
-log4j.category.org.hibernate.type=OFF
-log4j.category.org.objectweb=OFF
-log4j.category.org.apache.ode.axis2=OFF
-log4j.category.org.apache.ode.bpel.engine=OFF
-log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF
-log4j.category.org.apache.ode.bpel.epr=OFF -log4j.category.org.apache.tuscany.sca.implementation.bpel=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.ode=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.provider=DEBUG
-
-# Console appender
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=[%p] - %C{1}.%M(%L) | %m%n
diff --git a/java/sca/itest/bpel/pom.xml b/java/sca/itest/bpel/pom.xml deleted file mode 100644 index 35bcc66f90..0000000000 --- a/java/sca/itest/bpel/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-bpel</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA BPEL Integration Tests</name> - - <modules> - <module>helloworld</module> - <!-- - <module>helloworld-reference</module> - <module>helloworld-ws</module> - --> - </modules> -</project> diff --git a/java/sca/itest/builder/pom.xml b/java/sca/itest/builder/pom.xml deleted file mode 100644 index 0caed4e534..0000000000 --- a/java/sca/itest/builder/pom.xml +++ /dev/null @@ -1,119 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-builder</artifactId> - <name>Apache Tuscany SCA iTest Builder</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-monitor</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-sca-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-assembly</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-core-databinding</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - <version>2.8.1</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java b/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java deleted file mode 100644 index b0dc7a6389..0000000000 --- a/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java +++ /dev/null @@ -1,43 +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 org.apache.tuscany.sca.itest.builder; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * Implementation class for ComponentD. - * - * @version $Rev$ $Date$ - */ -@Service({Service3.class, Service3a.class}) -public class ComponentDImpl implements Service3, Service3a { - - @Reference - protected Service3a reference3; - - public String getGreetings(String name) { - return "Hello, " + name + "!"; - } - - public String getGreetings2(String name) { - return "Goodbye, " + name + "!"; - } - -} diff --git a/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java b/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java deleted file mode 100644 index bf73a64027..0000000000 --- a/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java +++ /dev/null @@ -1,48 +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 org.apache.tuscany.sca.itest.builder; - -import java.util.List; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * Implementation class for ComponentD. - * - * @version $Rev$ $Date$ - */ -@Service({Service3.class, Service3a.class}) -public class ComponentDReferenceMultiplicityImpl implements Service3, Service3a { - - @Reference - protected Service3a reference3; - - @Reference - protected List<Service3> reference3a; - - public String getGreetings(String name) { - return "Hello, " + name + "!"; - } - - public String getGreetings2(String name) { - return "Goodbye, " + name + "!"; - } - -} diff --git a/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java b/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java deleted file mode 100644 index 6f36b1c55a..0000000000 --- a/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java +++ /dev/null @@ -1,36 +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 org.apache.tuscany.sca.itest.builder; - -import org.oasisopen.sca.annotation.Service; - - -/** - * Implementation class for ComponentD. - * - * @version $Rev$ $Date$ - */ -@Service({Service3.class}) -public class ComponentEImpl implements Service3 { - - - public String getGreetings(String name) { - return "Hello, " + name + " from ComponentE"; - } -} diff --git a/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java b/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java deleted file mode 100644 index 8c5c5de208..0000000000 --- a/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java +++ /dev/null @@ -1,36 +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 org.apache.tuscany.sca.itest.builder; - -import org.oasisopen.sca.annotation.Service; - - -/** - * Implementation class for ComponentD. - * - * @version $Rev$ $Date$ - */ -@Service({Service3.class}) -public class ComponentFImpl implements Service3 { - - - public String getGreetings(String name) { - return "Hello, " + name + " from ComponentF"; - } -} diff --git a/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java b/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java deleted file mode 100644 index f4b8d2cf39..0000000000 --- a/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.itest.builder; - -import org.oasisopen.sca.annotation.Remotable; - - -/** - * Interface for Service3 in ComponentD. - * - * @version $Rev$ $Date$ - */ -@Remotable -public interface Service3 { - - String getGreetings(String name); - -} diff --git a/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java b/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java deleted file mode 100644 index 299f7606e3..0000000000 --- a/java/sca/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.itest.builder; - -import org.oasisopen.sca.annotation.Remotable; - - -/** - * Interface for Service3a in ComponentD. - * - * @version $Rev$ $Date$ - */ -@Remotable -public interface Service3a { - - String getGreetings2(String name); - -} diff --git a/java/sca/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml deleted file mode 100644 index d8cb23bbd3..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:ns1="http://scenario1"> - <deployable composite="ns1:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario1/scenario1.composite b/java/sca/itest/builder/src/main/resources/scenario1/scenario1.composite deleted file mode 100644 index 4e58cdfa16..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario1/scenario1.composite +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://scenario1" - xmlns:tns="http://scenario1" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws /> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario1/scenario1a.composite b/java/sca/itest/builder/src/main/resources/scenario1/scenario1a.composite deleted file mode 100644 index 06b273c7a7..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario1/scenario1a.composite +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://scenario1" - xmlns:tns="http://scenario1" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml deleted file mode 100644 index ac01b3c687..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario10" - xmlns:ns10="http://scenario10"> - <deployable composite="ns10:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario10/scenario10.composite b/java/sca/itest/builder/src/main/resources/scenario10/scenario10.composite deleted file mode 100644 index 2d127a7bec..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario10/scenario10.composite +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario10" - xmlns:tns="http://scenario10" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference1a" promote="ComponentB/reference2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws uri="http://foo.com/bar" /> - </service> - <reference name="reference2" target="ComponentB/Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws /> - </reference> - <reference name="reference2a" target="ComponentF"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <interface.wsdl interface="http://scenarios#wsdl.interface(Service3)" /> - <binding.ws /> - </reference> - </component> - - <component name="ComponentF"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/> - <service name="Service3"> - <binding.sca /> - <binding.ws /> - </service> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario10/scenario10a.composite b/java/sca/itest/builder/src/main/resources/scenario10/scenario10a.composite deleted file mode 100644 index 98103e360e..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario10/scenario10a.composite +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario10" - xmlns:tns="http://scenario10" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference2a" promote="ComponentD/reference3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference3" target="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference3a" target="ComponentE"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> - - <component name="ComponentE"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/> - <service name="Service3"> - <binding.sca /> - <binding.ws /> - </service> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario10/service3.wsdl b/java/sca/itest/builder/src/main/resources/scenario10/service3.wsdl deleted file mode 100644 index 2477e23dc6..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario10/service3.wsdl +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<wsdl:definitions name="Service3Service" - targetNamespace="http://scenarios" - xmlns:tns="http://scenarios" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - - <wsdl:types> - <xs:schema attributeFormDefault="qualified" - elementFormDefault="unqualified" - targetNamespace="http://scenarios" - xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:element name="getGreetings"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="getGreetingsResponse"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:schema> - </wsdl:types> - - <wsdl:message name="getGreetings"> - <wsdl:part name="getGreetings" element="tns:getGreetings" /> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part name="getGreetingsResponse" element="tns:getGreetingsResponse" /> - </wsdl:message> - - <wsdl:portType name="Service3"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetings" /> - <wsdl:output message="tns:getGreetingsResponse" /> - </wsdl:operation> - </wsdl:portType> - -</wsdl:definitions> diff --git a/java/sca/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml deleted file mode 100644 index 8b82b43c68..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario11" - xmlns:ns11="http://scenario11"> - <deployable composite="ns11:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario11/scenario11.composite b/java/sca/itest/builder/src/main/resources/scenario11/scenario11.composite deleted file mode 100644 index 2f5ca96d07..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario11/scenario11.composite +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario11" - xmlns:tns="http://scenario11" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference1a" promote="ComponentB/reference2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws uri="http://foo.com/bar" /> - </service> - <reference name="reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference2a" target="ComponentF"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> - - <component name="ComponentF"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/> - <service name="Service3"> - <binding.sca /> - <binding.ws /> - </service> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario11/scenario11a.composite b/java/sca/itest/builder/src/main/resources/scenario11/scenario11a.composite deleted file mode 100644 index 381ccddcc3..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario11/scenario11a.composite +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario11" - xmlns:tns="http://scenario11" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3" target="ComponentB/Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws /> - </reference> - <reference name="reference2a" promote="ComponentD/reference3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <interface.wsdl interface="http://scenarios#wsdl.interface(Service3)" /> - <binding.ws /> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference3" target="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference3a" target="ComponentE"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> - - <component name="ComponentE"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/> - <service name="Service3"> - <binding.sca /> - <binding.ws /> - </service> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario11/service3.wsdl b/java/sca/itest/builder/src/main/resources/scenario11/service3.wsdl deleted file mode 100644 index 2477e23dc6..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario11/service3.wsdl +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<wsdl:definitions name="Service3Service" - targetNamespace="http://scenarios" - xmlns:tns="http://scenarios" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - - <wsdl:types> - <xs:schema attributeFormDefault="qualified" - elementFormDefault="unqualified" - targetNamespace="http://scenarios" - xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:element name="getGreetings"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="getGreetingsResponse"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:schema> - </wsdl:types> - - <wsdl:message name="getGreetings"> - <wsdl:part name="getGreetings" element="tns:getGreetings" /> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part name="getGreetingsResponse" element="tns:getGreetingsResponse" /> - </wsdl:message> - - <wsdl:portType name="Service3"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetings" /> - <wsdl:output message="tns:getGreetingsResponse" /> - </wsdl:operation> - </wsdl:portType> - -</wsdl:definitions> diff --git a/java/sca/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml deleted file mode 100644 index 4028098023..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario12" - xmlns:ns12="http://scenario12"> - <deployable composite="ns12:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario12/scenario12.composite b/java/sca/itest/builder/src/main/resources/scenario12/scenario12.composite deleted file mode 100644 index 23799f8487..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario12/scenario12.composite +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario12" - xmlns:tns="http://scenario12" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference1a" promote="ComponentB/reference2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference2a" target="ComponentF"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> - - <component name="ComponentF"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/> - <service name="Service3"> - <binding.sca /> - <binding.ws /> - </service> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario12/scenario12a.composite b/java/sca/itest/builder/src/main/resources/scenario12/scenario12a.composite deleted file mode 100644 index a2b4f88dc3..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario12/scenario12a.composite +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario12" - xmlns:tns="http://scenario12" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference2a" promote="ComponentD/reference3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws uri="http://foo.com/bar" /> - </service> - <reference name="reference3" target="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws/> - </reference> - <reference name="reference3a" target="ComponentE"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws /> - </reference> - </component> - - <component name="ComponentE"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/> - <service name="Service3"> - <binding.sca /> - <binding.ws /> - </service> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml deleted file mode 100644 index 1da59d5f04..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario13" - xmlns:ns13="http://scenario13"> - <deployable composite="ns13:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario13/scenario13.composite b/java/sca/itest/builder/src/main/resources/scenario13/scenario13.composite deleted file mode 100644 index 631e38855f..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario13/scenario13.composite +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario13" - xmlns:tns="http://scenario13" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference1a" promote="ComponentB/reference2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> - - <component name="ComponentF"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/> - <service name="Service3"> - <binding.sca /> - <binding.ws /> - </service> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario13/scenario13a.composite b/java/sca/itest/builder/src/main/resources/scenario13/scenario13a.composite deleted file mode 100644 index 98976dc4e8..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario13/scenario13a.composite +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario13" - xmlns:tns="http://scenario13" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference2a" promote="ComponentD/reference3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws uri="http://foo.com/bar" /> - </service> - <reference name="reference3" target="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws/> - </reference> - <reference name="reference3a" target="ComponentE"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws /> - </reference> - </component> - - <component name="ComponentE"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/> - <service name="Service3"> - <binding.sca /> - <binding.ws /> - </service> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml deleted file mode 100644 index b1d01afafb..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:ns2="http://scenario2"> - <deployable composite="ns2:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario2/scenario2.composite b/java/sca/itest/builder/src/main/resources/scenario2/scenario2.composite deleted file mode 100644 index 7672595959..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario2/scenario2.composite +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://scenario2" - xmlns:tns="http://scenario2" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws /> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario2/scenario2a.composite b/java/sca/itest/builder/src/main/resources/scenario2/scenario2a.composite deleted file mode 100644 index 2fe3592d12..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario2/scenario2a.composite +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://scenario2" - xmlns:tns="http://scenario2" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml deleted file mode 100644 index 22950dfe03..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario3" - xmlns:ns3="http://scenario3"> - <deployable composite="ns3:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario3/scenario3.composite b/java/sca/itest/builder/src/main/resources/scenario3/scenario3.composite deleted file mode 100644 index 84f42c60fc..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario3/scenario3.composite +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario3" - xmlns:tns="http://scenario3" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario3/scenario3a.composite b/java/sca/itest/builder/src/main/resources/scenario3/scenario3a.composite deleted file mode 100644 index 18ed91142c..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario3/scenario3a.composite +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario3" - xmlns:tns="http://scenario3" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws /> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml deleted file mode 100644 index a17e27c9d8..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario4" - xmlns:ns4="http://scenario4"> - <deployable composite="ns4:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario4/scenario4.composite b/java/sca/itest/builder/src/main/resources/scenario4/scenario4.composite deleted file mode 100644 index a0bdb0197d..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario4/scenario4.composite +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario4" - xmlns:tns="http://scenario4" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario4/scenario4a.composite b/java/sca/itest/builder/src/main/resources/scenario4/scenario4a.composite deleted file mode 100644 index 1b4cf27c76..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario4/scenario4a.composite +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario4" - xmlns:tns="http://scenario4" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws /> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml deleted file mode 100644 index 83a232db6e..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario5" - xmlns:ns5="http://scenario5"> - <deployable composite="ns5:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario5/scenario5.composite b/java/sca/itest/builder/src/main/resources/scenario5/scenario5.composite deleted file mode 100644 index 2326afd2f2..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario5/scenario5.composite +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario5" - xmlns:tns="http://scenario5" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <interface.wsdl interface="http://scenarios#wsdl.interface(Service3a)" /> - <binding.ws uri="http://foo.com/bar" /> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario5/scenario5a.composite b/java/sca/itest/builder/src/main/resources/scenario5/scenario5a.composite deleted file mode 100644 index fdf1423b66..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario5/scenario5a.composite +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario5" - xmlns:tns="http://scenario5" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario5/scenarios.wsdl b/java/sca/itest/builder/src/main/resources/scenario5/scenarios.wsdl deleted file mode 100644 index 5cda7327dd..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario5/scenarios.wsdl +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<wsdl:definitions name="Service3Service" - targetNamespace="http://scenarios" - xmlns:tns="http://scenarios" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - - <wsdl:types> - <xs:schema attributeFormDefault="qualified" - elementFormDefault="unqualified" - targetNamespace="http://scenarios" - xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:element name="getGreetings2"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="getGreetings2Response"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:schema> - </wsdl:types> - - <wsdl:message name="getGreetings2"> - <wsdl:part name="getGreetings2" element="tns:getGreetings2" /> - </wsdl:message> - - <wsdl:message name="getGreetings2Response"> - <wsdl:part name="getGreetings2Response" element="tns:getGreetings2Response" /> - </wsdl:message> - - <wsdl:portType name="Service3a"> - <wsdl:operation name="getGreetings2"> - <wsdl:input message="tns:getGreetings2" /> - <wsdl:output message="tns:getGreetings2Response" /> - </wsdl:operation> - </wsdl:portType> - -</wsdl:definitions> diff --git a/java/sca/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml deleted file mode 100644 index 776dfe4d97..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://scenario6" - xmlns:ns6="http://scenario6"> - <deployable composite="ns6:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario6/scenario6.composite b/java/sca/itest/builder/src/main/resources/scenario6/scenario6.composite deleted file mode 100644 index 9575612d51..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario6/scenario6.composite +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://scenario6" - xmlns:tns="http://scenario6" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws uri="http://foo.com/bar" /> - </service> - <reference name="reference2" target="ComponentB/Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <interface.wsdl interface="http://scenarios#wsdl.interface(Service3a)" /> - <binding.ws /> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario6/scenario6a.composite b/java/sca/itest/builder/src/main/resources/scenario6/scenario6a.composite deleted file mode 100644 index 9c7b58e2cb..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario6/scenario6a.composite +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://scenario6" - xmlns:tns="http://scenario6" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario6/scenarios.wsdl b/java/sca/itest/builder/src/main/resources/scenario6/scenarios.wsdl deleted file mode 100644 index 5cda7327dd..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario6/scenarios.wsdl +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<wsdl:definitions name="Service3Service" - targetNamespace="http://scenarios" - xmlns:tns="http://scenarios" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - - <wsdl:types> - <xs:schema attributeFormDefault="qualified" - elementFormDefault="unqualified" - targetNamespace="http://scenarios" - xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:element name="getGreetings2"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="getGreetings2Response"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:schema> - </wsdl:types> - - <wsdl:message name="getGreetings2"> - <wsdl:part name="getGreetings2" element="tns:getGreetings2" /> - </wsdl:message> - - <wsdl:message name="getGreetings2Response"> - <wsdl:part name="getGreetings2Response" element="tns:getGreetings2Response" /> - </wsdl:message> - - <wsdl:portType name="Service3a"> - <wsdl:operation name="getGreetings2"> - <wsdl:input message="tns:getGreetings2" /> - <wsdl:output message="tns:getGreetings2Response" /> - </wsdl:operation> - </wsdl:portType> - -</wsdl:definitions> diff --git a/java/sca/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml deleted file mode 100644 index ede31d6bee..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario7" - xmlns:ns7="http://scenario7"> - <deployable composite="ns7:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario7/scenario7.composite b/java/sca/itest/builder/src/main/resources/scenario7/scenario7.composite deleted file mode 100644 index e1d2e0cefe..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario7/scenario7.composite +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario7" - xmlns:tns="http://scenario7" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws uri="http://foo.com/bar" /> - </service> - <reference name="reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario7/scenario7a.composite b/java/sca/itest/builder/src/main/resources/scenario7/scenario7a.composite deleted file mode 100644 index ef16dc0785..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario7/scenario7a.composite +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario7" - xmlns:tns="http://scenario7" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3" target="ComponentB/Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <interface.wsdl interface="http://scenarios#wsdl.interface(Service3a)" /> - <binding.ws /> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario7/scenarios.wsdl b/java/sca/itest/builder/src/main/resources/scenario7/scenarios.wsdl deleted file mode 100644 index 5cda7327dd..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario7/scenarios.wsdl +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<wsdl:definitions name="Service3Service" - targetNamespace="http://scenarios" - xmlns:tns="http://scenarios" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - - <wsdl:types> - <xs:schema attributeFormDefault="qualified" - elementFormDefault="unqualified" - targetNamespace="http://scenarios" - xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:element name="getGreetings2"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="getGreetings2Response"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:schema> - </wsdl:types> - - <wsdl:message name="getGreetings2"> - <wsdl:part name="getGreetings2" element="tns:getGreetings2" /> - </wsdl:message> - - <wsdl:message name="getGreetings2Response"> - <wsdl:part name="getGreetings2Response" element="tns:getGreetings2Response" /> - </wsdl:message> - - <wsdl:portType name="Service3a"> - <wsdl:operation name="getGreetings2"> - <wsdl:input message="tns:getGreetings2" /> - <wsdl:output message="tns:getGreetings2Response" /> - </wsdl:operation> - </wsdl:portType> - -</wsdl:definitions> diff --git a/java/sca/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml deleted file mode 100644 index 7bb9e694a3..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario8" - xmlns:ns8="http://scenario8"> - <deployable composite="ns8:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario8/scenario8.composite b/java/sca/itest/builder/src/main/resources/scenario8/scenario8.composite deleted file mode 100644 index 467b7f57fa..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario8/scenario8.composite +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario8" - xmlns:tns="http://scenario8" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario8/scenario8a.composite b/java/sca/itest/builder/src/main/resources/scenario8/scenario8a.composite deleted file mode 100644 index 9d9b5ba945..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario8/scenario8a.composite +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario8" - xmlns:tns="http://scenario8" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws uri="http://foo.com/bar" /> - </service> - <reference name="reference3" target="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <interface.wsdl interface="http://scenarios#wsdl.interface(Service3a)" /> - <binding.ws /> - </reference> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario8/scenarios.wsdl b/java/sca/itest/builder/src/main/resources/scenario8/scenarios.wsdl deleted file mode 100644 index 5cda7327dd..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario8/scenarios.wsdl +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<wsdl:definitions name="Service3Service" - targetNamespace="http://scenarios" - xmlns:tns="http://scenarios" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - - <wsdl:types> - <xs:schema attributeFormDefault="qualified" - elementFormDefault="unqualified" - targetNamespace="http://scenarios" - xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:element name="getGreetings2"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="getGreetings2Response"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:schema> - </wsdl:types> - - <wsdl:message name="getGreetings2"> - <wsdl:part name="getGreetings2" element="tns:getGreetings2" /> - </wsdl:message> - - <wsdl:message name="getGreetings2Response"> - <wsdl:part name="getGreetings2Response" element="tns:getGreetings2Response" /> - </wsdl:message> - - <wsdl:portType name="Service3a"> - <wsdl:operation name="getGreetings2"> - <wsdl:input message="tns:getGreetings2" /> - <wsdl:output message="tns:getGreetings2Response" /> - </wsdl:operation> - </wsdl:portType> - -</wsdl:definitions> diff --git a/java/sca/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml deleted file mode 100644 index b6ec160506..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario9" - xmlns:ns9="http://scenario9"> - <deployable composite="ns9:CompositeA" /> -</contribution> diff --git a/java/sca/itest/builder/src/main/resources/scenario9/scenario9.composite b/java/sca/itest/builder/src/main/resources/scenario9/scenario9.composite deleted file mode 100644 index 83584ed482..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario9/scenario9.composite +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario9" - xmlns:tns="http://scenario9" - name="CompositeA"> - - <service name="Service1" promote="ComponentB/Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference1" promote="ComponentB/reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws uri="http://foo.com/bar"/> - </reference> - <reference name="reference1a" promote="ComponentB/reference2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - <binding.ws uri="http://foo.com/bar"/> - </reference> - - <component name="ComponentB"> - <implementation.composite name="tns:CompositeC" /> - <service name="Service2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference2a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> - - <component name="ComponentF"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/> - <service name="Service3"> - <binding.sca /> - <binding.ws /> - </service> - </component> -</composite> diff --git a/java/sca/itest/builder/src/main/resources/scenario9/scenario9a.composite b/java/sca/itest/builder/src/main/resources/scenario9/scenario9a.composite deleted file mode 100644 index 0021ec242b..0000000000 --- a/java/sca/itest/builder/src/main/resources/scenario9/scenario9a.composite +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scenario9" - xmlns:tns="http://scenario9" - name="CompositeC"> - - <service name="Service2" promote="ComponentD/Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service2a" promote="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference2" promote="ComponentD/reference3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference2a" promote="ComponentD/reference3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - - <component name="ComponentD"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/> - <service name="Service3"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <service name="Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </service> - <reference name="reference3" target="ComponentD/Service3a"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - <reference name="reference3a" target="ComponentE"> - <!-- bindings and/or interfaces may or may not be specified explicitly here --> - </reference> - </component> - - <component name="ComponentE"> - <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/> - <service name="Service3"> - <binding.sca /> - <binding.ws /> - </service> - </component> -</composite> diff --git a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java b/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java deleted file mode 100644 index 6d41581371..0000000000 --- a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java +++ /dev/null @@ -1,814 +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 org.apache.tuscany.sca.itest.builder; - -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.xml.namespace.QName; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Load and build some composites and inspect the results. - * - * @version $Rev$ $Date$ - */ -public class BuilderTestCase { - private CustomCompositeBuilder customBuilder; - - @Before - public void setUp() throws Exception { - } - - @After - public void tearDown() throws Exception { - } - - /* OASIS doesn't take notice of top level composite services - * - // Scenario 1: <binding.ws> on outer composite service CompositeA/Service1 - @Ignore - @Test - public void testScenario1() throws Exception { - System.out.println("====>Running testScenario1"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario1.composite", "TestContribution", "src/main/resources/scenario1/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario1Results(false); - } - - @Ignore - @Test - public void testScenario1NonWiring() throws Exception { - System.out.println("====>Running testScenario1NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario1.composite", "TestContribution", "src/main/resources/scenario1/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario1Results(true); - } - - private void checkScenario1Results(boolean nonWiring) { - Composite domainComposite = customBuilder.getDomainComposite(); - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - if (!nonWiring) { - // Should create component service $promoted$Service1 on innermost component - // ComponentD, with <binding.ws> and uri="/Service1" - // No other services on ComponentD should have <binding.ws> - WebServiceBinding wsBinding = null; - for (ComponentService service : componentD.getServices()) { - WebServiceBinding wsb = service.getBinding(WebServiceBinding.class); - if ("$promoted$Service1".equals(service.getName())) { - wsBinding = wsb; - } else { - assert wsb == null; - } - } - assert "/Service1".equals(wsBinding.getURI()); - - // Should create WSDL document for ComponentD/$promoted$Service1 with endpoint uri="/Service1" - Definition def = wsBinding.getWSDLDocument(); - javax.wsdl.Service svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - Port port = svc.getPort("Service3Port"); - assert "/Service1".equals(TestUtils.getPortAddress(port)); - } else { - // Should not create component service $promoted$Service1 on innermost component ComponentD - // No component services on ComponentD should have <binding.ws> - for (ComponentService service : componentD.getServices()) { - assert !"$promoted$Service1".equals(service.getName()); - assert service.getBinding(WebServiceBinding.class) == null; - } - } - - // No services on ComponentB should have <binding.ws> - Component componentB = TestUtils.getComponent(domainComposite, "ComponentB"); - for (ComponentService service : componentB.getServices()) { - assert service.getBinding(WebServiceBinding.class) == null; - } - - // No services on CompositeC should have <binding.ws> - Composite compositeC = TestUtils.getComposite(domainComposite, new QName("http://scenario1", "CompositeC")); - for (Service service : compositeC.getServices()) { - assert service.getBinding(WebServiceBinding.class) == null; - } - - if (nonWiring) { - // Should not add a WSDL document to domain composite service Service1 - WebServiceBinding wsBinding = null; - for (Service service : domainComposite.getServices()) { - if ("Service1".equals(service.getName())) { - wsBinding = service.getBinding(WebServiceBinding.class); - } - } - assert wsBinding.getWSDLDocument() == null; - } - - String expectedEndpoints = "Component - ComponentB\n" + - "Service - Service2\n" + - "Endpoint - Service2\n" + - "Service - Service2a\n" + - "Endpoint - Service2a\n" + - "Reference - reference2\n" + - "Component - ComponentB has composite impl\n" + - " Component - ComponentD\n" + - " Service - Service3\n" + - " Endpoint - Service3\n" + - " Service - Service3a\n" + - " Endpoint - Service3a\n" + - " Reference - reference3"; - - String actualEndpoints = TestUtils.printEndpoints(domainComposite); - System.out.println(actualEndpoints); - - Assert.assertEquals(expectedEndpoints, actualEndpoints); - } -*/ - - // Scenario 2: <binding.ws> on outer component service ComponentB/Service2 - @Test - public void testScenario2() throws Exception { - System.out.println("====>Running testScenario2"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario2.composite", "TestContribution", "src/main/resources/scenario2/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario2and3Results("http://scenario2", false); - } - - public void testScenario2NonWiring() throws Exception { - System.out.println("====>Running testScenario2NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario2.composite", "TestContribution", "src/main/resources/scenario2/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario2and3Results("http://scenario2", true); - } - - private void checkScenario2and3Results(String namespace, boolean nonWiring) { - Composite domainComposite = customBuilder.getDomainComposite(); - - // Test that endpoint structure matches expected - String structure = TestUtils.printStructure(domainComposite, ""); - System.out.println(structure); - - String expectedStructure = "Component URI - ComponentB\n" + - " Component URI - ComponentB/ComponentD\n" + - " Endpoint: URI = ComponentB/ComponentD#service-binding(Service3/Service3) org.apache.tuscany.sca.assembly.impl.SCABindingImpl\n" + - " Endpoint: URI = ComponentB/ComponentD#service-binding(Service3a/Service3a) org.apache.tuscany.sca.assembly.impl.SCABindingImpl\n" + - "Endpoint: URI = ComponentB#service-binding(Service2/Service2) org.apache.tuscany.sca.binding.ws.impl.WebServiceBindingImpl\n" + - "Endpoint: URI = ComponentB#service-binding(Service2a/Service3a) org.apache.tuscany.sca.assembly.impl.SCABindingImpl\n"; - - Assert.assertEquals(expectedStructure, structure); - - // Test that generated WSDL matches expected - // Should create WSDL document for ComponentB/Service2 with endpoint uri="/ComponentB/Service2" - // No other services on ComponentB should have <binding.ws> - Component componentB = TestUtils.getComponent(domainComposite, "ComponentB"); - WebServiceBinding wsBinding = null; - - for (ComponentService service : componentB.getServices()) { - WebServiceBinding wsb = service.getBinding(WebServiceBinding.class); - if ("Service2".equals(service.getName())) { - wsBinding = wsb; - } else { - assert wsb == null; - } - } - - Definition def = wsBinding.getWSDLDocument(); - TestUtils.writeWSDL(def); - - javax.wsdl.Service svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - Port port = svc.getPort("Service3Port"); - Assert.assertEquals("/ComponentB/Service2",TestUtils.getPortAddress(port)); - - } -/* - // Scenario 3: <binding.ws> on inner composite service CompositeC/Service2 - public void testScenario3() throws Exception { - System.out.println("====>Running testScenario3"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario3.composite", "TestContribution", "src/main/resources/scenario3/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario2and3Results("http://scenario3", false); - } - - public void testScenario3NonWiring() throws Exception { - System.out.println("====>Running testScenario3NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario3.composite", "TestContribution", "src/main/resources/scenario3/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario2and3Results("http://scenario3", true); - } - - // Scenario 4: <binding.ws> on inner component service ComponentD/Service3 - public void testScenario4() throws Exception { - System.out.println("====>Running testScenario4"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario4.composite", "TestContribution", "src/main/resources/scenario4/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario4Results(false); - } - - public void testScenario4NonWiring() throws Exception { - System.out.println("====>Running testScenario4NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario4.composite", "TestContribution", "src/main/resources/scenario4/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario4Results(true); - } - - private void checkScenario4Results(boolean nonWiring) { - Composite domainComposite = customBuilder.getDomainComposite(); - - // Should create WSDL document for ComponentD/Service3 with endpoint uri="/ComponentD/Service3" - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - WebServiceBinding wsBinding = null; - for (ComponentService service : componentD.getServices()) { - if ("Service3".equals(service.getName())) { - wsBinding = service.getBinding(WebServiceBinding.class); - } - } - Definition def = wsBinding.getWSDLDocument(); - javax.wsdl.Service svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - Port port = svc.getPort("Service3Port"); - assert "/ComponentB/ComponentD/Service3".equals(TestUtils.getPortAddress(port)); - - // Should add <binding.ws> to inner composite service CompositeC/Service2 - // No other services on CompositeC should have <binding.ws> - Composite compositeC = TestUtils.getComposite(domainComposite, new QName("http://scenario4", "CompositeC")); - wsBinding = null; - for (Service service : compositeC.getServices()) { - WebServiceBinding wsb = service.getBinding(WebServiceBinding.class); - if ("Service2".equals(service.getName())) { - wsBinding = wsb; - } else { - assert wsb == null; - } - } - assert "/ComponentB/Service2".equals(wsBinding.getURI()); - - // Should add <binding.ws> to outer component service ComponentB/Service2 - // Should create WSDL document for ComponentB/Service2 with endpoint uri="/ComponentB/Service2" - // No other services on ComponentB should have <binding.ws> - Component componentB = TestUtils.getComponent(domainComposite, "ComponentB"); - wsBinding = null; - for (ComponentService service : componentB.getServices()) { - WebServiceBinding wsb = service.getBinding(WebServiceBinding.class); - if ("Service2".equals(service.getName())) { - wsBinding = wsb; - } else { - assert wsb == null; - } - } - assert "/ComponentB/Service2".equals(wsBinding.getURI()); - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - port = svc.getPort("Service3Port"); - assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port)); - - if (!nonWiring) { - // Should create component service $promoted$ComponentB$slash$Service2 on innermost component - // ComponentD, with <binding.ws> and uri="/ComponentB/Service2" - wsBinding = null; - for (ComponentService service : componentD.getServices()) { - if ("$promoted$ComponentB$slash$Service2".equals(service.getName())) { - wsBinding = service.getBinding(WebServiceBinding.class); - } - } - assert "/ComponentB/Service2".equals(wsBinding.getURI()); - - // Should create WSDL document for ComponentD/$promoted$ComponentB$slash$Service2 with endpoint uri="/ComponentB/Service2" - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - port = svc.getPort("Service3Port"); - assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port)); - } else { - // Should not create component service $promoted$ComponentB$slash$Service2 on innermost component ComponentD - for (ComponentService service : componentD.getServices()) { - assert !"$promoted$ComponentB$slash$Service2".equals(service.getName()); - } - } - - // Should add <binding.ws> to outer composite service CompositeA/Service1 - wsBinding = null; - for (Service service : domainComposite.getServices()) { - if ("Service1".equals(service.getName())) { - wsBinding = service.getBinding(WebServiceBinding.class); - } - } - assert wsBinding != null; - if (nonWiring) { - // Should not add a WSDL document to domain composite service Service1 - assert wsBinding.getWSDLDocument() == null; - } - - if (!nonWiring) { - // Should create component service $promoted$Service1 on innermost component - // ComponentD, with <binding.ws> and uri="/Service1" - wsBinding = null; - for (ComponentService service : componentD.getServices()) { - if ("$promoted$Service1".equals(service.getName())) { - wsBinding = service.getBinding(WebServiceBinding.class); - } - } - assert "/Service1".equals(wsBinding.getURI()); - - // Should create WSDL document for ComponentD/$promoted$Service1 with endpoint uri="/Service1" - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - port = svc.getPort("Service3Port"); - assert "/Service1".equals(TestUtils.getPortAddress(port)); - } else { - // Should not create component service $promoted$.Service1 on innermost component ComponentD - for (ComponentService service : componentD.getServices()) { - assert !"$promoted$Service1".equals(service.getName()); - } - } - - // No services on ComponentD should have <binding.ws>, except for Service3, - // $promoted$.Service1 and $promoted$.ComponentB.Service2 - for (ComponentService service : componentD.getServices()) { - if (!"Service3".equals(service.getName()) && - !"$promoted$Service1".equals(service.getName()) && - !"$promoted$ComponentB$slash$Service2".equals(service.getName())) { - assert service.getBinding(WebServiceBinding.class) == null; - } - } - } - - // Scenario 5: <binding.ws> and <interface.wsdl> on outer composite reference CompositeA/reference1 - @Test - public void testScenario5() throws Exception { - System.out.println("====>Running testScenario5"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario5.composite", "TestContribution", "src/main/resources/scenario5/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario5Results(false); - } - - @Test - public void testScenario5NonWiring() throws Exception { - System.out.println("====>Running testScenario5NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario5.composite", "TestContribution", "src/main/resources/scenario5/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario5Results(true); - } - - private void checkScenario5Results(boolean nonWiring) { - Composite domainComposite = customBuilder.getDomainComposite(); - - // Should not add <binding.ws> to any outer component references - Component componentB = TestUtils.getComponent(domainComposite, "ComponentB"); - for (ComponentReference reference : componentB.getReferences()) { - assert reference.getBinding(WebServiceBinding.class) == null; - } - - Definition def; - javax.wsdl.Service svc; - Port port; - WebServiceBinding wsBinding; - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - if (!nonWiring) { - // Should add <binding.ws> to inner component reference ComponentD/reference3 with uri="http://foo.com/bar" - // Should set <interface.wsdl> on inner component reference ComponentD/reference3 - wsBinding = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3".equals(reference.getName())) { - wsBinding = reference.getBinding(WebServiceBinding.class); - assert reference.getInterfaceContract(wsBinding) instanceof WSDLInterfaceContract; - } - } - assert "http://foo.com/bar".equals(wsBinding.getURI()); - - // Should create WSDL document for ComponentD/reference3 with endpoint uri="http://foo.com/bar" - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://scenarios/ComponentD/reference3", "Service3aService")); - port = svc.getPort("Service3aPort"); - assert "http://foo.com/bar".equals(TestUtils.getPortAddress(port)); - } else { - // Should not add <binding.ws> to any inner component references - for (ComponentReference reference : componentD.getReferences()) { - assert reference.getBinding(WebServiceBinding.class) == null; - } - } - - // Should not add <binding.ws> or <interface.wsdl> to inner composite reference CompositeC/reference2 - Composite compositeC = TestUtils.getComposite(domainComposite, new QName("http://scenario5", "CompositeC")); - for (Reference reference : compositeC.getReferences()) { - assert reference.getBinding(WebServiceBinding.class) == null; - assert reference.getInterfaceContract() instanceof JavaInterfaceContract; - } - - String expectedEndpoints = "Component - ComponentB\n" + - "Service - Service2\n" + - "Endpoint - Service2\n" + - "Service - Service2a\n" + - "Endpoint - Service2a\n" + - "Reference - reference2\n" + - "Component - ComponentB has composite impl\n" + - " Component - ComponentD\n" + - " Service - Service3\n" + - " Endpoint - Service3\n" + - " Service - Service3a\n" + - " Endpoint - Service3a\n" + - " Reference - reference3"; - - String actualEndpoints = TestUtils.printEndpoints(domainComposite); - System.out.println(actualEndpoints); - - Assert.assertEquals(expectedEndpoints, actualEndpoints); - } - - - // Scenario 6: <binding.ws> and <interface.wsdl> on outer component reference ComponentB/reference2 - @Ignore - @Test - public void testScenario6() throws Exception { - System.out.println("====>Running testScenario6"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario6.composite", "TestContribution", "src/main/resources/scenario6/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario6and7Results("http://scenario6", false); - } - - @Ignore - @Test - public void testScenario6NonWiring() throws Exception { - System.out.println("====>Running testScenario6NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario6.composite", "TestContribution", "src/main/resources/scenario6/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario6and7Results("http://scenario6", true); - } - - private void checkScenario6and7Results(String namespace, boolean nonWiring) { - Composite domainComposite = customBuilder.getDomainComposite(); - - // Should remove target= on ComponentB/reference2 (for Scenario 6) or - // CompositeC/reference2 (for Scenario 7), and add uri="http://foo.com/bar" - // to the <binding.ws> element on ComponentB/reference2 - // For nonWiring, ComponentB/reference2 should have target= - // and no uri= should be added - Component componentB = TestUtils.getComponent(domainComposite, "ComponentB"); - WebServiceBinding wsBinding = null; - for (ComponentReference reference : componentB.getReferences()) { - if ("reference2".equals(reference.getName())) { - if (!nonWiring) { - assert reference.getTargets().size() == 0; - } else { - assert reference.getTargets().size() == 1; - } - wsBinding = reference.getBinding(WebServiceBinding.class); - } - } - if (!nonWiring) { - assert "http://foo.com/bar".equals(wsBinding.getURI()); - } else { - assert wsBinding.getURI() == null; - } - - Definition def; - javax.wsdl.Service svc; - Port port; - if (!nonWiring) { - // Should create WSDL document for ComponentB/reference2 with endpoint uri="http://foo.com/bar" - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://scenarios/ComponentB/reference2", "Service3aService")); - port = svc.getPort("Service3aPort"); - assert "http://foo.com/bar".equals(TestUtils.getPortAddress(port)); - } - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - if (!nonWiring) { - // Should add <binding.ws> to inner component reference ComponentD/reference3 with uri="http://foo.com/bar" - // Should set <interface.wsdl> on inner component reference ComponentD/reference3 - wsBinding = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3".equals(reference.getName())) { - wsBinding = reference.getBinding(WebServiceBinding.class); - assert reference.getBindings().size() == 1; - assert reference.getInterfaceContract(wsBinding) instanceof WSDLInterfaceContract; - } - } - assert "http://foo.com/bar".equals(wsBinding.getURI()); - - // Should create WSDL document for ComponentD/reference3 with endpoint uri="http://foo.com/bar" - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://scenarios/ComponentB/reference2", "Service3aService")); - port = svc.getPort("Service3aPort"); - assert "http://foo.com/bar".equals(TestUtils.getPortAddress(port)); - } else { - // Should not add <binding.ws> to any inner component references - for (ComponentReference reference : componentD.getReferences()) { - assert reference.getBinding(WebServiceBinding.class) == null; - } - } - - // No references on CompositeC should have <binding.ws> or <interface.wsdl>, except for - // reference2 in Scenario 7 - Composite compositeC = TestUtils.getComposite(domainComposite, new QName(namespace, "CompositeC")); - for (Reference reference : compositeC.getReferences()) { - if ("http://scenario7".equals(namespace) && "reference2".equals(reference.getName())) { - assert reference.getBinding(WebServiceBinding.class)!= null; - assert reference.getInterfaceContract() instanceof WSDLInterfaceContract; - } else { - assert reference.getBinding(WebServiceBinding.class) == null; - assert reference.getInterfaceContract() instanceof JavaInterfaceContract; - } - } - - // Should add <binding.ws> and <interface.wsdl> to outer composite reference CompositeA/reference1 - wsBinding = null; - for (Reference reference : domainComposite.getReferences()) { - if ("reference1".equals(reference.getName())) { - wsBinding = reference.getBinding(WebServiceBinding.class); - assert reference.getInterfaceContract() instanceof WSDLInterfaceContract; - } - } - assert wsBinding.getURI() == null; - - // Should not add a WSDL document to domain composite reference reference1 - assert wsBinding.getWSDLDocument() == null; - - String expectedEndpoints = "Component - ComponentB\n" + - "Service - Service2\n" + - "Endpoint - Service2\n" + - "Service - Service2a\n" + - "Endpoint - Service2a\n" + - "Reference - reference2\n" + - "Component - ComponentB has composite impl\n" + - " Component - ComponentD\n" + - " Service - Service3\n" + - " Endpoint - Service3\n" + - " Service - Service3a\n" + - " Endpoint - Service3a\n" + - " Reference - reference3"; - - String actualEndpoints = TestUtils.printEndpoints(domainComposite); - System.out.println(actualEndpoints); - - Assert.assertEquals(expectedEndpoints, actualEndpoints); - } - - // Scenario 7: <binding.ws> and <interface.wsdl> on inner composite reference CompositeC/reference2 - public void testScenario7() throws Exception { - System.out.println("====>Running testScenario7"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario7.composite", "TestContribution", "src/main/resources/scenario7/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario6and7Results("http://scenario7", false); - } - - public void testScenario7NonWiring() throws Exception { - System.out.println("====>Running testScenario7NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario7.composite", "TestContribution", "src/main/resources/scenario7/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario6and7Results("http://scenario7", true); - } - - // Scenario 8: <binding.ws> and <interface.wsdl> on inner component reference ComponentD/reference3 - public void testScenario8() throws Exception { - System.out.println("====>Running testScenario8"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario8.composite", "TestContribution", "src/main/resources/scenario8/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario8Results(false); - } - - public void testScenario8NonWiring() throws Exception { - System.out.println("====>Running testScenario8NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario8.composite", "TestContribution", "src/main/resources/scenario8/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario8Results(true); - } - - private void checkScenario8Results(boolean nonWiring) { - Composite domainComposite = customBuilder.getDomainComposite(); - - // Should replace target= on ComponentD/reference3 by uri="http://foo.com/bar" on <binding.ws> - // For nonWiring, the original target= is preserved and there is no uri= - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - WebServiceBinding wsBinding = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3".equals(reference.getName())) { - if (!nonWiring) { - assert reference.getTargets().size() == 0; - } else { - assert reference.getTargets().size() == 1; - } - wsBinding = reference.getBinding(WebServiceBinding.class); - } - } - if (!nonWiring) { - assert "http://foo.com/bar".equals(wsBinding.getURI()); - } else { - assert wsBinding.getURI() == null; - } - - Definition def; - javax.wsdl.Service svc; - Port port; - if (!nonWiring) { - // Should create WSDL document for ComponentD/reference3 with endpoint uri="http://foo.com/bar" - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://scenarios/ComponentD/reference3", "Service3aService")); - port = svc.getPort("Service3aPort"); - assert "http://foo.com/bar".equals(TestUtils.getPortAddress(port)); - } - - // Should add <binding.ws> and <interface.wsdl> to inner composite reference CompositeC/reference2 - Composite compositeC = TestUtils.getComposite(domainComposite, new QName("http://scenario8", "CompositeC")); - wsBinding = null; - for (Reference reference : compositeC.getReferences()) { - if ("reference2".equals(reference.getName())) { - wsBinding = reference.getBinding(WebServiceBinding.class); - assert reference.getInterfaceContract() instanceof WSDLInterfaceContract; - } - } - assert wsBinding.getURI() == null; - - // Should add <binding.ws> and <interface.wsdl> to outer component reference ComponentB/reference2 - Component componentB = TestUtils.getComponent(domainComposite, "ComponentB"); - wsBinding = null; - for (ComponentReference reference : componentB.getReferences()) { - if ("reference2".equals(reference.getName())) { - wsBinding = reference.getBinding(WebServiceBinding.class); - assert reference.getInterfaceContract() instanceof WSDLInterfaceContract; - } - } - assert wsBinding.getURI() == null; - - // Should add <binding.ws> and <interface.wsdl> to outer composite reference CompositeA/reference1 - wsBinding = null; - for (Reference reference : domainComposite.getReferences()) { - if ("reference1".equals(reference.getName())) { - wsBinding = reference.getBinding(WebServiceBinding.class); - assert reference.getInterfaceContract() instanceof WSDLInterfaceContract; - } - } - assert wsBinding.getURI() == null; - - // Should not add a WSDL document to domain composite reference reference1 - assert wsBinding.getWSDLDocument() == null; - } - - // Scenario 9: target in reference CDR3A and binding.ws uri= at CAR1A - public void testScenario9() throws Exception { - System.out.println("====>Running testScenario9"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario9.composite", "TestContribution", "src/main/resources/scenario9/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario9Results(); - } - - private void checkScenario9Results() { - Composite domainComposite = customBuilder.getDomainComposite(); - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - ComponentReference componentRef = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3a".equals(reference.getName())) { - componentRef = reference; - assertTrue(reference.getBindings().size() == 2); - assertTrue(reference.getBindings().get(0) instanceof SCABinding); - assertTrue(reference.getBindings().get(1) instanceof WebServiceBinding); - } - } - assertTrue(componentRef != null); - } - - // Scenario 10: targets in references CBR2A and CDR3A and binding.ws at CBR2A - public void testScenario10() throws Exception { - System.out.println("====>Running testScenario10"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario10.composite", "TestContribution", "src/main/resources/scenario10/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario10And11Results(); - } - - // Scenario 11: targets in references CBR2A and CDR3A and binding.ws at CCR2A - public void testScenario11() throws Exception { - System.out.println("====>Running testScenario11"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario11.composite", "TestContribution", "src/main/resources/scenario11/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario10And11Results(); - } - - private void checkScenario10And11Results() { - Composite domainComposite = customBuilder.getDomainComposite(); - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - ComponentReference componentRef = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3a".equals(reference.getName())) { - componentRef = reference; - assertTrue(reference.getBindings().size() == 2); - Binding binding1 = reference.getBindings().get(0); - assertTrue(binding1 instanceof SCABinding); - assertTrue(reference.getInterfaceContract(binding1) instanceof JavaInterfaceContract); - Binding binding2 = reference.getBindings().get(1); - assertTrue(binding2 instanceof WebServiceBinding); - assertTrue(reference.getInterfaceContract(binding2) instanceof WSDLInterfaceContract); - } - } - assertTrue(componentRef != null); - } - - // Scenario 12: targets in references CBR2A and CDR3A and binding.ws at CDR3A - public void testScenario12() throws Exception { - System.out.println("====>Running testScenario12"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario12.composite", "TestContribution", "src/main/resources/scenario12/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario12Results(); - } - - private void checkScenario12Results() { - Composite domainComposite = customBuilder.getDomainComposite(); - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - ComponentReference componentRef = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3a".equals(reference.getName())) { - componentRef = reference; - assertTrue(reference.getBindings().size() == 2); - assertTrue(reference.getBindings().get(0) instanceof WebServiceBinding); - assertTrue(reference.getBindings().get(1) instanceof WebServiceBinding); - } - } - assertTrue(componentRef != null); - } - - // Scenario 13: target in reference CDR3A - public void testScenario13() throws Exception { - System.out.println("====>Running testScenario13"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario13.composite", "TestContribution", "src/main/resources/scenario13/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario13Results(); - } - - private void checkScenario13Results() { - Composite domainComposite = customBuilder.getDomainComposite(); - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - ComponentReference componentRef = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3a".equals(reference.getName())) { - componentRef = reference; - assertTrue(reference.getBindings().size() == 1); - assertTrue(reference.getBindings().get(0) instanceof WebServiceBinding); - } - } - assertTrue(componentRef != null); - } -*/ -} diff --git a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java b/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java deleted file mode 100644 index 27768f3799..0000000000 --- a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java +++ /dev/null @@ -1,99 +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 org.apache.tuscany.sca.itest.builder; - -import javax.xml.stream.XMLOutputFactory; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.MonitorFactory; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.node.impl.NodeImpl; -import org.apache.tuscany.sca.runtime.CompositeActivator; - - -public class CustomCompositeBuilder { - - private boolean nonWiring; - private Node node; - private ExtensionPointRegistry extensionPoints; - private Monitor monitor; - private StAXArtifactProcessor<Composite> compositeProcessor; - - public CustomCompositeBuilder(boolean nonWiring) { - this.nonWiring = nonWiring; - } - - public void loadContribution(String compositeURL, String sourceURI, String sourceURL) throws Exception { - NodeFactory nodeFactory = NodeFactory.newInstance(); - node = nodeFactory.createNode(compositeURL, new Contribution(sourceURI, sourceURL)); - node.start(); - - // get some things out of the extension registry - extensionPoints = ((NodeImpl)node).getExtensionPoints(); - - UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); - monitor = monitorFactory.createMonitor(); - - StAXArtifactProcessorExtensionPoint xmlProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); - compositeProcessor = xmlProcessors.getProcessor(Composite.class); - - CompositeActivator compositeActivator = utilities.getUtility(CompositeActivator.class); - } - - /** - * Returns the delegating model processor. - * @return the delegating model processor - */ - public StAXArtifactProcessor<Object> getModelProcessor() { - return null;//compositeProcessor; - } - - /** - * Returns the XML output factory. - * @return the XML output factory - */ - public XMLOutputFactory getOutputFactory() { - return null; //outputFactory; - } - - /** - * Returns the domain composite. - * @return the domain composite model object - */ - public Composite getDomainComposite() { - return (Composite) ((NodeImpl)node).getDomainComposite(); - } - - /** - * Returns the monitor. - * @return the monitor instance - */ - public Monitor getMonitor() { - return monitor; - } - -} diff --git a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java b/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java deleted file mode 100644 index c5eb7a70ea..0000000000 --- a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java +++ /dev/null @@ -1,319 +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 org.apache.tuscany.sca.itest.builder; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; - -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.WSDLException; -import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.extensions.soap12.SOAP12Address; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLWriter; -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.stream.XMLStreamWriter; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentReference; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Contract; -import org.apache.tuscany.sca.assembly.Endpoint; -import org.apache.tuscany.sca.assembly.EndpointReference; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.assembly.impl.EndpointImpl; -import org.apache.tuscany.sca.assembly.impl.EndpointReferenceImpl; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.contribution.processor.ProcessorContext; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.xml.serialize.OutputFormat; -import org.apache.xml.serialize.XMLSerializer; -import org.w3c.dom.Document; - -/** - * Static utility methods for use by test cases. - * - * @version $Rev$ $Date$ - */ -public class TestUtils { - - protected static void checkProblems(CustomCompositeBuilder customBuilder) throws Exception { - boolean problems = false; - for (Problem problem : customBuilder.getMonitor().getProblems()) { - if (problem.getCause() != null) { - problem.getCause().printStackTrace(); - } - if (problem.getSeverity() == Problem.Severity.ERROR){ - problems = true; - } - } - assert !problems; - } - - protected static String getPortAddress(Port port) { - Object ext = port.getExtensibilityElements().get(0); - String returnAddress = null; - if (ext instanceof SOAPAddress) { - returnAddress = ((SOAPAddress)ext).getLocationURI(); - } - if (ext instanceof SOAP12Address) { - returnAddress = ((SOAP12Address)ext).getLocationURI(); - } - - returnAddress = returnAddress.substring(returnAddress.indexOf("//") + 2); - returnAddress = returnAddress.substring(returnAddress.indexOf("/")); - - return returnAddress; - } - - protected static Component getComponent(Composite composite, String name) { - for (Component component : composite.getComponents()) { - if (name.equals(component.getName())) { - return component; - } - // process implementation composites recursively - Implementation impl = component.getImplementation(); - if (impl instanceof Composite) { - Component comp = getComponent((Composite)impl, name); - if (comp != null) { - return comp; - } - } - } - return null; - } - - protected static Composite getComposite(Composite composite, QName name) { - if (name.equals(composite.getName())) { - return composite; - } - for (Component component : composite.getComponents()) { - // process implementation composites recursively - Implementation impl = component.getImplementation(); - if (impl instanceof Composite) { - Composite comp = getComposite((Composite)impl, name); - if (comp != null) { - return comp; - } - } - } - return null; - } - - protected static void printResults(CustomCompositeBuilder customBuilder) throws Exception { - for (Problem problem : customBuilder.getMonitor().getProblems()) { - if (problem.getCause() != null) { - problem.getCause().printStackTrace(); - } - } - Composite domainComposite = customBuilder.getDomainComposite(); - printComposite(domainComposite, customBuilder); - } - - private static void printComposite(Composite composite, CustomCompositeBuilder customBuilder) throws Exception { - // process implementation composites recursively - for (Component component : composite.getComponents()) { - Implementation implementation = component.getImplementation(); - if (implementation instanceof Composite) { - printComposite((Composite)implementation, customBuilder); - } - } - - // write out the SCDL - writeSCDL(composite, customBuilder); - - // find all the component service and reference bindings - for (Component component : composite.getComponents()) { - for (ComponentService componentService : component.getServices()) { - for (Binding binding : componentService.getBindings()) { - if (binding instanceof WebServiceBinding) { - writeWSDL(component, componentService, ((WebServiceBinding)binding).getWSDLDocument()); - } - } - } - for (ComponentReference componentReference : component.getReferences()) { - for (Binding binding : componentReference.getBindings()) { - if (binding instanceof WebServiceBinding) { - writeWSDL(component, componentReference, ((WebServiceBinding)binding).getWSDLDocument()); - } - } - } - } - - // find all the composite service and reference bindings - for (Service service : composite.getServices()) { - for (Binding binding : service.getBindings()) { - if (binding instanceof WebServiceBinding) { - writeWSDL(null, service, ((WebServiceBinding)binding).getWSDLDocument()); - } - } - } - for (Reference reference : composite.getReferences()) { - for (Binding binding : reference.getBindings()) { - if (binding instanceof WebServiceBinding) { - writeWSDL(null, reference, ((WebServiceBinding)binding).getWSDLDocument()); - } - } - } - } - - private static void writeSCDL(Composite composite, CustomCompositeBuilder customBuilder) throws Exception { - // Print out a composite - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - XMLStreamWriter writer = customBuilder.getOutputFactory().createXMLStreamWriter(bos); - customBuilder.getModelProcessor().write(composite, writer, new ProcessorContext()); - - // Parse and write again to pretty format it - DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - Document document = documentBuilder.parse(new ByteArrayInputStream(bos.toByteArray())); - OutputFormat format = new OutputFormat(); - format.setIndenting(true); - format.setIndent(2); - XMLSerializer serializer = new XMLSerializer(System.out, format); - System.out.println("-->Runtime SCDL model for composite " + composite.getName()); - serializer.serialize(document); - } - - private static void writeWSDL(Component component, Contract contract, Definition definition) { - if (definition == null) { - System.out.println("-->No generated WSDL for " + (component != null ? component.getName() : "") + "/" + contract.getName()); - } else { - try { - System.out.println("-->Generated WSDL for " + (component != null ? component.getName() : "") + "/" + contract.getName()); - WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter(); - writer.writeWSDL(definition, System.out); - } catch (WSDLException e) { - // ignore - } - } - } - - protected static void writeWSDL(Definition definition) { - try { - WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter(); - writer.writeWSDL(definition, System.out); - } catch (WSDLException e) { - // ignore - } - } - - protected static String printStructure(Composite composite, String indent){ - String structure = ""; - for (Component component : composite.getComponents()){ - structure += indent + "Component URI - " + component.getURI() + "\n"; - - // recurse for composite implementations - Implementation implementation = component.getImplementation(); - if (implementation instanceof Composite) { - structure += printStructure((Composite)implementation, indent + " "); - } - - for (Service service : component.getServices()){ - for (Endpoint endpoint : service.getEndpoints()){ - structure += indent + ((EndpointImpl)endpoint).toStringWithoutHash() + " " + endpoint.getBinding().getClass().getName() + "\n"; - } - } - for (Reference reference : component.getReferences()){ - for (EndpointReference endpointReference : reference.getEndpointReferences()){ - structure += indent + ((EndpointReferenceImpl)endpointReference).toStringWithoutHash() + " " + endpointReference.getBinding().getClass().getName() + "\n"; - } - } - } - return structure; - } -/* - protected static String printEndpoints(Composite composite){ - return printEndpoints(composite, ""); - } - - protected static String printEndpoints(Composite composite, String indent){ - - String buffer = ""; - - for (Component component : composite.getComponents()) { - buffer += indent + "Component - " + component.getName() + "\n"; - - // print component service endpoints - for (ComponentService componentService : component.getServices()) { - buffer += indent + "Service - " + componentService.getName() + "\n"; - for (Endpoint endpoint : componentService.getEndpoints()) { - if (endpoint.getBinding() != null){ - buffer += printEndpoint(endpoint, indent); - } - } - } - - for (ComponentReference componentReference : component.getReferences()) { - buffer += indent + "Reference - " + componentReference.getName() + "\n"; - for (EndpointReference endpointReference : componentReference.getEndpointReferences()) { - buffer += printEndpointReference(endpointReference, indent); - } - } - - // process implementation composites recursively - Implementation implementation = component.getImplementation(); - if (implementation instanceof Composite) { - buffer += indent + "Component - " + component.getName() + " has composite impl" + "\n"; - buffer += printEndpoints((Composite)implementation, indent + " "); - } - } - - return buffer; - } - - protected static String printEndpoint(Endpoint endpoint, String indent){ - String buffer = ""; - - buffer += indent + " Endpoint - Component: " + endpoint.getComponent().getName() +"\n"; - buffer += indent + " Service: " + endpoint.getService().getName() +"\n"; - buffer += indent + " Binding: " + endpoint.getBinding().getName() +"\n"; - - return buffer; - } - - protected static String printEndpointReference(EndpointReference endpointReference, String indent){ - String buffer = ""; - - buffer += indent + " EndpointReference - Component: " + endpointReference.getComponent().getName() +"\n"; - buffer += indent + " Reference: " + endpointReference.getReference().getName() +"\n"; - if (endpointReference.getTargetEndpoint() != null){ - buffer += indent + " Wired: " +"\n"; - buffer += indent + " Target: " + endpointReference.getTargetEndpoint().getComponent().getName()+"\n"; - if (endpointReference.getTargetEndpoint() != null && - endpointReference.getTargetEndpoint().isUnresolved() == false){ - buffer += indent + " Binding: " + endpointReference.getBinding().getName() +"\n"; - buffer += indent + " TargetEndpoint: " + endpointReference.getTargetEndpoint().getBinding().getName()+"\n"; - } else { - buffer += indent + " Unresolved: " +"\n"; - } - } else { - buffer += indent + " NonWired: " +"\n"; - } - - return buffer; - } -*/ -} diff --git a/java/sca/itest/callback-api/pom.xml b/java/sca/itest/callback-api/pom.xml deleted file mode 100644 index 87ca4b67a0..0000000000 --- a/java/sca/itest/callback-api/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-callback-api</artifactId> - <name>Apache Tuscany SCA iTest Callback API</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <properties> - <was.ant.script>${basedir}/../build-was-integration.xml</was.ant.script> - <was.python.script>${basedir}/../wasAdmin.py</was.python.script> - </properties> -</project> diff --git a/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java b/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java deleted file mode 100644 index b013462f9f..0000000000 --- a/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -/** - * - */ -public interface CallBackApiCallBack { - /** - * This function is defined in CallBackApiClientImpl - */ - void callBackMessage(String aString); - - /** - * This function is defined in CallBackApiClientImpl - */ - void callBackIncrement(String aString); - -} diff --git a/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java b/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java deleted file mode 100644 index 252e4dc45f..0000000000 --- a/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CallBackApiClient { - /** - * This function is defined in CallBackApiClientImpl - */ - void run(); - -} diff --git a/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java b/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java deleted file mode 100644 index d883dc2d6f..0000000000 --- a/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java +++ /dev/null @@ -1,201 +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 org.apache.tuscany.sca.test; - -import org.junit.Assert; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackApiClient.class) -public class CallBackApiClientImpl implements CallBackApiClient, CallBackApiCallBack { - - @Reference - protected CallBackApiService aCallBackService; - - private static String returnMessage = null; - private static int callBackCount = 0; - private static Object monitor = new Object(); - - /** - * This test calls function test 3a,3a1,3b,3c - */ - public void run() { - - // This tests basic callback patterns. - - // Test3a is the basic callback where the target calls back prior to - // returning to the client. - test3a(); - - test3a1(); - - // Test3b is where the target does not call back to the client. - test3b(); - - // Test3c is where the target calls back multiple times to the client. - test3c(); - } - - /** - * This test is the basic callback where the target calls back prior to returning to the client. - */ - - private void test3a() { - aCallBackService.knockKnock("Knock Knock"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackApiITest - test3a", "Who's There", this.getReturnMessage()); - - } - - /** - * This test is the basic callback where the target calls back prior to returning to the client. - */ - private void test3a1() { - aCallBackService.knockKnockByRef("Knock Knock"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackApiITest - test3a", "Who's There", this.getReturnMessage()); - - } - - /** - * This test is the basic callback where the target does not call back to the client - */ - private void test3b() { - aCallBackService.noCallBack("No Reply Desired"); - Assert.assertEquals("CallBackApiITest - test3b", 1, 1); - } - - /** - * This test is the basic callback where the target calls back multiple times to the client - */ - - private void test3c() { - aCallBackService.multiCallBack("Call me back 3 times"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (this.getCallBackCount() < 3 && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackApiITest - test3c", 3, this.getCallBackCount()); - } - - /** - * This function returns a string - * - * @param void - * @return String result string - */ - - public String getReturnMessage() { - return returnMessage; - } - - /** - * This function set the returnMessage string - * - * @param String - */ - public void setReturnMessage(String aReturnMessage) { - returnMessage = aReturnMessage; - } - - /** - * This function returns the callBackCount variable - * - * @return Integer callBackCount variable - */ - public int getCallBackCount() { - return callBackCount; - } - - /** - * This function increments callBackCount variable by 1 - */ - public void incrementCallBackCount() { - callBackCount++; - } - - /** - * This function prints a message synched with setReturnMessage function - * - * @param String - */ - public void callBackMessage(String aString) { - System.out.println("Entering callback callBackMessage: " + aString); - synchronized (monitor) { - this.setReturnMessage(aString); - monitor.notify(); - } - } - - /** - * This function prints a message synched with incrementCallBackCount function - * - * @param String - */ - public void callBackIncrement(String aString) { - System.out.println("Entering callback increment: " + aString); - synchronized (monitor) { - this.incrementCallBackCount(); - monitor.notify(); - } - } - -} diff --git a/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java b/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java deleted file mode 100644 index afb7c45e2c..0000000000 --- a/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java +++ /dev/null @@ -1,50 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(CallBackApiCallBack.class) -/** - * - */ -public interface CallBackApiService { - /** - * This function is defined in CallBackApiServiceImpl - */ - void knockKnock(String aString); - - /** - * This function is defined in CallBackApiServiceImpl - */ - void knockKnockByRef(String aString); - - /** - * This function is defined in CallBackApiServiceImpl - */ - void noCallBack(String aString); - - /** - * This function is defined in CallBackApiServiceImpl - */ - void multiCallBack(String aString); - -} diff --git a/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java b/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java deleted file mode 100644 index 44f57b4316..0000000000 --- a/java/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java +++ /dev/null @@ -1,113 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.RequestContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackApiService.class) -public class CallBackApiServiceImpl implements CallBackApiService { - - @Context - protected ComponentContext componentContext; - /** - * Object of CallBackApiCallBack class - */ - private CallBackApiCallBack callback; - - @Callback - protected ServiceReference<CallBackApiCallBack> callbackRef; - - /** - * This function get an object of CallBackApiServiceImpl by calling getCallBackInterface function and calls the - * callBackMessage function. - * - * @param aString String passed by a function call - */ - - public void knockKnock(String aString) { - - System.out.println("CallBackApiServiceImpl message received: " + aString); - callback = this.getCallBackInterface(); - callback.callBackMessage("Who's There"); - System.out.println("CallBackApiServiceImpl response sent"); - } - - /** - * This function calls the callBackMessage function. <br> - * The reference to this function is received from Call back reference to the class CallBackApiService. - * - * @param aString String passed by a function call - */ - public void knockKnockByRef(String aString) { - - System.out.println("CallBackApiServiceImpl message received: " + aString); - callbackRef.getService().callBackMessage("Who's There"); - System.out.println("CallBackApiServiceImpl response sent"); - } - - /** - * This function get an object of CallBackApiServiceImpl by calling getCallBackInterface function. <br> - * This function then places multiple callBack using the callbackIncrement function defined in - * callBack.ApiServiceImpl - * - * @param aString String passed by a function call - */ - public void multiCallBack(String aString) { - - callback = this.getCallBackInterface(); - - System.out.println("CallBackApiServiceImpl message received: " + aString); - callback.callBackIncrement("Who's There 1"); - System.out.println("CallBackApiServiceImpl response sent"); - callback.callBackIncrement("Who's There 2"); - System.out.println("CallBackApiServiceImpl response sent"); - callback.callBackIncrement("Who's There 3"); - System.out.println("CallBackApiServiceImpl response sent"); - } - - /** - * This function does not callBack any function. - * - * @param aString String passed by a function call - */ - public void noCallBack(String aString) { - System.out.println("CallBackApiServiceImpl message received: " + aString); - } - - /** - * This function get an object of CallBackApiServiceImpl from the present componentContext - * - * @param void - */ - private CallBackApiCallBack getCallBackInterface() { - System.out.println("CallBackApiServiceImpl getting request context"); - RequestContext rc = componentContext.getRequestContext(); - System.out.println("CallBackApiServiceImpl getting callback from request context"); - callback = rc.getCallback(); - System.out.println("CallBackApiServiceImpl returning callback"); - return callback; - - } - -} diff --git a/java/sca/itest/callback-api/src/main/resources/CallBackApiTest.composite b/java/sca/itest/callback-api/src/main/resources/CallBackApiTest.composite deleted file mode 100644 index 309311e258..0000000000 --- a/java/sca/itest/callback-api/src/main/resources/CallBackApiTest.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://callback" - name="CallBackApiTest"> - - <component name="CallBackApiClient"> - <implementation.java class="org.apache.tuscany.sca.test.CallBackApiClientImpl"/> - <reference name="aCallBackService" target="CallBackApiService"/> - </component> - - <component name="CallBackApiService"> - <implementation.java class="org.apache.tuscany.sca.test.CallBackApiServiceImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 55736e5254..0000000000 --- a/java/sca/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:t="http://callback"> - <deployable composite="t:CallBackApiTest" /> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java b/java/sca/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java deleted file mode 100644 index 75fab95efb..0000000000 --- a/java/sca/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java +++ /dev/null @@ -1,70 +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 org.apache.tuscany.sca.test; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class CallBackApiTestCase { - - private static Node node; - private CallBackApiClient aCallBackClient; - - /** - * This function uses the Instance of CallBackApiClient.class <br> - * This function calls the run function defined in the CallBackApiClinet Interface <br> - * which in turn executes the following test cases. <br> - * 1. Basic callback patterns <br> - * 2. Test in which the target does not call back to the client <br> - * 3. Test in which the target calls back multiple times to the client. - */ - @Test - public void testCallBackBasic() { - aCallBackClient = node.getService(CallBackApiClient.class, "CallBackApiClient"); - aCallBackClient.run(); - } - - /** - * This function creates the Node instance and gets an Instance of CallBackApiClient.class - */ - - @BeforeClass - public static void setUp() throws Exception { - if (node == null) { - String location = ContributionLocationHelper.getContributionLocation("CallBackApiTest.composite"); - node = NodeFactory.newInstance().createNode("CallBackApiTest.composite", new Contribution("c1", location)); - node.start(); - } - } - - /** - * This function destroys the Node instance that was created in setUp() - */ - - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/java/sca/itest/callback-basic-ws/pom.xml b/java/sca/itest/callback-basic-ws/pom.xml deleted file mode 100644 index a022adc0d1..0000000000 --- a/java/sca/itest/callback-basic-ws/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-callback-basic-ws</artifactId> - <name>Apache Tuscany SCA iTest Callback Basic WebServices</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-http</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - </dependencies> - - <properties> - <was.ant.script>${basedir}/../build-was-integration.xml</was.ant.script> - <was.python.script>${basedir}/../wasAdmin.py</was.python.script> - </properties> -</project> diff --git a/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java b/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java deleted file mode 100644 index 291a72b9d6..0000000000 --- a/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -/** - * - */ -public interface CallBackBasicCallBack { - - void callBackMessage(String aString); - - void callBackIncrement(String aString); - -} diff --git a/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java b/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java deleted file mode 100644 index 19f366c423..0000000000 --- a/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CallBackBasicClient { - - void run(); - -} diff --git a/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java b/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java deleted file mode 100644 index 4bb6b29a8d..0000000000 --- a/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java +++ /dev/null @@ -1,129 +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 org.apache.tuscany.sca.test; - -import org.junit.Assert; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackBasicClient.class) -public class CallBackBasicClientImpl implements CallBackBasicClient, CallBackBasicCallBack { - - @Reference - protected CallBackBasicService aCallBackService; - private static String returnMessage = null; - private static int callBackCount = 0; - private static Object monitor = new Object(); - - public void run() { - - // This tests basic callback patterns. - - // Test1 is the basic callback where the target calls back prior to - // returning to the client. - test1a(); - - // Test2 is where the target does not call back to the client. - test1b(); - - // Test3 is where the target calls back multiple times to the client. - test1c(); - } - - private void test1a() { - aCallBackService.knockKnock("Knock Knock"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackBasicITest - test1a", "Who's There", this.getReturnMessage()); - - } - - private void test1b() { - aCallBackService.noCallBack("No Reply Desired"); - Assert.assertEquals("CallBackBasicITest - test1b", 1, 1); - } - - private void test1c() { - aCallBackService.multiCallBack("Call me back 3 times"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (this.getCallBackCount() < 3 && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackBasicITest - test1c", 3, this.getCallBackCount()); - } - - public String getReturnMessage() { - return returnMessage; - } - - public void setReturnMessage(String aReturnMessage) { - returnMessage = aReturnMessage; - } - - public int getCallBackCount() { - return callBackCount; - } - - public void incrementCallBackCount() { - callBackCount++; - } - - public void callBackMessage(String aString) { - System.out.println("Entering callback callBackMessage: " + aString); - synchronized (monitor) { - this.setReturnMessage(aString); - monitor.notify(); - } - } - - public void callBackIncrement(String aString) { - System.out.println("Entering callback increment: " + aString); - synchronized (monitor) { - this.incrementCallBackCount(); - monitor.notify(); - } - } - -} diff --git a/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java b/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java deleted file mode 100644 index 5396879e83..0000000000 --- a/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java +++ /dev/null @@ -1,37 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(CallBackBasicCallBack.class) -/** - * - */ -public interface CallBackBasicService { - - void knockKnock(String aString); - - void noCallBack(String aString); - - void multiCallBack(String aString); - -} diff --git a/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java b/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java deleted file mode 100644 index 07010f61e1..0000000000 --- a/java/sca/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java +++ /dev/null @@ -1,56 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackBasicService.class) -public class CallBackBasicServiceImpl implements CallBackBasicService { - - @Callback - protected CallBackBasicCallBack callback; - - public void knockKnock(String aString) { - - System.out.println("CallBackBasicServiceImpl message received: " + aString); - callback.callBackMessage("Who's There"); - System.out.println("CallBackBasicServiceImpl response sent"); - - } - - public void multiCallBack(String aString) { - - System.out.println("CallBackBasicServiceImpl message received: " + aString); - callback.callBackIncrement("Who's There 1"); - System.out.println("CallBackBasicServiceImpl response sent"); - callback.callBackIncrement("Who's There 2"); - System.out.println("CallBackBasicServiceImpl response sent"); - callback.callBackIncrement("Who's There 3"); - System.out.println("CallBackBasicServiceImpl response sent"); - - } - - public void noCallBack(String aString) { - - System.out.println("CallBackBasicServiceImpl message received: " + aString); - // System.out.println("CallBackBasicServiceImpl No response desired"); - - } -} diff --git a/java/sca/itest/callback-basic-ws/src/main/resources/CallBackBasicTest.composite b/java/sca/itest/callback-basic-ws/src/main/resources/CallBackBasicTest.composite deleted file mode 100644 index db1a2fbf6a..0000000000 --- a/java/sca/itest/callback-basic-ws/src/main/resources/CallBackBasicTest.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://callback" - name="CallBackBasicTest"> - - <component name="CallBackBasicClient"> - <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/> - <reference name="aCallBackService" target="CallBackBasicService"> - <callback> - <binding.ws uri="http://localhost:8084/aCallBackService"/> - </callback> - </reference> - </component> - - <component name="CallBackBasicService"> - <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/> - <service name="CallBackBasicService"> - <binding.ws uri="http://localhost:8085/CallBackBasicService"/> - </service> - </component> - -</composite> diff --git a/java/sca/itest/callback-basic-ws/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/callback-basic-ws/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b58fabcd79..0000000000 --- a/java/sca/itest/callback-basic-ws/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:t="http://callback"> - <deployable composite="t:CallBackBasicTest" /> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/callback-basic-ws/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java b/java/sca/itest/callback-basic-ws/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java deleted file mode 100644 index 43b812faed..0000000000 --- a/java/sca/itest/callback-basic-ws/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java +++ /dev/null @@ -1,56 +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 org.apache.tuscany.sca.test; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class CallBackBasicTestCase { - - private static Node node; - private CallBackBasicClient aCallBackClient; - - @Test - public void testCallBackBasic() { - aCallBackClient.run(); - } - - @Before - public void setUp() throws Exception { - if (node == null) { - String location = ContributionLocationHelper.getContributionLocation("CallBackBasicTest.composite"); - node = NodeFactory.newInstance().createNode("CallBackBasicTest.composite", new Contribution("c1", location)); - node.start(); - } - - aCallBackClient = node.getService(CallBackBasicClient.class, "CallBackBasicClient"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/java/sca/itest/callback-basic/pom.xml b/java/sca/itest/callback-basic/pom.xml deleted file mode 100644 index 029bb56247..0000000000 --- a/java/sca/itest/callback-basic/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-callback-basic</artifactId> - <name>Apache Tuscany SCA iTest Callback Basic</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <properties> - <was.ant.script>${basedir}/../build-was-integration.xml</was.ant.script> - <was.python.script>${basedir}/../wasAdmin.py</was.python.script> - </properties> -</project> diff --git a/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java b/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java deleted file mode 100644 index 291a72b9d6..0000000000 --- a/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -/** - * - */ -public interface CallBackBasicCallBack { - - void callBackMessage(String aString); - - void callBackIncrement(String aString); - -} diff --git a/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java b/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java deleted file mode 100644 index 19f366c423..0000000000 --- a/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CallBackBasicClient { - - void run(); - -} diff --git a/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java b/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java deleted file mode 100644 index 4bb6b29a8d..0000000000 --- a/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java +++ /dev/null @@ -1,129 +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 org.apache.tuscany.sca.test; - -import org.junit.Assert; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackBasicClient.class) -public class CallBackBasicClientImpl implements CallBackBasicClient, CallBackBasicCallBack { - - @Reference - protected CallBackBasicService aCallBackService; - private static String returnMessage = null; - private static int callBackCount = 0; - private static Object monitor = new Object(); - - public void run() { - - // This tests basic callback patterns. - - // Test1 is the basic callback where the target calls back prior to - // returning to the client. - test1a(); - - // Test2 is where the target does not call back to the client. - test1b(); - - // Test3 is where the target calls back multiple times to the client. - test1c(); - } - - private void test1a() { - aCallBackService.knockKnock("Knock Knock"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackBasicITest - test1a", "Who's There", this.getReturnMessage()); - - } - - private void test1b() { - aCallBackService.noCallBack("No Reply Desired"); - Assert.assertEquals("CallBackBasicITest - test1b", 1, 1); - } - - private void test1c() { - aCallBackService.multiCallBack("Call me back 3 times"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (this.getCallBackCount() < 3 && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackBasicITest - test1c", 3, this.getCallBackCount()); - } - - public String getReturnMessage() { - return returnMessage; - } - - public void setReturnMessage(String aReturnMessage) { - returnMessage = aReturnMessage; - } - - public int getCallBackCount() { - return callBackCount; - } - - public void incrementCallBackCount() { - callBackCount++; - } - - public void callBackMessage(String aString) { - System.out.println("Entering callback callBackMessage: " + aString); - synchronized (monitor) { - this.setReturnMessage(aString); - monitor.notify(); - } - } - - public void callBackIncrement(String aString) { - System.out.println("Entering callback increment: " + aString); - synchronized (monitor) { - this.incrementCallBackCount(); - monitor.notify(); - } - } - -} diff --git a/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java b/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java deleted file mode 100644 index 5396879e83..0000000000 --- a/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java +++ /dev/null @@ -1,37 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(CallBackBasicCallBack.class) -/** - * - */ -public interface CallBackBasicService { - - void knockKnock(String aString); - - void noCallBack(String aString); - - void multiCallBack(String aString); - -} diff --git a/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java b/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java deleted file mode 100644 index 07010f61e1..0000000000 --- a/java/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java +++ /dev/null @@ -1,56 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackBasicService.class) -public class CallBackBasicServiceImpl implements CallBackBasicService { - - @Callback - protected CallBackBasicCallBack callback; - - public void knockKnock(String aString) { - - System.out.println("CallBackBasicServiceImpl message received: " + aString); - callback.callBackMessage("Who's There"); - System.out.println("CallBackBasicServiceImpl response sent"); - - } - - public void multiCallBack(String aString) { - - System.out.println("CallBackBasicServiceImpl message received: " + aString); - callback.callBackIncrement("Who's There 1"); - System.out.println("CallBackBasicServiceImpl response sent"); - callback.callBackIncrement("Who's There 2"); - System.out.println("CallBackBasicServiceImpl response sent"); - callback.callBackIncrement("Who's There 3"); - System.out.println("CallBackBasicServiceImpl response sent"); - - } - - public void noCallBack(String aString) { - - System.out.println("CallBackBasicServiceImpl message received: " + aString); - // System.out.println("CallBackBasicServiceImpl No response desired"); - - } -} diff --git a/java/sca/itest/callback-basic/src/main/resources/CallBackBasicTest.composite b/java/sca/itest/callback-basic/src/main/resources/CallBackBasicTest.composite deleted file mode 100644 index 87cde940e1..0000000000 --- a/java/sca/itest/callback-basic/src/main/resources/CallBackBasicTest.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://callback" - name="CallBackBasicTest"> - - <component name="CallBackBasicClient"> - <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/> - <reference name="aCallBackService" target="CallBackBasicService"/> - </component> - - <component name="CallBackBasicService"> - <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b58fabcd79..0000000000 --- a/java/sca/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:t="http://callback"> - <deployable composite="t:CallBackBasicTest" /> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java b/java/sca/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java deleted file mode 100644 index 43b812faed..0000000000 --- a/java/sca/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java +++ /dev/null @@ -1,56 +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 org.apache.tuscany.sca.test; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class CallBackBasicTestCase { - - private static Node node; - private CallBackBasicClient aCallBackClient; - - @Test - public void testCallBackBasic() { - aCallBackClient.run(); - } - - @Before - public void setUp() throws Exception { - if (node == null) { - String location = ContributionLocationHelper.getContributionLocation("CallBackBasicTest.composite"); - node = NodeFactory.newInstance().createNode("CallBackBasicTest.composite", new Contribution("c1", location)); - node.start(); - } - - aCallBackClient = node.getService(CallBackBasicClient.class, "CallBackBasicClient"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/java/sca/itest/callback-complex-type/pom.xml b/java/sca/itest/callback-complex-type/pom.xml deleted file mode 100644 index 726465f2b9..0000000000 --- a/java/sca/itest/callback-complex-type/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-callback-complex-type</artifactId> - <name>Apache Tuscany SCA iTest Callback Complex Type</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java b/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java deleted file mode 100644 index 627d37e27d..0000000000 --- a/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -/** - * - */ -public interface CallBackCTypeCallBack { - - void callBackMessage(String aString); - - void callBackIncrement(String aString); - -} diff --git a/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java b/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java deleted file mode 100644 index 966ad17b9a..0000000000 --- a/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CallBackCTypeClient { - - void run(); - -} diff --git a/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java b/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java deleted file mode 100644 index d2dc0add75..0000000000 --- a/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java +++ /dev/null @@ -1,138 +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 org.apache.tuscany.sca.test; - -import org.junit.Assert; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackCTypeClient.class) -public class CallBackCTypeClientImpl implements CallBackCTypeClient, CallBackCTypeCallBack { - - @Reference - protected CallBackCTypeService aCallBackService; - private static String returnMessage = null; - private static int callBackCount = 0; - private static Object monitor = new Object(); - - public CallBackCTypeClientImpl() { - } - - public void run() { - - // This test is the same as the Basic Callback except it uses a - // componentType side file. - // This test currently fails because the integration test environment - // does not properly copy - // the componentType files to the target folder. This is documented in - // Tuscany-967. - - // Test12a is the basic callback where the target calls back prior to - // returning to the client. - test12a(); - - // Test12b is where the target does not call back to the client. - test12b(); - - // Test12c is where the target calls back multiple times to the client. - test12c(); - - } - - private void test12a() { - aCallBackService.knockKnock("Knock Knock"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackBasicITest - test12a -", "Who's There", this.getReturnMessage()); - - } - - private void test12b() { - aCallBackService.noCallBack("No Reply Desired"); - Assert.assertEquals("CallBackBasicITest - test12b -", 1, 1); - } - - private void test12c() { - aCallBackService.multiCallBack("Call me back 3 times"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (this.getCallBackCount() < 3 && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackBasicITest - test12c -", 3, this.getCallBackCount()); - } - - public String getReturnMessage() { - return returnMessage; - } - - public void setReturnMessage(String aReturnMessage) { - returnMessage = aReturnMessage; - } - - public int getCallBackCount() { - return callBackCount; - } - - public void incrementCallBackCount() { - callBackCount++; - } - - public void callBackMessage(String aString) { - System.out.println("Entering callback callBackMessage: " + aString); - synchronized (monitor) { - this.setReturnMessage(aString); - monitor.notify(); - } - } - - public void callBackIncrement(String aString) { - System.out.println("Entering callback increment: " + aString); - synchronized (monitor) { - this.incrementCallBackCount(); - monitor.notify(); - } - } - -} diff --git a/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java b/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java deleted file mode 100644 index 32ab1bdd3e..0000000000 --- a/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java +++ /dev/null @@ -1,37 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(CallBackCTypeCallBack.class) -/** - * - */ -public interface CallBackCTypeService { - - void knockKnock(String aString); - - void noCallBack(String aString); - - void multiCallBack(String aString); - -} diff --git a/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java b/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java deleted file mode 100644 index f7a1a195ed..0000000000 --- a/java/sca/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java +++ /dev/null @@ -1,59 +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 org.apache.tuscany.sca.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackCTypeService.class) -public class CallBackCTypeServiceImpl implements CallBackCTypeService { - - @Callback - protected CallBackCTypeCallBack callback; - - public CallBackCTypeServiceImpl() { - } - - public void knockKnock(String aString) { - - System.out.println("CallBackCTypeServiceImpl message received: " + aString); - callback.callBackMessage("Who's There"); - System.out.println("CallBackCTypeServiceImpl response sent"); - - } - - public void multiCallBack(String aString) { - - System.out.println("CallBackCTypeServiceImpl message received: " + aString); - callback.callBackIncrement("Who's There 1"); - System.out.println("CallBackCTypeServiceImpl response sent"); - callback.callBackIncrement("Who's There 2"); - System.out.println("CallBackCTypeServiceImpl response sent"); - callback.callBackIncrement("Who's There 3"); - System.out.println("CallBackCTypeServiceImpl response sent"); - - } - - public void noCallBack(String aString) { - - System.out.println("CallBackCTypeServiceImpl message received: " + aString); - System.out.println("CallBackCTypeServiceImpl No response desired"); - - } -} diff --git a/java/sca/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite b/java/sca/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite deleted file mode 100644 index 2eea567fff..0000000000 --- a/java/sca/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://callback" - name="CallBackCTypeTest"> - - <component name="CallBackCTypeClient"> - <implementation.java class="org.apache.tuscany.sca.test.CallBackCTypeClientImpl"/> - <reference name="aCallBackService" target="CallBackCTypeService"/> - </component> - - <component name="CallBackCTypeService"> - <implementation.java class="org.apache.tuscany.sca.test.CallBackCTypeServiceImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType b/java/sca/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType deleted file mode 100644 index af0b373472..0000000000 --- a/java/sca/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" > -
- <service name="CallBackCTypeService">
- <interface.java interface="org.apache.tuscany.sca.test.CallBackCTypeService"
- callbackInterface="org.apache.tuscany.sca.test.CallBackCTypeCallBack"/>
- </service>
- -</componentType>
-
\ No newline at end of file diff --git a/java/sca/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java b/java/sca/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java deleted file mode 100644 index dde489d766..0000000000 --- a/java/sca/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java +++ /dev/null @@ -1,54 +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 org.apache.tuscany.sca.test; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class CallBackCTypeTestCase { - - private Node node; - private CallBackCTypeClient aCallBackClient; - - @Test - public void testCallBackBasic() { - aCallBackClient.run(); - } - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("CallBackCTypeClient.composite"); - node = - NodeFactory.newInstance().createNode("CallBackCTypeClient.composite", new Contribution("c1", location)) - .start(); - - aCallBackClient = node.getService(CallBackCTypeClient.class, "CallBackCTypeClient"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/java/sca/itest/callback-multiple-wires/pom.xml b/java/sca/itest/callback-multiple-wires/pom.xml deleted file mode 100644 index b29900c6ef..0000000000 --- a/java/sca/itest/callback-multiple-wires/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-callback-multiple-wires</artifactId> - <name>Apache Tuscany SCA iTest Callback With Mutiple Wires</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java b/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java deleted file mode 100644 index 7c80d222fc..0000000000 --- a/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java +++ /dev/null @@ -1,27 +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 org.apache.tuscany.sca.test.callback; - -/** - * The client interface - */ -public interface MyClient { - - void aClientMethod(); -} diff --git a/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java b/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java deleted file mode 100644 index c3ea6c3032..0000000000 --- a/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java +++ /dev/null @@ -1,49 +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 org.apache.tuscany.sca.test.callback; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * Demonstrates a component-to-component callback invocation - */ -@Service(MyClient.class) -@Scope("COMPOSITE") -public class MyClientImpl1 implements MyClient, MyServiceCallback { - - private MyService myService; - static String result; - - @Reference - public void setMyService(MyService myService) { - this.myService = myService; - } - - public void aClientMethod() { - myService.someMethod("-> someMethod1"); - } - - public void receiveResult(String result) { - System.out.println("Work thread " + Thread.currentThread()); - System.out.println("Result in client1: " + result); - MyClientImpl1.result = result; - } -} diff --git a/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java b/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java deleted file mode 100644 index 84ca158c97..0000000000 --- a/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java +++ /dev/null @@ -1,49 +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 org.apache.tuscany.sca.test.callback; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * Demonstrates a component-to-component callback invocation - */ -@Service(MyClient.class) -@Scope("COMPOSITE") -public class MyClientImpl2 implements MyClient, MyServiceCallback { - - private MyService myService; - static String result; - - @Reference - public void setMyService(MyService myService) { - this.myService = myService; - } - - public void aClientMethod() { - myService.someMethod("-> someMethod2"); - } - - public void receiveResult(String result) { - System.out.println("Work thread " + Thread.currentThread()); - System.out.println("Result in client2: " + result); - MyClientImpl2.result = result; - } -} diff --git a/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java b/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java deleted file mode 100644 index 66758a1e73..0000000000 --- a/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.test.callback; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.OneWay; - -/** - * This service that will be invoked in a non-blocking fashion - */ -@Callback(MyServiceCallback.class) -public interface MyService { - - @OneWay - void someMethod(String arg); -} diff --git a/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java b/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java deleted file mode 100644 index f198efae51..0000000000 --- a/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java +++ /dev/null @@ -1,27 +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 org.apache.tuscany.sca.test.callback; - -/** - * The callback interface for {@link MyService}. - */ -public interface MyServiceCallback { - - void receiveResult(String result); -} diff --git a/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java b/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java deleted file mode 100644 index 49df5aa17a..0000000000 --- a/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java +++ /dev/null @@ -1,45 +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 org.apache.tuscany.sca.test.callback; - -import org.oasisopen.sca.RequestContext; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements MyService and uses a callback. - */ -@Service(MyService.class) -@Scope("COMPOSITE") -public class MyServiceImpl implements MyService { - - @Context - protected RequestContext requestContext; - - public void someMethod(String arg) { - // invoke the callback - try { - MyServiceCallback myServiceCallback = requestContext.getCallback(); - myServiceCallback.receiveResult(arg + " -> receiveResult"); - } catch (RuntimeException e) { - System.out.println("RuntimeException invoking receiveResult: " + e.toString()); - } - } -} diff --git a/java/sca/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite b/java/sca/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite deleted file mode 100644 index 3d0b37eeae..0000000000 --- a/java/sca/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://callback" - name="CallbackMultiWireTest"> - - <component name="MyClientComponent1"> - <implementation.java class="org.apache.tuscany.sca.test.callback.MyClientImpl1"/> - <reference name="myService" target="MyServiceComponent"/> - </component> - - <component name="MyClientComponent2"> - <implementation.java class="org.apache.tuscany.sca.test.callback.MyClientImpl2"/> - <reference name="myService" target="MyServiceComponent"/> - </component> - - <component name="MyServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.test.callback.MyServiceImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java b/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java deleted file mode 100644 index bd3cce74b4..0000000000 --- a/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java +++ /dev/null @@ -1,64 +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 org.apache.tuscany.sca.test.callback; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * A TestCase that demonstrates resolving the client service and initiating the callback sequence - */ -public class CallbackMultiWireTestCase { - - private Node node; - private MyClient myClient1; - private MyClient myClient2; - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("CallbackMultiWireTest.composite"); - node = NodeFactory.newInstance().createNode("CallbackMultiWireTest.composite", new Contribution("c1", location)); - node.start(); - myClient1 = node.getService(MyClient.class, "MyClientComponent1"); - myClient2 = node.getService(MyClient.class, "MyClientComponent2"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - - @Test - public void test() throws Exception { - System.out.println("Main thread " + Thread.currentThread()); - myClient1.aClientMethod(); - myClient2.aClientMethod(); - System.out.println("Sleeping ..."); - Thread.sleep(300); - assertEquals("-> someMethod1 -> receiveResult", MyClientImpl1.result); - assertEquals("-> someMethod2 -> receiveResult", MyClientImpl2.result); - } -} diff --git a/java/sca/itest/callback-separatethread/pom.xml b/java/sca/itest/callback-separatethread/pom.xml deleted file mode 100644 index 99ecf2e312..0000000000 --- a/java/sca/itest/callback-separatethread/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-callback-separatethread</artifactId> - <name>Apache Tuscany SCA iTest Callback Using Separate Thread</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java b/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java deleted file mode 100644 index dc66003604..0000000000 --- a/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.itest; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the client interface for the call backs in a separate thread tests - */ -@Remotable -public interface CallBackSeparateThreadClient { - - /** - * This tests call back patterns using separate threads. - */ - void runTests(); -} diff --git a/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java b/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java deleted file mode 100644 index f03144db8a..0000000000 --- a/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java +++ /dev/null @@ -1,186 +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 org.apache.tuscany.sca.itest; - -import java.util.concurrent.atomic.AtomicInteger; - -import org.junit.Assert; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This is the client implementation for the call backs in a separate thread tests - */ -@Service(CallBackSeparateThreadClient.class) -public class CallBackSeparateThreadClientImpl implements CallBackSeparateThreadClient, EventProcessorCallBack { - /** - * Max time to wait to receive events. If not all the events are received then timeout. - */ - private static final int TIMEOUT = 30 * 1000; - - /** - * Counts the number of fast call backs. - */ - private static final AtomicInteger FAST_CALLBACK_COUNT = new AtomicInteger(); - - /** - * Counts the number of slow call backs. - */ - private static final AtomicInteger SLOW_CALLBACK_COUNT = new AtomicInteger(); - - /** - * This is our injected reference to the EventProcessorService - */ - @Reference - protected EventProcessorService aCallBackService; - - /** - * This tests call back patterns using separate threads. - */ - public void runTests() { - try { - // Register for fast call back - registerForFastCallback(); - - // Wait for a few fast call backs - System.out.println("Waiting for some fast call backs"); - waitForSomeFastCallbacks(); - - try { - // Register for slow call back - registerForSlowCallback(); - - // Wait for a few fast call backs - System.out.println("Waiting for some fast calls"); - waitForSomeFastCallbacks(); - - // Wait for a few slow call backs - System.out.println("Waiting for some slow calls"); - waitForSomeSlowCallbacks(); - } finally { - unregisterForSlowCallback(); - } - - System.out.println("Done"); - } finally { - unregisterForFastCallback(); - } - } - - /** - * Waits for some fast call backs to be fired - */ - private void waitForSomeFastCallbacks() { - // Reset the fast call back count - FAST_CALLBACK_COUNT.set(0); - - // Wait until we have 10 fast call backs or timeout occurs - final long start = System.currentTimeMillis(); - do { - if (FAST_CALLBACK_COUNT.get() >= 10) { - System.out.println("Received enough fast notifications"); - return; - } - - try { - Thread.sleep(5); - } catch (InterruptedException e) { - Assert.fail("Unexpeceted exception " + e); - } - } while (System.currentTimeMillis() - start < TIMEOUT); - - // If we get to here then we did not receive enough events - Assert.fail("Did not receive enough fast events"); - } - - /** - * Waits for some slow call backs to be fired - */ - private void waitForSomeSlowCallbacks() { - // Reset the slow call back count - SLOW_CALLBACK_COUNT.set(0); - - // Wait until we have 4 slow call backs or timeout - final long start = System.currentTimeMillis(); - do { - if (SLOW_CALLBACK_COUNT.get() >= 4) { - System.out.println("Received enough slow notifications"); - return; - } - - try { - Thread.sleep(5); - } catch (InterruptedException e) { - Assert.fail("Unexpeceted exception " + e); - } - } while (System.currentTimeMillis() - start < TIMEOUT); - - // If we get to here then we did not receive enough events - Assert.fail("Did not receive enough slow events"); - } - - /** - * Register to receive fast call backs - */ - private void registerForFastCallback() { - aCallBackService.registerForEvent("FAST"); - } - - /** - * Register to receive slow call backs - */ - private void registerForSlowCallback() { - aCallBackService.registerForEvent("SLOW"); - } - - /** - * Unregister to receive fast call backs - */ - private void unregisterForFastCallback() { - aCallBackService.unregisterForEvent("FAST"); - } - - /** - * Unregister to receive slow call backs - */ - private void unregisterForSlowCallback() { - aCallBackService.unregisterForEvent("SLOW"); - } - - /** - * Method that is called when an Event is delivered. - * - * @param aEventName The name of the Event - * @param aEventData The Event data - */ - public void eventNotification(String aEventName, Object aEventData) { - // System.out.println("Received Event : " + aEventName + " " + aEventData); - - if (aEventName.equals("FAST")) { - final int newValue = FAST_CALLBACK_COUNT.incrementAndGet(); - //System.out.println("Received total of " + newValue + " fast call backs"); - } else if (aEventName.equals("SLOW")) { - final int newValue = SLOW_CALLBACK_COUNT.incrementAndGet(); - //System.out.println("Received total of " + newValue + " slow call backs"); - } else { - System.out.println("Unknown event type of " + aEventName); - } - } -} diff --git a/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java b/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java deleted file mode 100644 index 137ea6a658..0000000000 --- a/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java +++ /dev/null @@ -1,37 +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 org.apache.tuscany.sca.itest; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * The call back interface for the EventProcessorService that is implemented - * by the client to receive event notifications - */ -@Remotable -public interface EventProcessorCallBack { - /** - * Call back notifying client of an Event - * - * @param aEventName The name of the Event - * @param aEventData The data for the Event - */ - void eventNotification(String aEventName, Object aEventData); -} diff --git a/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java b/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java deleted file mode 100644 index 4bf05fc925..0000000000 --- a/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java +++ /dev/null @@ -1,45 +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 org.apache.tuscany.sca.itest; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -/** - * Sample Event Processor Service - */ -@Callback(EventProcessorCallBack.class) -@Remotable -public interface EventProcessorService { - - /** - * Registers the client to receive notifications for the specified event - * - * @param aEventName The name of the Event to register - */ - void registerForEvent(String aEventName); - - /** - * Unregisters the client so it no longer receives notifications for the specified event - * - * @param aEventName The name of the Event to unregister - */ - void unregisterForEvent(String aEventName); -} diff --git a/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java b/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java deleted file mode 100644 index bec98a49c9..0000000000 --- a/java/sca/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java +++ /dev/null @@ -1,195 +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 org.apache.tuscany.sca.itest; - -import java.util.Map; -import java.util.Timer; -import java.util.TimerTask; -import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; - -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * Sample Event Processor Service Implementation - */ -@Service(EventProcessorService.class) -@Scope("COMPOSITE") -public class EventProcessorServiceImpl implements EventProcessorService { - - /** - * Reference to the call back - */ - @Callback - protected ServiceReference<EventProcessorCallBack> clientCallback; - - /** - * This map contains the call backs for each of the registered Event names - */ - private final Map<String, ServiceReference<EventProcessorCallBack>> eventListeners; - - /** - * The list of all Event Generators we create - */ - private final EventGenerator[] allEventGenerators; - - /** - * Constructor. Starts the Event Generators - */ - public EventProcessorServiceImpl() { - eventListeners = new ConcurrentHashMap<String, ServiceReference<EventProcessorCallBack>>(); - - // We will simulate an Event generator - allEventGenerators = new EventGenerator[2]; - allEventGenerators[0] = new EventGenerator("FAST", 10); // Generate the FAST event every 10ms - allEventGenerators[1] = new EventGenerator("SLOW", 50); // Generate the SLOW event every 50ms - } - - /** - * Registers the client to receive notifications for the specified event - * - * @param aEventName The name of the Event to register - */ - public void registerForEvent(String aEventName) { - // Register for the Event - eventListeners.put(aEventName, clientCallback); - - // Send the "register" started event to the client - receiveEvent(aEventName, "SameThread: Registered to receive notifications for " + aEventName); - } - - /** - * Unregisters the client so it no longer receives notifications for the specified event - * - * @param aEventName The name of the Event to unregister - */ - public void unregisterForEvent(String aEventName) { - // Send the "register" started event to the client - receiveEvent(aEventName, "SameThread: Unregister from receiving notifications for " + aEventName); - - eventListeners.remove(aEventName); - } - - /** - * This method is called whenever the EventProcessorService receives an Event - * - * @param aEventName The name of the Event received - * @param aEventData The Event data - */ - private void receiveEvent(String aEventName, Object aEventData) { - // Get the listener for the Event - final ServiceReference<EventProcessorCallBack> callback = eventListeners.get(aEventName); - if (callback == null) { - //System.out.println("No registered listeners for " + aEventName); - return; - } - - // Trigger the call back - // System.out.println("Notifying " + callback + " of event " + aEventName); - callback.getService().eventNotification(aEventName, aEventData); - // System.out.println("Done notify " + callback + " of event " + aEventName); - } - - /** - * Shuts down the Event Processor - */ - @Destroy - public void shutdown() { - System.out.println("Shutting down the EventProcessor"); - - // Clear list of call back locations as we don't want to send any more notifications - eventListeners.clear(); - - // Stop the Event Generators - for (EventGenerator generator : allEventGenerators) { - generator.stop(); - } - } - - /** - * Utility class for generating Events - */ - private final class EventGenerator { - /** - * The Timer we are using to generate the events - */ - private final Timer timer = new Timer(); - - /** - * Lock object to ensure that we can cancel the timer cleanly. - */ - private final Object lock = new Object(); - - /** - * Constructor - * - * @param aEventName The name of the Event to generate - * @param frequencyInMilliseconds How frequently we should generate the Events - */ - private EventGenerator(String aEventName, int frequencyInMilliseconds) { - timer.schedule(new EventGeneratorTimerTask(aEventName), - frequencyInMilliseconds, - frequencyInMilliseconds); - } - - /** - * Stop this Event Generator - */ - private void stop() { - synchronized (lock) { - timer.cancel(); - } - } - - /** - * The TimerTask that is invoked by the Timer for the EventGenerator - */ - private final class EventGeneratorTimerTask extends TimerTask { - /** - * The name of the Event we should generate - */ - private final String eventName; - - /** - * Constructor - * - * @param aEventName The name of the Event we should generate - */ - private EventGeneratorTimerTask(String aEventName) { - eventName = aEventName; - } - - /** - * Timer calls this method and it will generate an Event - */ - - public void run() { - synchronized(lock) { - // System.out.println("Generating new event " + eventName); - receiveEvent(eventName, "Separate Thread Notification: " + UUID.randomUUID().toString()); - } - } - } - } -} diff --git a/java/sca/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite b/java/sca/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite deleted file mode 100644 index f803fb2ec9..0000000000 --- a/java/sca/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" targetNamespace="http://callback" name="CallBackSeparateThreadTest"> - - <component name="CallBackSeparateThreadClient"> - <implementation.java class="org.apache.tuscany.sca.itest.CallBackSeparateThreadClientImpl"/> - <reference name="aCallBackService" target="EventProcessorService"/> - </component> - - <component name="EventProcessorService"> - <implementation.java class="org.apache.tuscany.sca.itest.EventProcessorServiceImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java b/java/sca/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java deleted file mode 100644 index c216cab1be..0000000000 --- a/java/sca/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java +++ /dev/null @@ -1,73 +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 org.apache.tuscany.sca.itest; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This test case will attempt to trigger a call back using a separate thread - */ -public class CallBackSeparateThreadTestCase { - - /** - * The Node we are using - */ - private Node node; - - /** - * The client the tests should use - */ - private CallBackSeparateThreadClient aCallBackClient; - - /** - * Run the call back in separate thread tests - */ - @Test - public void testCallBackSeparateThread() { - aCallBackClient.runTests(); - } - - /** - * Load the Call back in separate thread composite and look up the client. - */ - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("CallBackSeparateThreadTest.composite"); - node = NodeFactory.newInstance().createNode("CallBackSeparateThreadTest.composite", new Contribution("c1", location)); - node.start(); - aCallBackClient = node.getService(CallBackSeparateThreadClient.class, "CallBackSeparateThreadClient"); - } - - /** - * Shutdown the SCA node - */ - - @After - public void tearDown() throws Exception { - node.stop(); - } -} diff --git a/java/sca/itest/component-type/pom.xml b/java/sca/itest/component-type/pom.xml deleted file mode 100644 index 4dc05305af..0000000000 --- a/java/sca/itest/component-type/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-component-type</artifactId> - <name>Apache Tuscany SCA iTest Component Type</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> - diff --git a/java/sca/itest/component-type/src/main/java/calculator/AddService.java b/java/sca/itest/component-type/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/java/sca/itest/component-type/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +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 calculator; - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/java/sca/itest/component-type/src/main/java/calculator/AddServiceImpl.java b/java/sca/itest/component-type/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 8b6fe066a6..0000000000 --- a/java/sca/itest/component-type/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,30 +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 calculator; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - return n1 + n2; - } - -} diff --git a/java/sca/itest/component-type/src/main/java/calculator/CalculatorClient.java b/java/sca/itest/component-type/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 6f978bd9be..0000000000 --- a/java/sca/itest/component-type/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,49 +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 calculator; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - String location = ContributionLocationHelper.getContributionLocation("Calculator.composite"); - Node node = NodeFactory.newInstance().createNode("Calculator.composite", new Contribution("c1", location)); - node.start(); - - CalculatorService calculatorService = - node.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorService"); - - // Calculate - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - node.stop(); - } -} diff --git a/java/sca/itest/component-type/src/main/java/calculator/CalculatorService.java b/java/sca/itest/component-type/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index c89043276e..0000000000 --- a/java/sca/itest/component-type/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,34 +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 calculator; - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/java/sca/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java b/java/sca/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 1209ac128a..0000000000 --- a/java/sca/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,63 +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 calculator; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - public void setAddService(AddService addService) { - this.addService = addService; - } - - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/java/sca/itest/component-type/src/main/java/calculator/DivideService.java b/java/sca/itest/component-type/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/java/sca/itest/component-type/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +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 calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/java/sca/itest/component-type/src/main/java/calculator/DivideServiceImpl.java b/java/sca/itest/component-type/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index f7ac0b7287..0000000000 --- a/java/sca/itest/component-type/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,30 +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 calculator; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - return n1 / n2; - } - -} diff --git a/java/sca/itest/component-type/src/main/java/calculator/MultiplyService.java b/java/sca/itest/component-type/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/java/sca/itest/component-type/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +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 calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/java/sca/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java b/java/sca/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index b7dca792b2..0000000000 --- a/java/sca/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,30 +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 calculator; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - return n1 * n2; - } - -} diff --git a/java/sca/itest/component-type/src/main/java/calculator/SubtractService.java b/java/sca/itest/component-type/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/java/sca/itest/component-type/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +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 calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/java/sca/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java b/java/sca/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 77b128ab8d..0000000000 --- a/java/sca/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,30 +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 calculator; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - return n1 - n2; - } - -} diff --git a/java/sca/itest/component-type/src/main/resources/Calculator.composite b/java/sca/itest/component-type/src/main/resources/Calculator.composite deleted file mode 100644 index ecee33e072..0000000000 --- a/java/sca/itest/component-type/src/main/resources/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="Calculator"> - - <component name="CalculatorServiceComponent"> - <implementation.java class="calculator.CalculatorServiceImpl"/> - <reference name="addService" target="AddServiceComponent/AddService"/> - <reference name="subtractService" target="SubtractServiceComponent/SubtractService"/> - <reference name="multiplyService" target="MultiplyServiceComponent/MultiplyService"/> - <reference name="divideService" target="DivideServiceComponent/DivideService"/> - </component> - - <component name="AddServiceComponent"> - <implementation.java class="calculator.AddServiceImpl"/> - </component> - - <component name="SubtractServiceComponent"> - <implementation.java class="calculator.SubtractServiceImpl"/> - </component> - - <component name="MultiplyServiceComponent"> - <implementation.java class="calculator.MultiplyServiceImpl"/> - </component> - - <component name="DivideServiceComponent"> - <implementation.java class="calculator.DivideServiceImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType b/java/sca/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType deleted file mode 100644 index 78e169deb4..0000000000 --- a/java/sca/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903">
- - <service name="AddService">
- <interface.java interface="calculator.AddService"/>
- </service>
- -</componentType>
-
\ No newline at end of file diff --git a/java/sca/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType b/java/sca/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType deleted file mode 100644 index 5d66becedf..0000000000 --- a/java/sca/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903">
- - <service name="CalculatorService">
- <interface.java interface="calculator.CalculatorService"/>
- </service>
-
- <reference name="addService">
- <interface.java interface="calculator.AddService"/>
- </reference>
-
- <reference name="subtractService">
- <interface.java interface="calculator.SubtractService"/>
- </reference>
-
- <reference name="multiplyService">
- <interface.java interface="calculator.MultiplyService"/>
- </reference>
-
- <reference name="divideService">
- <interface.java interface="calculator.DivideService"/>
- </reference>
- -</componentType>
-
\ No newline at end of file diff --git a/java/sca/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType b/java/sca/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType deleted file mode 100644 index 22236ae0d0..0000000000 --- a/java/sca/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903">
- - <service name="DivideService">
- <interface.java interface="calculator.DivideService"/>
- </service>
- -</componentType>
-
\ No newline at end of file diff --git a/java/sca/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType b/java/sca/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType deleted file mode 100644 index 2035d617e5..0000000000 --- a/java/sca/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903">
- - <service name="MultiplyService">
- <interface.java interface="calculator.MultiplyService"/>
- </service>
- -</componentType>
-
\ No newline at end of file diff --git a/java/sca/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType b/java/sca/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType deleted file mode 100644 index fe76f553be..0000000000 --- a/java/sca/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903">
- - <service name="SubtractService">
- <interface.java interface="calculator.SubtractService"/>
- </service>
- -</componentType>
-
\ No newline at end of file diff --git a/java/sca/itest/component-type/src/test/java/calculator/CalculatorTestCase.java b/java/sca/itest/component-type/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index ac3ccc3d08..0000000000 --- a/java/sca/itest/component-type/src/test/java/calculator/CalculatorTestCase.java +++ /dev/null @@ -1,60 +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 calculator; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the Calculator service component. - */ -public class CalculatorTestCase { - - private CalculatorService calculatorService; - private Node node; - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("Calculator.composite"); - node = NodeFactory.newInstance().createNode("Calculator.composite", new Contribution("c1", location)); - node.start(); - calculatorService = node.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorService"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - - @Test - public void testCalculator() throws Exception { - // Calculate - /* - assertEquals(calculatorService.add(3, 2), 5.0, 0.0); - assertEquals(calculatorService.subtract(3, 2), 1.0, 0.0); - assertEquals(calculatorService.multiply(3, 2), 6.0, 0.0); - assertEquals(calculatorService.divide(3, 2), 1.5, 0.0); - */ - } -} diff --git a/java/sca/itest/contribution-folder/pom.xml b/java/sca/itest/contribution-folder/pom.xml deleted file mode 100644 index 35e7bb03ae..0000000000 --- a/java/sca/itest/contribution-folder/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-folder</artifactId> - <name>Apache Tuscany SCA iTest Contribution Folder</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/contribution-folder/src/test/java/calculator/CalculatorService.java b/java/sca/itest/contribution-folder/src/test/java/calculator/CalculatorService.java deleted file mode 100644 index b4c677b371..0000000000 --- a/java/sca/itest/contribution-folder/src/test/java/calculator/CalculatorService.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 calculator; - -public interface CalculatorService { - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/java/sca/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java b/java/sca/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java deleted file mode 100644 index ef2a43c766..0000000000 --- a/java/sca/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java +++ /dev/null @@ -1,55 +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 test; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -import calculator.CalculatorService; - -/** - * Test SCADomain.newInstance and invocation of a service. - * - * @version $Rev$ $Date$ - */ -public class ContributionFolderTestCase extends TestCase { - - private Node node; - - @Override - protected void setUp() throws Exception { - node = NodeFactory.newInstance().createNode(new Contribution("foo", "src/test/resources/repository")); - node.start(); - } - - public void testInvoke() throws Exception { - CalculatorService service = node.getService(CalculatorService.class, "CalculatorServiceComponent"); - assertEquals(3.0, service.add(1, 2)); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite b/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite deleted file mode 100644 index f67b212d99..0000000000 --- a/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="Calculator"> - - <component name="CalculatorServiceComponent"> - <implementation.java class="calculator.CalculatorServiceImpl"/> - <reference name="addService" target="AddServiceComponent" /> - <reference name="subtractService" target="SubtractServiceComponent" /> - <reference name="multiplyService" target="MultiplyServiceComponent" /> - <reference name="divideService" target="DivideServiceComponent" /> - </component> - - <component name="AddServiceComponent"> - <implementation.java class="calculator.AddServiceImpl"/> - </component> - - <component name="SubtractServiceComponent"> - <implementation.java class="calculator.SubtractServiceImpl"/> - </component> - - <component name="MultiplyServiceComponent"> - <implementation.java class="calculator.MultiplyServiceImpl"/> - </component> - - <component name="DivideServiceComponent"> - <implementation.java class="calculator.DivideServiceImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml b/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml deleted file mode 100644 index 27a1ee74e4..0000000000 --- a/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:sample="http://sample"> - <deployable composite="sample:Calculator"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar b/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar Binary files differdeleted file mode 100644 index fe264693fe..0000000000 --- a/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar +++ /dev/null diff --git a/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar b/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar Binary files differdeleted file mode 100644 index d5dfb647d3..0000000000 --- a/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar +++ /dev/null diff --git a/java/sca/itest/contribution-folder/src/test/resources/repository3/contribution.zip b/java/sca/itest/contribution-folder/src/test/resources/repository3/contribution.zip Binary files differdeleted file mode 100644 index b293aa4bcc..0000000000 --- a/java/sca/itest/contribution-folder/src/test/resources/repository3/contribution.zip +++ /dev/null diff --git a/java/sca/itest/contribution-import-export/export-composite/pom.xml b/java/sca/itest/contribution-import-export/export-composite/pom.xml deleted file mode 100644 index 1ab420e93c..0000000000 --- a/java/sca/itest/contribution-import-export/export-composite/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.6-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-export-composite</artifactId> - <name>Apache Tuscany SCA iTest Contribution Export</name> - -<dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java b/java/sca/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java deleted file mode 100644 index 669821261c..0000000000 --- a/java/sca/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java +++ /dev/null @@ -1,30 +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 hello; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the Hello service. - */ -@Remotable -public interface Hello { - - public String getGreetings(String name); -} diff --git a/java/sca/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java b/java/sca/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java deleted file mode 100644 index ff9f6e75f3..0000000000 --- a/java/sca/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.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 hello; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(Hello.class) -public class HelloImpl implements Hello { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/java/sca/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index bea6f39932..0000000000 --- a/java/sca/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://hello" - xmlns:hello="http://hello"> - <deployable composite="hello:hello"/> - <export namespace="http://hello"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/contribution-import-export/export-composite/src/main/resources/hello.composite b/java/sca/itest/contribution-import-export/export-composite/src/main/resources/hello.composite deleted file mode 100644 index aeeab337fa..0000000000 --- a/java/sca/itest/contribution-import-export/export-composite/src/main/resources/hello.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://hello" - xmlns:hello="http://hello" - name="hello"> - - <service name="HelloService" promote="HelloServiceComponent"/> - - <component name="HelloServiceComponent"> - <implementation.java class="hello.HelloImpl" /> - </component> - -</composite> diff --git a/java/sca/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java b/java/sca/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java deleted file mode 100644 index 44614f243a..0000000000 --- a/java/sca/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java +++ /dev/null @@ -1,91 +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 org.apache.tuscany.sca.test.contribution; - -import hello.Hello; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -/** - * Tests that the helloworld server is available - */ -public class HelloTestCase extends TestCase { - private ClassLoader cl; - private EmbeddedSCADomain domain; - - @Override - protected void setUp() throws Exception { - // Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - // Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - URL helloURL = getContributionURL(Hello.class); - - // File helloContrib = new File("./target/classes/"); - // URL helloURL = helloContrib.toURL(); - Contribution consumerContribution = - contributionService.contribute("http://import-export/hello", helloURL, false); - Composite consumerComposite = consumerContribution.getDeployables().get(0); - domain.getDomainComposite().getIncludes().add(consumerComposite); - domain.buildComposite(consumerComposite); - - // Start Components from my composite - domain.getCompositeActivator().activate(consumerComposite); - domain.getCompositeActivator().start(consumerComposite); - } - - private URL getContributionURL(Class<?> cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cls.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - - public void testHello() throws IOException { - Hello hello = domain.getService(Hello.class, "HelloServiceComponent"); - assertNotNull(hello); - assertEquals(hello.getGreetings("lresende"), "Hello lresende"); - } - - @Override - public void tearDown() throws Exception { - domain.close(); - } - -} diff --git a/java/sca/itest/contribution-import-export/export-java/pom.xml b/java/sca/itest/contribution-import-export/export-java/pom.xml deleted file mode 100644 index cca05b9bb9..0000000000 --- a/java/sca/itest/contribution-import-export/export-java/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.6-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-export-java</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java Export</name> - -<dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java b/java/sca/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 268d90e910..0000000000 --- a/java/sca/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,30 +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/java/sca/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 7e11adcec7..0000000000 --- a/java/sca/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:helloworld="http://helloworld"> - <export.java package="helloworld"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType b/java/sca/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType deleted file mode 100644 index 5a14b41650..0000000000 --- a/java/sca/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * 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. ---> -<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - - <service name="HelloWorldService"> - <interface.java interface="helloworld.HelloWorldService" /> - </service> - -</componentType> -
\ No newline at end of file diff --git a/java/sca/itest/contribution-import-export/export-resource/pom.xml b/java/sca/itest/contribution-import-export/export-resource/pom.xml deleted file mode 100644 index d8133c4acc..0000000000 --- a/java/sca/itest/contribution-import-export/export-resource/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.6-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-export-resource</artifactId> - <name>Apache Tuscany SCA iTest Contribution Resource Export</name> - -</project> diff --git a/java/sca/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index f11eacb416..0000000000 --- a/java/sca/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://store" - xmlns:helloworld="http://store"> - <export.resource uri="ufservices/store.html"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html b/java/sca/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html deleted file mode 100644 index 1ff281373a..0000000000 --- a/java/sca/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html +++ /dev/null @@ -1,27 +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. ---> -<html> -<head> -<title>Store</TITLE> -</head> - -<body> -<h1>Sample Store Page</h1> -</body> -</html> diff --git a/java/sca/itest/contribution-import-export/export-wsdl/pom.xml b/java/sca/itest/contribution-import-export/export-wsdl/pom.xml deleted file mode 100644 index 7c504aee50..0000000000 --- a/java/sca/itest/contribution-import-export/export-wsdl/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.6-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-export-wsdl</artifactId> - <name>Apache Tuscany SCA iTest Contribution WSDL Export</name> - -</project> diff --git a/java/sca/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 8254b667f2..0000000000 --- a/java/sca/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:helloworld="http://helloworld"> - <export namespace="http://helloworld"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl b/java/sca/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl deleted file mode 100644 index 0172fb2c7c..0000000000 --- a/java/sca/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> - -<wsdl:definitions targetNamespace="http://helloworld" - xmlns:tns="http://helloworld" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="helloworld"> - - <wsdl:types> - <schema xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:tns2="http://helloworld2" - targetNamespace="http://helloworld" - elementFormDefault="qualified"> - - <xsd:import namespace="http://helloworld2" schemaLocation="helloworld.xsd" /> - - <element name="getGreetings" type="tns2:getGreetingsType"/> - <element name="getGreetingsResponse" type="tns2:getGreetingsResponseType"/> - - </schema> - </wsdl:types> - - <wsdl:message name="getGreetingsRequest"> - <wsdl:part element="tns:getGreetings" name="parameters"/> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part element="tns:getGreetingsResponse" name="parameters"/> - </wsdl:message> - - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/> - <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="getGreetingsResponse"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="HelloWorldService"> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort"> - <wsdlsoap:address location="http://localhost:8085/HelloWorldServiceComponent"/> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/java/sca/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd b/java/sca/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd deleted file mode 100644 index d49e2ead99..0000000000 --- a/java/sca/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<schema targetNamespace="http://helloworld2" - xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:ns="http://helloworld2"> - - <complexType name="getGreetingsType"> - <sequence> - <element name="name" type="string"/> - </sequence> - </complexType> - - <complexType name="getGreetingsResponseType"> - <sequence> - <element name="getGreetingsReturn" type="string"/> - </sequence> - </complexType> -</schema>
\ No newline at end of file diff --git a/java/sca/itest/contribution-import-export/import-composite/pom.xml b/java/sca/itest/contribution-import-export/import-composite/pom.xml deleted file mode 100644 index 40dab26baa..0000000000 --- a/java/sca/itest/contribution-import-export/import-composite/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.6-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-import-composite</artifactId> - <name>Apache Tuscany SCA iTest Contribution Import</name> - -<dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-export-composite</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java b/java/sca/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index c062afaed0..0000000000 --- a/java/sca/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,38 +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 hello.Hello; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - @Reference - protected Hello helloServiceRef; - - public String getGreetings(String name) { - return helloServiceRef.getGreetings(name); - } - -} diff --git a/java/sca/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java b/java/sca/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index e03ed4dc25..0000000000 --- a/java/sca/itest/contribution-import-export/import-composite/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("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/java/sca/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java b/java/sca/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 268d90e910..0000000000 --- a/java/sca/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,30 +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/java/sca/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 130aa91093..0000000000 --- a/java/sca/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:helloworld="http://helloworld" - xmlns:hello="http://hello"> - <deployable composite="helloworld:helloworldws"/> - <import namespace="http://hello"/> - <!-- import namespace="http://hello" location="http://import-export/contrib-composite"/ --> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl b/java/sca/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl deleted file mode 100644 index 0172fb2c7c..0000000000 --- a/java/sca/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> - -<wsdl:definitions targetNamespace="http://helloworld" - xmlns:tns="http://helloworld" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="helloworld"> - - <wsdl:types> - <schema xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:tns2="http://helloworld2" - targetNamespace="http://helloworld" - elementFormDefault="qualified"> - - <xsd:import namespace="http://helloworld2" schemaLocation="helloworld.xsd" /> - - <element name="getGreetings" type="tns2:getGreetingsType"/> - <element name="getGreetingsResponse" type="tns2:getGreetingsResponseType"/> - - </schema> - </wsdl:types> - - <wsdl:message name="getGreetingsRequest"> - <wsdl:part element="tns:getGreetings" name="parameters"/> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part element="tns:getGreetingsResponse" name="parameters"/> - </wsdl:message> - - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/> - <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="getGreetingsResponse"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="HelloWorldService"> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort"> - <wsdlsoap:address location="http://localhost:8085/HelloWorldServiceComponent"/> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/java/sca/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd b/java/sca/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd deleted file mode 100644 index d49e2ead99..0000000000 --- a/java/sca/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<schema targetNamespace="http://helloworld2" - xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:ns="http://helloworld2"> - - <complexType name="getGreetingsType"> - <sequence> - <element name="name" type="string"/> - </sequence> - </complexType> - - <complexType name="getGreetingsResponseType"> - <sequence> - <element name="getGreetingsReturn" type="string"/> - </sequence> - </complexType> -</schema>
\ No newline at end of file diff --git a/java/sca/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite b/java/sca/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite deleted file mode 100644 index 44ceba1240..0000000000 --- a/java/sca/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:helloworld="http://helloworld" - xmlns:hello="http://hello" - name="helloworldws"> - - <component name="SourceHelloServiceComponent"> - <implementation.composite name="hello:hello"/> - </component> - - <component name="HelloWorldServiceComponent"> - <service name="HelloWorldService"> - <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" /> - <binding.ws uri="http://localhost:8085/HelloWorldService"/> - </service> - <implementation.java class="helloworld.HelloWorldImpl" /> - <reference name="helloServiceRef" target="SourceHelloServiceComponent/HelloService"/> - </component> - -</composite> diff --git a/java/sca/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java b/java/sca/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java deleted file mode 100644 index 3cc6784eca..0000000000 --- a/java/sca/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java +++ /dev/null @@ -1,126 +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 org.apache.tuscany.test.contribution; - -import hello.Hello; -import helloworld.HelloWorldService; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.Socket; -import java.net.URL; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -/** - * Tests that the helloworld server is available - */ -public class HelloWorldServerTestCase extends TestCase { - private ClassLoader cl; - private EmbeddedSCADomain domain; - private Contribution helloWorldContribution; - private Contribution compositeContribution; - - @Override - protected void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - // File compositeContribLocation = new File("../export-composite/target/classes"); - // URL compositeContribURL = compositeContribLocation.toURL(); - URL compositeContribURL = getContributionURL(Hello.class); - compositeContribution = - contributionService.contribute("http://import-export/export-composite", compositeContribURL, false); - for (Composite deployable : compositeContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - -// File helloWorldContribLocation = new File("./target/classes/"); -// URL helloWorldContribURL = helloWorldContribLocation.toURL(); - URL helloWorldContribURL = getContributionURL(HelloWorldService.class); - helloWorldContribution = - contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false); - for (Composite deployable : helloWorldContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - // Start Components from my composite - for (Composite deployable : helloWorldContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - } - - private URL getContributionURL(Class<?> cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cls.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService = - domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - - assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); - } - - @Override - public void tearDown() throws Exception { - ContributionService contributionService = domain.getContributionService(); - - // Remove the contribution from the in-memory repository - contributionService.remove("http://import-export/helloworld"); - contributionService.remove("http://import-export/export-composite"); - - //Stop Components from my composite - for (Composite deployable : helloWorldContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - - domain.stop(); - domain.close(); - } - -} diff --git a/java/sca/itest/contribution-import-export/import-java/pom.xml b/java/sca/itest/contribution-import-export/import-java/pom.xml deleted file mode 100644 index 91eb35d6c1..0000000000 --- a/java/sca/itest/contribution-import-export/import-java/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.6-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-import-java</artifactId> - <name>Apache Tuscany SCA iTest Contribution Java Import</name> - -<dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-export-java</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java b/java/sca/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 0de3c70303..0000000000 --- a/java/sca/itest/contribution-import-export/import-java/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/java/sca/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 224e2c4d79..0000000000 --- a/java/sca/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://helloworld"
- xmlns:helloworld="http://helloworld">
- <deployable composite="helloworld:helloworldws"/>
- <import.java package="helloworld"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite b/java/sca/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite deleted file mode 100644 index a53117e72f..0000000000 --- a/java/sca/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:helloworld="http://helloworld" - name="helloworldws"> - - <component name="HelloWorldServiceComponent"> - <implementation.java class="helloworld.HelloWorldImpl" /> - </component> - -</composite> diff --git a/java/sca/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java b/java/sca/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java deleted file mode 100644 index 9bc94525e0..0000000000 --- a/java/sca/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java +++ /dev/null @@ -1,127 +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 org.apache.tuscany.sca.test.contribution; - -import helloworld.HelloWorldImpl; -import helloworld.HelloWorldService; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -/** - * Tests that the helloworld server is available - */ -public class HelloWorldServerTestCase extends TestCase { - private ClassLoader cl; - private EmbeddedSCADomain domain; - private Contribution helloWorldContribution; - private Contribution javaContribution; - - @Override - protected void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - //File javaContribLocation = new File("../export-java/target/classes"); - //URL javaContribURL = javaContribLocation.toURL(); - URL javaContribURL = getContributionURL(HelloWorldService.class); - javaContribution = contributionService.contribute("http://import-export/export-java", javaContribURL, false); - for (Composite deployable : javaContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - //File helloWorldContribLocation = new File("./target/classes/"); - //URL helloWorldContribURL = helloWorldContribLocation.toURL(); - URL helloWorldContribURL = getContributionURL(HelloWorldImpl.class); - helloWorldContribution = contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false); - for (Composite deployable : helloWorldContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - // Start Components from my composite - for (Composite deployable : helloWorldContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - } - - private URL getContributionURL(Class<?> cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cls.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - - public void testPing() throws IOException { - HelloWorldService helloWorldService = - domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - assertEquals("Hello test", helloWorldService.getGreetings("test")); - } - - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService = - domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - - assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); - } - - @Override - public void tearDown() throws Exception { - ContributionService contributionService = domain.getContributionService(); - - // Remove the contribution from the in-memory repository - contributionService.remove("http://import-export/helloworld"); - contributionService.remove("http://import-export/export-java"); - - // Stop Components from my composite - for (Composite deployable : helloWorldContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - - domain.stop(); - - domain.close(); - } - -} diff --git a/java/sca/itest/contribution-import-export/import-resource/pom.xml b/java/sca/itest/contribution-import-export/import-resource/pom.xml deleted file mode 100644 index 0696df1951..0000000000 --- a/java/sca/itest/contribution-import-export/import-resource/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.6-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-import-resource</artifactId> - <name>Apache Tuscany SCA iTest Contribution Resource Import</name> - -<dependencies> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-export-resource</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-http</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-http-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-resource-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution-resource</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index ac6d7becb3..0000000000 --- a/java/sca/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://store" - xmlns:store="http://store"> - <deployable composite="store:store"/> - <import.resource uri="ufservices/store.html"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/contribution-import-export/import-resource/src/main/resources/store.composite b/java/sca/itest/contribution-import-export/import-resource/src/main/resources/store.composite deleted file mode 100644 index bb5a7b764f..0000000000 --- a/java/sca/itest/contribution-import-export/import-resource/src/main/resources/store.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - targetNamespace="http://store" - xmlns:helloworld="http://store" - name="store"> - - <component name="store"> - <tuscany:implementation.resource location="ufservices/store.html"/> - <service name="Resource"> - <tuscany:binding.http uri="http://127.0.0.1:8085"/> - </service> - </component> - -</composite> diff --git a/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java b/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java deleted file mode 100644 index 1b7542b7d9..0000000000 --- a/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java +++ /dev/null @@ -1,129 +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 org.apache.tuscany.sca.test.contribution; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.Socket; -import java.net.URL; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -/** - * Tests that the helloworld server is available - */ -public class StoreTestCase extends TestCase { - private ClassLoader cl; - private EmbeddedSCADomain domain; - private Contribution storeContribution; - private Contribution resourceContribution; - - @Override - protected void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - URL javaContribURL = getContributionURL(cl, "ufservices/store.html"); - resourceContribution = contributionService.contribute("http://import-export/export-resource", javaContribURL, false); - for (Composite deployable : resourceContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - URL storeContributionURL = getContributionURL(cl, "store.composite"); - - storeContribution = - contributionService.contribute("http://import-export/store", storeContributionURL, false); - for (Composite deployable : storeContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - // Start Components from my composite - for (Composite deployable : storeContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - - @Override - public void tearDown() throws Exception { - ContributionService contributionService = domain.getContributionService(); - - // Remove the contribution from the in-memory repository - contributionService.remove("http://import-export/store"); - contributionService.remove("http://import-export/export-resource"); - - // Stop Components from my composite - for (Composite deployable : storeContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - - domain.stop(); - - domain.close(); - } - - - /** - * Utility methods - */ - - - private URL getContributionURL(ClassLoader cl, Class<?> cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cl.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - - private URL getContributionURL(ClassLoader cl, String uri) throws MalformedURLException { - URL url = cl.getResource(uri); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - uri.length()); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } -} diff --git a/java/sca/itest/contribution-import-export/import-wsdl/pom.xml b/java/sca/itest/contribution-import-export/import-wsdl/pom.xml deleted file mode 100644 index 3d8b5e85c3..0000000000 --- a/java/sca/itest/contribution-import-export/import-wsdl/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.6-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-import-wsdl</artifactId> - <name>Apache Tuscany SCA iTest Contribution WSDL Import</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-contribution-export-wsdl</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java b/java/sca/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 0de3c70303..0000000000 --- a/java/sca/itest/contribution-import-export/import-wsdl/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/java/sca/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java b/java/sca/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index e03ed4dc25..0000000000 --- a/java/sca/itest/contribution-import-export/import-wsdl/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("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/java/sca/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java b/java/sca/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 268d90e910..0000000000 --- a/java/sca/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,30 +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/java/sca/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index a47b9a71e9..0000000000 --- a/java/sca/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:helloworld="http://helloworld"> - <deployable composite="helloworld:helloworldws"/> - <import namespace="http://helloworld" location="http://import-export/export-wsdl"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite b/java/sca/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite deleted file mode 100644 index 76ccf71fb8..0000000000 --- a/java/sca/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:hw="http://helloworld" - name="helloworldws"> - - <component name="HelloWorldServiceComponent"> - <service name="HelloWorldService"> - <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" /> - <binding.ws uri="http://localhost:8085/HelloWorldService"/> - </service> - <implementation.java class="helloworld.HelloWorldImpl" /> - </component> - -</composite> diff --git a/java/sca/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java b/java/sca/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java deleted file mode 100644 index 66227eacaa..0000000000 --- a/java/sca/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java +++ /dev/null @@ -1,137 +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 org.apache.tuscany.sca.test.contribution; - -import helloworld.HelloWorldService; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.Socket; -import java.net.URL; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -/** - * Tests that the helloworld server is available - */ -public class HelloWorldServerTestCase extends TestCase { - private ClassLoader cl; - private EmbeddedSCADomain domain; - private Contribution wsdlContribution; - private Contribution consumerContribution; - - @Override - protected void setUp() throws Exception { - // Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - // File wsdlContribLocation = new File("../export-wsdl/target/classes"); - // URL wsdlContribURL = wsdlContribLocation.toURL(); - URL wsdlContribURL = getContributionURL(getClass().getClassLoader(), "helloworld.wsdl"); - wsdlContribution = contributionService.contribute("http://import-export/export-wsdl", wsdlContribURL, false); - for (Composite deployable : wsdlContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - // File helloWorldContribLocation = new File("./target/classes/"); - // URL helloWorldContribURL = helloWorldContribLocation.toURL(); - URL helloWorldContribURL = getContributionURL(HelloWorldService.class); - consumerContribution = - contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false); - for (Composite deployable : consumerContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - // Start Components from my composite - for (Composite deployable : consumerContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - private URL getContributionURL(Class<?> cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cls.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - - private URL getContributionURL(ClassLoader cl, String flag) throws MalformedURLException { - URL url = cl.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length()); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - // System.out.println(url); - return url; - } - - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService = - domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - - assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); - } - - @Override - public void tearDown() throws Exception { - ContributionService contributionService = domain.getContributionService(); - - // Remove the contribution from the in-memory repository - contributionService.remove("http://import-export/helloworld"); - contributionService.remove("http://import-export/export-wsdl"); - - // Stop Components from my composite - for (Composite deployable : consumerContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - - domain.stop(); - - domain.close(); - } - -} diff --git a/java/sca/itest/contribution-import-export/pom.xml b/java/sca/itest/contribution-import-export/pom.xml deleted file mode 100644 index e64ff002e1..0000000000 --- a/java/sca/itest/contribution-import-export/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.6-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-import-export</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Contribution Import/Export Integration Tests</name> - - <modules> - <module>export-composite</module> - <module>export-java</module> - <module>export-resource</module> - <module>export-wsdl</module> - <module>import-composite</module> - <module>import-java</module> - <module>import-resource</module> - <module>import-wsdl</module> - </modules> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution-impl</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - </dependencies> -</project> diff --git a/java/sca/itest/contribution-zip/pom.xml b/java/sca/itest/contribution-zip/pom.xml deleted file mode 100644 index ecffbc155a..0000000000 --- a/java/sca/itest/contribution-zip/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-contribution-zip</artifactId> - <name>Apache Tuscany SCA iTest Contribution ZIP</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/java/sca/itest/contribution-zip/src/test/java/calculator/CalculatorService.java b/java/sca/itest/contribution-zip/src/test/java/calculator/CalculatorService.java deleted file mode 100644 index b4c677b371..0000000000 --- a/java/sca/itest/contribution-zip/src/test/java/calculator/CalculatorService.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 calculator; - -public interface CalculatorService { - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/java/sca/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java b/java/sca/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java deleted file mode 100644 index 303e2a6d9a..0000000000 --- a/java/sca/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java +++ /dev/null @@ -1,56 +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 org.apache.tuscany.sca.contribution.zip; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -import calculator.CalculatorService; - -/** - * Test SCADomain.newInstance and invocation of a service. - * - * @version $Rev$ $Date$ - */ -public class ContributionZIPTestCase extends TestCase { - - private Node node; - - @Override - protected void setUp() throws Exception { - node = - NodeFactory.newInstance().createNode(new Contribution("foo", - "src/test/resources/repository/contribution.zip")); - node.start(); - } - - public void testInvoke() throws Exception { - CalculatorService service = node.getService(CalculatorService.class, "CalculatorServiceComponent"); - assertEquals(3.0, service.add(1, 2)); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/java/sca/itest/contribution-zip/src/test/resources/repository/contribution.zip b/java/sca/itest/contribution-zip/src/test/resources/repository/contribution.zip Binary files differdeleted file mode 100644 index 3239ae1242..0000000000 --- a/java/sca/itest/contribution-zip/src/test/resources/repository/contribution.zip +++ /dev/null diff --git a/java/sca/itest/distribution/bin-distro-unzip/build.xml b/java/sca/itest/distribution/bin-distro-unzip/build.xml deleted file mode 100644 index 68e15d4a8b..0000000000 --- a/java/sca/itest/distribution/bin-distro-unzip/build.xml +++ /dev/null @@ -1,24 +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. ---> -<project name="itest-unzip" default="unzip"> - <target name="unzip"> - <unzip src="../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.zip" - dest="../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}-dir"/> - </target> -</project> diff --git a/java/sca/itest/distribution/bin-distro-unzip/pom.xml b/java/sca/itest/distribution/bin-distro-unzip/pom.xml deleted file mode 100644 index d58e479f93..0000000000 --- a/java/sca/itest/distribution/bin-distro-unzip/pom.xml +++ /dev/null @@ -1,128 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>itest-distribution</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-bin-distro-unzip</artifactId>
- <name>Apache Tuscany SCA iTest Bin Distro Unzip</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-distribution-all</artifactId>
- <type>pom</type>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-
- <!-- HACK: use profile to control if we need to add tools.jar -->
- <!-- Mac OS doesn't have tools.jar -->
- <profiles>
- <profile>
- <id>not-sun-jdk</id>
- <activation>
- <file>
- <missing>${java.home}/../lib/tools.jar</missing>
- </file>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>run-samples</id>
- <phase>verify</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="java.home" value="${java.home}"/> - <property name="tuscany.version" value="${version}" />
- <ant antfile="./build.xml" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>sun-jdk</id>
- <activation>
- <file>
- <exists>${java.home}/../lib/tools.jar</exists>
- </file>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
-
- <dependencies>
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant-trax</artifactId>
- <version>1.6.5</version>
- </dependency>
- <!-- this JDk dependency is a workaround for Maven bug - http://jira.codehaus.org/browse/MNG-1323 -->
- <dependency>
- <groupId>sun.jdk</groupId>
- <artifactId>tools</artifactId>
- <version>1.6</version>
- <scope>system</scope>
- <systemPath>${java.home}/../lib/tools.jar</systemPath>
- </dependency>
- </dependencies>
-
- <executions>
- <execution>
- <id>run-samples</id>
- <phase>verify</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="java.home" value="${java.home}"/>
- <property name="tuscany.version" value="${version}" />
- <ant antfile="./build.xml" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
diff --git a/java/sca/itest/distribution/binding-ws-calculator/build.xml b/java/sca/itest/distribution/binding-ws-calculator/build.xml deleted file mode 100644 index ed22bce2dc..0000000000 --- a/java/sca/itest/distribution/binding-ws-calculator/build.xml +++ /dev/null @@ -1,40 +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. ---> -<project name="itest-samples" default="run"> - - <echo>${java.home}</echo> - <!-- - compile and run each sample as though the user were running - samples from the binary distribution. Here we use ant targets - in the first instance but for some tests we may want to run - jars directly or fire up webapp containers and deploy wars. In other cases - we may need to run two samples together to provide reference and - service sides of the sample. - --> - - <property name="distro.root" value="../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}-dir/tuscany-sca-${tuscany.version}" /> - - <target name="run"> - - <ant antfile="build.xml" - dir="${distro.root}/samples/binding-ws-calculator"/> - - </target> - -</project> diff --git a/java/sca/itest/distribution/binding-ws-calculator/pom.xml b/java/sca/itest/distribution/binding-ws-calculator/pom.xml deleted file mode 100644 index 3f4cb4b536..0000000000 --- a/java/sca/itest/distribution/binding-ws-calculator/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-distribution</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-distribution-binding-ws-calculator</artifactId> - <name>Apache Tuscany SCA iTest Distribution binding-ws-calculator</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-bin-distro-unzip</artifactId> - <type>pom</type> - <version>2.0-SNAPSHOT</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <execution> - <id>run-samples</id> - <phase>verify</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <property name="java.home" value="${java.home}"/> - <property name="tuscany.version" value="${version}" /> - <ant antfile="./build.xml" target="run"/> - </tasks> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/java/sca/itest/distribution/calculator-rmi/build.xml b/java/sca/itest/distribution/calculator-rmi/build.xml deleted file mode 100644 index 25abf4e040..0000000000 --- a/java/sca/itest/distribution/calculator-rmi/build.xml +++ /dev/null @@ -1,51 +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. ---> -<project name="itest-samples" default="run"> - - <!-- - compile and run each sample as though the user were running - samples from the binary distribution. Here we use ant targets - in the first instance but for some tests we may want to run - jars directly or fire up webapp containers and deploy wars. In other cases - we may need to run two samples together to provide reference and - service sides of the sample. - --> - - <property name="distro.root" value="../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}-dir/tuscany-sca-${tuscany.version}" /> - - <target name="run"> - - <parallel> - - <daemons> - <ant antfile="build.xml" - dir="${distro.root}/samples/calculator-rmi-service"/> - </daemons> - - <sequential> - <sleep seconds="15"/> - <ant antfile="build.xml" - dir="${distro.root}/samples/calculator-rmi-reference"/> - </sequential> - - </parallel> - - </target> - -</project> diff --git a/java/sca/itest/distribution/calculator-rmi/pom.xml b/java/sca/itest/distribution/calculator-rmi/pom.xml deleted file mode 100644 index faf6132fbd..0000000000 --- a/java/sca/itest/distribution/calculator-rmi/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-distribution</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-distribution-calculator-rmi</artifactId> - <name>Apache Tuscany SCA iTest Distribution calculator-rmi</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-bin-distro-unzip</artifactId> - <type>pom</type> - <version>2.0-SNAPSHOT</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <execution> - <id>run-samples</id> - <phase>verify</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <property name="tuscany.version" value="${version}" /> - <ant antfile="./build.xml" target="run"/> - </tasks> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/java/sca/itest/distribution/implementation-java-calculator/build.xml b/java/sca/itest/distribution/implementation-java-calculator/build.xml deleted file mode 100644 index 106fee758c..0000000000 --- a/java/sca/itest/distribution/implementation-java-calculator/build.xml +++ /dev/null @@ -1,40 +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. ---> -<project name="itest-samples" default="run"> - - <echo>${java.home}</echo> - <!-- - compile and run each sample as though the user were running - samples from the binary distribution. Here we use ant targets - in the first instance but for some tests we may want to run - jars directly or fire up webapp containers and deploy wars. In other cases - we may need to run two samples together to provide reference and - service sides of the sample. - --> - - <property name="distro.root" value="../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}-dir/tuscany-sca-${tuscany.version}" /> - - <target name="run"> - - <ant antfile="build.xml" - dir="${distro.root}/samples/implementation-java-calculator"/> - - </target> - -</project> diff --git a/java/sca/itest/distribution/implementation-java-calculator/pom.xml b/java/sca/itest/distribution/implementation-java-calculator/pom.xml deleted file mode 100644 index 584b7ca5e9..0000000000 --- a/java/sca/itest/distribution/implementation-java-calculator/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-distribution</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-distribution-implementation-java-calculator</artifactId> - <name>Apache Tuscany SCA iTest Distribution implementation-java-calculator</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-bin-distro-unzip</artifactId> - <type>pom</type> - <version>2.0-SNAPSHOT</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <version>1.3</version> - - <dependencies> - <dependency> - <groupId>ant</groupId> - <artifactId>ant-trax</artifactId> - <version>1.6.5</version> - </dependency> - <!-- this JDk dependency is a workaround for Maven bug - http://jira.codehaus.org/browse/MNG-1323 --> - <dependency> - <groupId>sun.jdk</groupId> - <artifactId>tools</artifactId> - <version>1.6</version> - <scope>system</scope> - <systemPath>${java.home}/../lib/tools.jar</systemPath> - </dependency> - </dependencies> - - <executions> - <execution> - <id>run-samples</id> - <phase>verify</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <property name="tuscany.version" value="${version}" /> - <property name="java.home" value="${java.home}"/> - <ant antfile="./build.xml" target="run"/> - </tasks> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/java/sca/itest/distribution/legal-checks/pom.xml b/java/sca/itest/distribution/legal-checks/pom.xml deleted file mode 100644 index c5f118458f..0000000000 --- a/java/sca/itest/distribution/legal-checks/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-distribution</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-distribution-legal-checks</artifactId> - <name>Apache Tuscany SCA iTest Distribution Legal Checks</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-bin-distro-unzip</artifactId> - <type>pom</type> - <version>2.0-SNAPSHOT</version> - </dependency> - </dependencies> - - <build> - </build> -</project> diff --git a/java/sca/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java b/java/sca/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java deleted file mode 100644 index 2cbbe57125..0000000000 --- a/java/sca/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java +++ /dev/null @@ -1,162 +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 itest; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.StringTokenizer; - -import org.junit.Test; - -/** - * Checks that all jar files included in the distribution are mentioned in the LICENSE file - * and that all jars mentioned in the LICENSE are in the distribution. - */ -public class JarsInLICENSETestCase { - - @Test - public void testJars() throws Exception { - File distroRoot = getUnzipedDistroRoot(); - - File licenseFile = new File(distroRoot, "LICENSE"); - if (!licenseFile.exists()) { - throw new IllegalStateException("can't find LICENSE file at: " + licenseFile.getAbsoluteFile().toString()); - } - - File libDirectory = new File(distroRoot, "modules"); - if (!libDirectory.exists()) { - throw new IllegalStateException("can't find modules folder at: " + libDirectory.getAbsoluteFile().toString()); - } - - List<String> jars = getJarsInDistro(libDirectory); - - List<String> bad2 = getLICENSEJarsNotInDistro(licenseFile, jars); - if (bad2.size() > 0) { - System.err.println("Jars in LICENSE but not in Distribution: " + bad2); - } - - List<String> bad1 = getJarsNotInLICENSE(jars, licenseFile); - if (bad1.size() > 0) { - System.err.println("Jars in distribution but not in LICENSE: " + bad1); - } - - if (bad1.size() > 0 || bad2.size() > 0) { - throw new IllegalStateException("LICENSE problems, check log"); - } - } - - private List<String> getLICENSEJarsNotInDistro(File licenseFile, List<String> jars) throws IOException { - List<String> badJars = new ArrayList<String>(); - BufferedReader reader = new BufferedReader(new FileReader(licenseFile)); - String line = null; - while ((line = reader.readLine()) != null) { - line = line.trim(); - if (line.contains(".jar")) { - StringTokenizer st = new StringTokenizer(line); - while (st.hasMoreTokens()) { - String s = st.nextToken(); - if (s.contains(".jar")) { - if (s.startsWith("(")) { - s = s.substring(1); - } - if (s.endsWith(",") || s.endsWith(":")) { - s = s.substring(0, s.length()-1); - } - if (s.endsWith(")")) { - s = s.substring(0, s.length()-1); - } - if (!jars.contains(s) && !s.startsWith("tuscany-")) { - badJars.add(s); - } - } - } - } - } - return badJars; - } - - private List<String> getJarsNotInLICENSE(List<String> jars, File licenseFile) throws IOException { - List<String> badJars = new ArrayList<String>(); - String licenseText = readLICENSE(licenseFile); - for (String jar : jars) { - if (!licenseText.contains(jar)) { - if (jar.startsWith("tuscany-")) { - // ignore tuscany jars as they're not mentioned in the LICENSE file - } else { - badJars.add(jar); - } - } - } - return badJars; - } - - private List<String> getJarsInDistro(File directory) { - List<String> jars = new ArrayList<String>(); - for (String fn : directory.list()){ - if (fn.endsWith(".jar")) { - jars.add(fn); - } else { - File f = new File(directory, fn); - if (f.isDirectory()) { - jars.addAll(getJarsInDistro(f)); - } - } - } - return jars; - } - - private File getUnzipedDistroRoot() { - File distroTarget = new File("../../../distribution/all/target"); - File root = null; - for (String f : distroTarget.list()) { - if (f.endsWith("-dir")) { - root = new File(distroTarget, f); - break; - } - } - if (root == null) { - throw new IllegalStateException("can't find distro root"); - } - if (root.list().length != 1) { - throw new IllegalStateException("expecting one directory in distro root"); - } - root = new File(root, root.list()[0]); - return root; - } - - private static String readLICENSE(File licenseFile) throws java.io.IOException { - StringBuffer fileData = new StringBuffer(); - BufferedReader reader = new BufferedReader(new FileReader(licenseFile)); - char[] buf = new char[1024]; - int numRead = 0; - while ((numRead = reader.read(buf)) != -1) { - String readData = String.valueOf(buf, 0, numRead); - fileData.append(readData); - buf = new char[1024]; - } - reader.close(); - return fileData.toString(); - } - -} diff --git a/java/sca/itest/distribution/pom.xml b/java/sca/itest/distribution/pom.xml deleted file mode 100644 index f8809b5ab2..0000000000 --- a/java/sca/itest/distribution/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <packaging>pom</packaging> - <artifactId>itest-distribution</artifactId> - <name>Apache Tuscany SCA iTest Distribution</name> - - <build> - <defaultGoal>install</defaultGoal> - </build> - - <modules> - <module>bin-distro-unzip</module> - <module>binding-ws-calculator</module> - <module>calculator-rmi</module> - <module>implementation-java-calculator</module> - <module>legal-checks</module> - <module>webapp-helloworld</module> - <module>webapp-helloworld-bpel</module> - <module>webapp-helloworld-js-client</module> - <module>webapp-helloworld-jsp</module> - <module>webapp-helloworld-servlet</module> - <module>webapp-helloworld-stripes</module> - </modules> - -</project> diff --git a/java/sca/itest/distribution/webapp-helloworld-bpel/pom.xml b/java/sca/itest/distribution/webapp-helloworld-bpel/pom.xml deleted file mode 100644 index e1c8a508f5..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-bpel/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-distribution</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-distribution-webapp-helloworld-bpel</artifactId> - <name>Apache Tuscany SCA iTest Distribution Webapp helloworld-bpel</name> - - <dependencies> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-bin-distro-unzip</artifactId> - <type>pom</type> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>helloworld-bpel</artifactId> - <type>war</type> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>htmlunit</groupId> - <artifactId>htmlunit</artifactId> - <version>1.9</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.codehaus.cargo</groupId> - <artifactId>cargo-maven2-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>start-container</id> - <phase>compile</phase> - <goals> - <goal>start</goal> - </goals> - </execution> - <execution> - <id>stop-container</id> - <phase>post-integration-test</phase> - <goals> - <goal>stop</goal> - </goals> - </execution> - </executions> - <configuration> - <wait>false</wait> - <container> - <containerId>jetty6x</containerId> - <type>embedded</type> - <systemProperties> - <org.apache.commons.logging.Log>org.apache.commons.logging.impl.SimpleLog</org.apache.commons.logging.Log> - </systemProperties> - </container> - <!-- container> - <containerId>tomcat6x</containerId> - <home>/Tomcat/apache-tomcat-6.0.18</home> - </container --> - <configuration> - <home>${project.build.directory}/cargo-jetty</home> - <properties> - <!-- NOTE: remote debugging doesn't work with the embedded Jetty container. To remote debug - uncomment/comment the container above to be the Tomcat container and set home to point - to your local Tomcat installation --> - <cargo.jvmargs><![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y]]></cargo.jvmargs> - <cargo.servlet.port>8085</cargo.servlet.port> - <context>helloworld-bpel</context> - </properties> - <deployables> - <deployable> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>helloworld-bpel</artifactId> - <type>war</type> - <properties> - <context>helloworld-bpel</context> - </properties> - </deployable> - </deployables> - </configuration> - </configuration> - </plugin> - - </plugins> - </build> -</project> diff --git a/java/sca/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java b/java/sca/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 5b29292acf..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,50 +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 itest; - -import static org.junit.Assert.assertEquals; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-bpel"); - Iterator<?> ss = page.getAllHtmlChildElements(); - ss.next(); - ss.next(); - ss.next(); - HtmlParagraph p = (HtmlParagraph)ss.next(); - assertEquals("Hello world", p.asText()); - } - -} diff --git a/java/sca/itest/distribution/webapp-helloworld-jms/pom.xml b/java/sca/itest/distribution/webapp-helloworld-jms/pom.xml deleted file mode 100644 index 97662f26ca..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-jms/pom.xml +++ /dev/null @@ -1,216 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>itest-distribution</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-distribution-webapp-helloworld-jms</artifactId>
- <name>Apache Tuscany SCA iTest Distribution Webapp helloworld-jms</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>itest-bin-distro-unzip</artifactId>
- <type>pom</type>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>helloworld-jms</artifactId>
- <type>war</type>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>htmlunit</groupId>
- <artifactId>htmlunit</artifactId>
- <version>1.9</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-2.0</artifactId>
- <version>6.1.19</version>
- <type>pom</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-naming</artifactId>
- <version>6.1.19</version>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-plus</artifactId>
- <version>6.1.19</version>
- </dependency>
- <dependency>
- <groupId>geronimo-spec</groupId>
- <artifactId>geronimo-spec-jta</artifactId>
- <version>1.0.1B-rc4</version>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>compile</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <wait>false</wait>
- <container>
- <!--
- you can call the containerid anything that doesn't start with 'jetty' (Jetty will work fine)
- if it starts with 'jetty' it will use the automatic dependency mechanism which you don't
- want
- <containerId>latest-jetty6x</containerId>
- -->
- <containerId>jetty6x</containerId>
- <implementation>org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer
- </implementation>
- <type>embedded</type>
- <dependencies>
- <!-- add all the other dependencies that the embedded jetty server needs here -->
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-plus</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-naming</artifactId>
- </dependency>
- <dependency>
- <groupId>geronimo-spec</groupId>
- <artifactId>geronimo-spec-jta</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-2.0</artifactId>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-runtime</artifactId>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler-jdt</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-api-2.0</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-el</groupId>
- <artifactId>commons-el</artifactId>
- </dependency>
-
- </dependencies>
- </container>
- <!-- Uncomment the following to enable Tomcat container -->
- <!--
- <container>
- <containerId>tomcat6x</containerId>
- <home>/Tomcat/apache-tomcat-6.0.18</home>
- </container>
- -->
- <configuration>
- <implementation>org.codehaus.cargo.container.jetty.Jetty6xEmbeddedStandaloneLocalConfiguration
- </implementation>
-
- <home>${project.build.directory}/cargo-jetty</home>
- <properties>
- <!--
- NOTE: remote debugging doesn't work with the embedded Jetty container. To remote debug
- uncomment/comment the container above to be the Tomcat container and set home to point
- to your local Tomcat installation
- -->
- <cargo.jvmargs><![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y]]></cargo.jvmargs>
- <cargo.servlet.port>8085</cargo.servlet.port>
- <context>helloworld-jms</context>
- </properties>
- <deployables>
- <deployable>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>helloworld-jms</artifactId>
- <type>war</type>
- <properties>
- <context>helloworld-jms</context>
- </properties>
- </deployable>
- </deployables>
- </configuration>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-</project>
diff --git a/java/sca/itest/distribution/webapp-helloworld-jms/src/test/java/itest/HelloworldTestCase.java b/java/sca/itest/distribution/webapp-helloworld-jms/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index bc436667c8..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-jms/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,51 +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 itest;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Iterator;
-
-import org.junit.Test;
-
-import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
-import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.gargoylesoftware.htmlunit.html.HtmlParagraph;
-
-/**
- */
-public class HelloworldTestCase {
-
- @Test
- public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException {
- HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-jms");
- Iterator<?> ss = page.getAllHtmlChildElements();
- ss.next();
- ss.next();
- ss.next();
- ss.next();
- HtmlParagraph p = (HtmlParagraph)ss.next();
- assertEquals("Hello world", p.asText());
- }
-
-}
diff --git a/java/sca/itest/distribution/webapp-helloworld-js-client/pom.xml b/java/sca/itest/distribution/webapp-helloworld-js-client/pom.xml deleted file mode 100644 index 32c66015d0..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-js-client/pom.xml +++ /dev/null @@ -1,188 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>itest-distribution</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-distribution-webapp-helloworld-js-client</artifactId>
- <name>Apache Tuscany SCA iTest Distribution Webapp helloworld-js-client</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>itest-bin-distro-unzip</artifactId>
- <type>pom</type>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>helloworld-js-client</artifactId>
- <type>war</type>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>htmlunit</groupId>
- <artifactId>htmlunit</artifactId>
- <version>1.9</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-2.0</artifactId>
- <version>6.1.19</version>
- <type>pom</type>
- <scope>compile</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>compile</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <wait>false</wait>
- <container>
- <!--
- you can call the containerid anything that doesn't start with 'jetty' (Jetty will work fine)
- if it starts with 'jetty' it will use the automatic dependency mechanism which you don't
- want
- -->
- <containerId>latest-jetty6x</containerId>
- <implementation>org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer
- </implementation>
- <type>embedded</type>
- <dependencies>
- <!-- add all the other dependencies that the embedded jetty server needs here -->
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-2.0</artifactId>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-runtime</artifactId>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler-jdt</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-api-2.0</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-el</groupId>
- <artifactId>commons-el</artifactId>
- </dependency>
-
- </dependencies>
- </container>
- <!-- Uncomment the following to enable Tomcat container -->
- <!--
- <container>
- <containerId>tomcat6x</containerId>
- <home>/Tomcat/apache-tomcat-6.0.18</home>
- </container>
- -->
- <configuration>
- <implementation>org.codehaus.cargo.container.jetty.Jetty6xEmbeddedStandaloneLocalConfiguration
- </implementation>
-
- <home>${project.build.directory}/cargo-jetty</home>
- <properties>
- <!--
- NOTE: remote debugging doesn't work with the embedded Jetty container. To remote debug
- uncomment/comment the container above to be the Tomcat container and set home to point
- to your local Tomcat installation
- -->
- <cargo.jvmargs><![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y]]></cargo.jvmargs>
- <cargo.servlet.port>8085</cargo.servlet.port>
- <context>helloworld-jsp</context>
- </properties>
- <deployables>
- <deployable>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>helloworld-js-client</artifactId>
- <type>war</type>
- <properties>
- <context>helloworld-js-client</context>
- </properties>
- </deployable>
- </deployables>
- </configuration>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-</project>
diff --git a/java/sca/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java b/java/sca/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 099b442050..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,75 +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 itest;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLEncoder;
-
-import org.junit.Test;
-
-/**
- * Verfiy the serverside code is working, not sure how to easily itest the browser javascript code
- */
-public class HelloworldTestCase {
-
- @Test
- public void testA() throws MalformedURLException, IOException {
-
- URL url = new URL("http://localhost:8085/helloworld-js-client/org.oasisopen.sca.componentContext.js/foo/call/plaincall/service.sayHello.dwr");
- URLConnection conn = url.openConnection();
- conn.setDoOutput(true);
- OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
-
- // to find this run the sample through TCPMON to capture the messages
-
- String data = URLEncoder.encode("callCount", "UTF-8") + "=" + URLEncoder.encode("1", "UTF-8");
- data += "&" + URLEncoder.encode("page", "UTF-8") + "=" + URLEncoder.encode("/helloworld-js-client/", "UTF-8");
- data += "&" + URLEncoder.encode("httpSessionId", "UTF-8") + "=" + URLEncoder.encode("", "UTF-8");
- data += "&" + URLEncoder.encode("scriptSessionId", "UTF-8") + "=" + URLEncoder.encode("A023DA664E56F075491BE1B87B37B02671", "UTF-8");
- data += "&" + URLEncoder.encode("c0-scriptName", "UTF-8") + "=" + URLEncoder.encode("service", "UTF-8");
- data += "&" + URLEncoder.encode("c0-methodName", "UTF-8") + "=" + URLEncoder.encode("sayHello", "UTF-8");
- data += "&" + URLEncoder.encode("c0-id", "UTF-8") + "=" + URLEncoder.encode("0", "UTF-8");
- data += "&" + URLEncoder.encode("c0-param0", "UTF-8") + "=" + URLEncoder.encode("string:petra", "UTF-8");
- data += "&" + URLEncoder.encode("batchId", "UTF-8") + "=" + URLEncoder.encode("0", "UTF-8");
-
- wr.write(data);
- wr.flush();
-
- BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
- rd.readLine(); // throw 'allowScriptTagRemoting is false.';
- rd.readLine(); //#DWR-INSERT
- rd.readLine(); //#DWR-REPLY
- String line = rd.readLine(); // dwr.engine._remoteHandleCallback('0','0',"Hello petra");
- wr.close();
- rd.close();
-
- assertTrue(line.endsWith("\"Hello petra\");"));
-
- }
-
-}
diff --git a/java/sca/itest/distribution/webapp-helloworld-jsf/pom.xml b/java/sca/itest/distribution/webapp-helloworld-jsf/pom.xml deleted file mode 100644 index 3a2ff11a11..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-jsf/pom.xml +++ /dev/null @@ -1,130 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-distribution</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-distribution-webapp-helloworld-jsf</artifactId> - <name>Apache Tuscany SCA iTest Distribution Webapp helloworld-jsf</name> - - <dependencies> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-bin-distro-unzip</artifactId> - <type>pom</type> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>helloworld-jsf</artifactId> - <type>war</type> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>htmlunit</groupId> - <artifactId>htmlunit</artifactId> - <version>1.9</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>javax.el</groupId> - <artifactId>el-api</artifactId> - <version>1.0</version> - </dependency> - - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.codehaus.cargo</groupId> - <artifactId>cargo-maven2-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>start-container</id> - <phase>compile</phase> - <goals> - <goal>start</goal> - </goals> - </execution> - <execution> - <id>stop-container</id> - <phase>post-integration-test</phase> - <goals> - <goal>stop</goal> - </goals> - </execution> - </executions> - <configuration> - <wait>false</wait> - <container> - <containerId>jetty6x</containerId> - <type>embedded</type> - <systemProperties> - <org.apache.commons.logging.Log>org.apache.commons.logging.impl.SimpleLog</org.apache.commons.logging.Log> - </systemProperties> - </container> - <!-- container> - <containerId>tomcat6x</containerId> - <home>/Tomcat/apache-tomcat-6.0.18</home> - </container --> - <configuration> - <home>${project.build.directory}/cargo-jetty</home> - <properties> - <!-- NOTE: remote debugging doesn't work with the embedded Jetty container. To remote debug - uncomment/comment the container above to be the Tomcat container and set home to point - to your local Tomcat installation --> - <cargo.jvmargs><![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y]]></cargo.jvmargs> - <cargo.servlet.port>8085</cargo.servlet.port> - <context>helloworld-jsf</context> - </properties> - <deployables> - <deployable> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>helloworld-jsf</artifactId> - <type>war</type> - <properties> - <context>helloworld-jsf</context> - </properties> - </deployable> - </deployables> - </configuration> - </configuration> - </plugin> - - </plugins> - </build> -</project> diff --git a/java/sca/itest/distribution/webapp-helloworld-jsf/src/test/java/itest/HelloworldTestCaseFIXME.java b/java/sca/itest/distribution/webapp-helloworld-jsf/src/test/java/itest/HelloworldTestCaseFIXME.java deleted file mode 100644 index 1f90a772ac..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-jsf/src/test/java/itest/HelloworldTestCaseFIXME.java +++ /dev/null @@ -1,71 +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 itest; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - * TODO: This doesn't work yet, I can't find the hello response in the - * the response page from the button click. Not sure if thats just - * looking in the wrong place or the button click is not working - * Also the Cargo maven plugin has a problem finding the el-api when using Jetty - */ -public class HelloworldTestCaseFIXME { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-jsf"); - - HtmlForm form = page.getFormByName("mainForm"); - - HtmlInput textField = form.getInputByName("mainForm:name"); - textField.setValueAttribute("root"); - - Iterator i = form.getChildIterator(); - i.next(); - HtmlInput button = (HtmlInput)i.next(); - - HtmlPage page2 = (HtmlPage)button.click(); - - Iterator<?> ss = page2.getAllHtmlChildElements(); - ss.next(); - ss.next(); - ss.next(); - ss.next(); - HtmlForm form2 = (HtmlForm)ss.next(); - - Object oow = form2.getFirstChild(); - System.out.println(oow); -// assertTrue(p.asText().startsWith("Hello Petra")); - } - -} diff --git a/java/sca/itest/distribution/webapp-helloworld-jsp/pom.xml b/java/sca/itest/distribution/webapp-helloworld-jsp/pom.xml deleted file mode 100644 index 4f41a3a0ef..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-jsp/pom.xml +++ /dev/null @@ -1,188 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-distribution</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-distribution-webapp-helloworld-jsp</artifactId> - <name>Apache Tuscany SCA iTest Distribution Webapp helloworld-jsp</name> - - <dependencies> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-bin-distro-unzip</artifactId> - <type>pom</type> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>helloworld-jsp</artifactId> - <type>war</type> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>htmlunit</groupId> - <artifactId>htmlunit</artifactId> - <version>1.9</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.mortbay.jetty</groupId> - <artifactId>jsp-2.0</artifactId> - <version>6.1.19</version> - <type>pom</type> - <scope>compile</scope> - </dependency> - - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.codehaus.cargo</groupId> - <artifactId>cargo-maven2-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>start-container</id> - <phase>compile</phase> - <goals> - <goal>start</goal> - </goals> - </execution> - <execution> - <id>stop-container</id> - <phase>post-integration-test</phase> - <goals> - <goal>stop</goal> - </goals> - </execution> - </executions> - <configuration> - <wait>false</wait> - <container> - <!-- - you can call the containerid anything that doesn't start with 'jetty' (Jetty will work fine) - if it starts with 'jetty' it will use the automatic dependency mechanism which you don't - want - --> - <containerId>latest-jetty6x</containerId> - <implementation>org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer - </implementation> - <type>embedded</type> - <dependencies> - <!-- add all the other dependencies that the embedded jetty server needs here --> - <dependency> - <groupId>org.mortbay.jetty</groupId> - <artifactId>jetty</artifactId> - </dependency> - <dependency> - <groupId>org.mortbay.jetty</groupId> - <artifactId>jetty-util</artifactId> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - </dependency> - <dependency> - <groupId>org.mortbay.jetty</groupId> - <artifactId>jsp-2.0</artifactId> - </dependency> - <dependency> - <groupId>tomcat</groupId> - <artifactId>jasper-runtime</artifactId> - </dependency> - <dependency> - <groupId>tomcat</groupId> - <artifactId>jasper-compiler</artifactId> - </dependency> - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </dependency> - <dependency> - <groupId>tomcat</groupId> - <artifactId>jasper-compiler-jdt</artifactId> - </dependency> - <dependency> - <groupId>org.mortbay.jetty</groupId> - <artifactId>jsp-api-2.0</artifactId> - </dependency> - <dependency> - <groupId>commons-el</groupId> - <artifactId>commons-el</artifactId> - </dependency> - - </dependencies> - </container> - <!-- Uncomment the following to enable Tomcat container --> - <!-- - <container> - <containerId>tomcat6x</containerId> - <home>/Tomcat/apache-tomcat-6.0.18</home> - </container> - --> - <configuration> - <implementation>org.codehaus.cargo.container.jetty.Jetty6xEmbeddedStandaloneLocalConfiguration - </implementation> - - <home>${project.build.directory}/cargo-jetty</home> - <properties> - <!-- - NOTE: remote debugging doesn't work with the embedded Jetty container. To remote debug - uncomment/comment the container above to be the Tomcat container and set home to point - to your local Tomcat installation - --> - <cargo.jvmargs><![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y]]></cargo.jvmargs> - <cargo.servlet.port>8085</cargo.servlet.port> - <context>helloworld-jsp</context> - </properties> - <deployables> - <deployable> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>helloworld-jsp</artifactId> - <type>war</type> - <properties> - <context>helloworld-jsp</context> - </properties> - </deployable> - </deployables> - </configuration> - </configuration> - </plugin> - - </plugins> - </build> -</project> diff --git a/java/sca/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java b/java/sca/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 2be60be081..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,50 +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 itest; - -import static org.junit.Assert.assertEquals; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-jsp"); - Iterator<?> ss = page.getAllHtmlChildElements(); - ss.next(); - ss.next(); - ss.next(); - HtmlParagraph p = (HtmlParagraph)ss.next(); - assertEquals("Hello world", p.asText()); - } - -} diff --git a/java/sca/itest/distribution/webapp-helloworld-servlet/pom.xml b/java/sca/itest/distribution/webapp-helloworld-servlet/pom.xml deleted file mode 100644 index 2b5915ca88..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-servlet/pom.xml +++ /dev/null @@ -1,188 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>itest-distribution</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-distribution-webapp-helloworld-servlet</artifactId>
- <name>Apache Tuscany SCA iTest Distribution Webapp helloworld-servlet</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>itest-bin-distro-unzip</artifactId>
- <type>pom</type>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>helloworld-servlet</artifactId>
- <type>war</type>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>htmlunit</groupId>
- <artifactId>htmlunit</artifactId>
- <version>1.9</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-2.0</artifactId>
- <version>6.1.19</version>
- <type>pom</type>
- <scope>compile</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>compile</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <wait>false</wait>
- <container>
- <!--
- you can call the containerid anything that doesn't start with 'jetty' (Jetty will work fine)
- if it starts with 'jetty' it will use the automatic dependency mechanism which you don't
- want
- -->
- <containerId>latest-jetty6x</containerId>
- <implementation>org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer
- </implementation>
- <type>embedded</type>
- <dependencies>
- <!-- add all the other dependencies that the embedded jetty server needs here -->
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-2.0</artifactId>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-runtime</artifactId>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler-jdt</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-api-2.0</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-el</groupId>
- <artifactId>commons-el</artifactId>
- </dependency>
-
- </dependencies>
- </container>
- <!-- Uncomment the following to enable Tomcat container -->
- <!--
- <container>
- <containerId>tomcat6x</containerId>
- <home>/Tomcat/apache-tomcat-6.0.18</home>
- </container>
- -->
- <configuration>
- <implementation>org.codehaus.cargo.container.jetty.Jetty6xEmbeddedStandaloneLocalConfiguration
- </implementation>
-
- <home>${project.build.directory}/cargo-jetty</home>
- <properties>
- <!--
- NOTE: remote debugging doesn't work with the embedded Jetty container. To remote debug
- uncomment/comment the container above to be the Tomcat container and set home to point
- to your local Tomcat installation
- -->
- <cargo.jvmargs><![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y]]></cargo.jvmargs>
- <cargo.servlet.port>8085</cargo.servlet.port>
- <context>helloworld-jsp</context>
- </properties>
- <deployables>
- <deployable>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>helloworld-servlet</artifactId>
- <type>war</type>
- <properties>
- <context>helloworld-servlet</context>
- </properties>
- </deployable>
- </deployables>
- </configuration>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-</project>
diff --git a/java/sca/itest/distribution/webapp-helloworld-servlet/src/test/java/itest/HelloworldTestCase.java b/java/sca/itest/distribution/webapp-helloworld-servlet/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index bed840b44a..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-servlet/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,60 +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 itest;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-
-import org.junit.Test;
-
-import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
-import com.gargoylesoftware.htmlunit.UnexpectedPage;
-import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.html.HtmlButton;
-import com.gargoylesoftware.htmlunit.html.HtmlForm;
-import com.gargoylesoftware.htmlunit.html.HtmlInput;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
-
-/**
- */
-public class HelloworldTestCase {
-
- @Test
- public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException {
- HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-servlet");
-
- HtmlForm form = (HtmlForm) page.getForms().get(0);
-
- HtmlInput textField = form.getInputByName("name");
- textField.setValueAttribute("petra");
-
- HtmlButton button = (HtmlButton) form.getButtonsByName("submit").get(0);
-
- Object foo = button.click();
-
- // TODO: something up with getting the response but this works:
- UnexpectedPage p = (UnexpectedPage) foo;
- String s = new String(p.getWebResponse().getResponseBody());
-
- assertTrue(s.endsWith("</strong>Hello petra</body></html>"));
- }
-
-}
diff --git a/java/sca/itest/distribution/webapp-helloworld-stripes/pom.xml b/java/sca/itest/distribution/webapp-helloworld-stripes/pom.xml deleted file mode 100644 index 8d312f75c8..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-stripes/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-distribution</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-distribution-webapp-helloworld-stripes</artifactId> - <name>Apache Tuscany SCA iTest Distribution Webapp helloworld-stripes</name> - - <dependencies> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-bin-distro-unzip</artifactId> - <type>pom</type> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>helloworld-stripes</artifactId> - <type>war</type> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>htmlunit</groupId> - <artifactId>htmlunit</artifactId> - <version>1.9</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.codehaus.cargo</groupId> - <artifactId>cargo-maven2-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>start-container</id> - <phase>compile</phase> - <goals> - <goal>start</goal> - </goals> - </execution> - <execution> - <id>stop-container</id> - <phase>post-integration-test</phase> - <goals> - <goal>stop</goal> - </goals> - </execution> - </executions> - <configuration> - <wait>false</wait> - <container> - <containerId>jetty6x</containerId> - <type>embedded</type> - <systemProperties> - <org.apache.commons.logging.Log>org.apache.commons.logging.impl.SimpleLog</org.apache.commons.logging.Log> - </systemProperties> - </container> - <!-- container> - <containerId>tomcat6x</containerId> - <home>/Tomcat/apache-tomcat-6.0.18</home> - </container --> - <configuration> - <home>${project.build.directory}/cargo-jetty</home> - <properties> - <!-- NOTE: remote debugging doesn't work with the embedded Jetty container. To remote debug - uncomment/comment the container above to be the Tomcat container and set home to point - to your local Tomcat installation --> - <cargo.jvmargs><![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y]]></cargo.jvmargs> - <cargo.servlet.port>8085</cargo.servlet.port> - <context>helloworld-stripes</context> - </properties> - <deployables> - <deployable> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>helloworld-stripes</artifactId> - <type>war</type> - <properties> - <context>helloworld-stripes</context> - </properties> - </deployable> - </deployables> - </configuration> - </configuration> - </plugin> - - </plugins> - </build> -</project> diff --git a/java/sca/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java b/java/sca/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 743ab054c8..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,53 +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 itest; - -import static org.junit.Assert.assertEquals; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-stripes"); - Iterator<?> ss = page.getAllHtmlChildElements(); - Object o1= ss.next(); - Object o2= ss.next(); - Object o3= ss.next(); - Object o4= ss.next(); - Object o5= ss.next(); - Object o6= ss.next(); - HtmlParagraph p = (HtmlParagraph)ss.next(); - assertEquals("sayHello returns: Hello world", p.asText()); - } - -} diff --git a/java/sca/itest/distribution/webapp-helloworld/pom.xml b/java/sca/itest/distribution/webapp-helloworld/pom.xml deleted file mode 100644 index 81d7304e00..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-distribution</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-distribution-webapp-helloworld</artifactId> - <name>Apache Tuscany SCA iTest Distribution Webapp helloworld</name> - - <dependencies> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-bin-distro-unzip</artifactId> - <type>pom</type> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>helloworld</artifactId> - <type>war</type> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>httpunit</groupId> - <artifactId>httpunit</artifactId> - <version>1.6.1</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.codehaus.cargo</groupId> - <artifactId>cargo-maven2-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>start-container</id> - <phase>pre-integration-test</phase> - <goals> - <goal>start</goal> - </goals> - </execution> - <execution> - <id>stop-container</id> - <phase>post-integration-test</phase> - <goals> - <goal>stop</goal> - </goals> - </execution> - </executions> - <configuration> - <wait>false</wait> - <container> - <containerId>jetty6x</containerId> - <type>embedded</type> - <systemProperties> - <org.apache.commons.logging.Log>org.apache.commons.logging.impl.SimpleLog</org.apache.commons.logging.Log> - </systemProperties> - </container> - <!-- container> - <containerId>tomcat6x</containerId> - <home>/Tomcat/apache-tomcat-6.0.18</home> - </container --> - <configuration> - <home>${project.build.directory}/cargo-jetty</home> - <properties> - <!-- NOTE: remote debugging doesn't work with the embedded Jetty container. To remote debug - uncomment/comment the container above to be the Tomcat container and set home to point - to your local Tomcat installation --> - <cargo.jvmargs><![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y]]></cargo.jvmargs> - <cargo.servlet.port>8085</cargo.servlet.port> - </properties> - <deployables> - <deployable> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>helloworld</artifactId> - <type>war</type> - <pingURL>http://localhost:8085/helloworld</pingURL> - </deployable> - </deployables> - </configuration> - </configuration> - </plugin> - - </plugins> - </build> -</project> diff --git a/java/sca/itest/domains/helloworld/pom.xml b/java/sca/itest/domains/helloworld/pom.xml deleted file mode 100644 index 9100fa05c6..0000000000 --- a/java/sca/itest/domains/helloworld/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-domains-helloworld</artifactId>
- <name>Apache Tuscany SCA itest domain helloworld</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>itest-domain-interfaces</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-3</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-zip-contribution-descriptor</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <descriptors>
- <descriptor>tuscany-zip-contribution.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
-
diff --git a/java/sca/itest/domains/helloworld/src/main/java/itest/HelloworldImpl.java b/java/sca/itest/domains/helloworld/src/main/java/itest/HelloworldImpl.java deleted file mode 100644 index 2a10b3fb77..0000000000 --- a/java/sca/itest/domains/helloworld/src/main/java/itest/HelloworldImpl.java +++ /dev/null @@ -1,38 +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 itest;
-
-import itest.Helloworld;
-
-import org.oasisopen.sca.annotation.EagerInit;
-import org.oasisopen.sca.annotation.Init;
-import org.oasisopen.sca.annotation.Scope;
-
-@Scope("COMPOSITE") @EagerInit
-public class HelloworldImpl implements Helloworld {
-
- public String sayHello(String name) {
- return "Hello " + name;
- }
-
- @Init
- public void init() {
- System.out.println(sayHello("world"));
- }
-}
diff --git a/java/sca/itest/domains/helloworld/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/domains/helloworld/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b46cb2baca..0000000000 --- a/java/sca/itest/domains/helloworld/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://org.apache.tuscany.sca.itest">
- <deployable composite="itest:helloworld"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/domains/helloworld/src/main/resources/helloworld.composite b/java/sca/itest/domains/helloworld/src/main/resources/helloworld.composite deleted file mode 100644 index 0834265186..0000000000 --- a/java/sca/itest/domains/helloworld/src/main/resources/helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://org.apache.tuscany.sca.itest"
- name="helloworld">
-
- <component name="HelloworldComponent">
- <implementation.java class="itest.HelloworldImpl"/>
- </component>
-
-</composite>
diff --git a/java/sca/itest/domains/interfaces/pom.xml b/java/sca/itest/domains/interfaces/pom.xml deleted file mode 100644 index 9e5a082f59..0000000000 --- a/java/sca/itest/domains/interfaces/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-domains-interfaces</artifactId>
- <name>Apache Tuscany SCA itest domain interfaces</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/domains/interfaces/src/main/java/itest/Helloworld.java b/java/sca/itest/domains/interfaces/src/main/java/itest/Helloworld.java deleted file mode 100644 index f764bc8358..0000000000 --- a/java/sca/itest/domains/interfaces/src/main/java/itest/Helloworld.java +++ /dev/null @@ -1,28 +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 itest;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Helloworld {
-
- String sayHello(String name);
-
-}
diff --git a/java/sca/itest/domains/pom.xml b/java/sca/itest/domains/pom.xml deleted file mode 100644 index ab07312f62..0000000000 --- a/java/sca/itest/domains/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-domains</artifactId>
- <packaging>pom</packaging>
- <name>Apache Tuscany SCA Domians Integration Tests</name>
-
- <modules>
- <module>interfaces</module>
- <module>helloworld</module>
- <module>standalone</module>
- </modules>
-</project>
diff --git a/java/sca/itest/domains/standalone/pom.xml b/java/sca/itest/domains/standalone/pom.xml deleted file mode 100644 index be441d2945..0000000000 --- a/java/sca/itest/domains/standalone/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>itest-domains-standalone</artifactId>
- <name>Apache Tuscany SCA itest domain standalone</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-domain-node</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <!-- TODO: shouldnt need to have this dependency, should be in DomainNode -->
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-client-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/java/sca/itest/domains/standalone/src/test/java/itest/StandaloneTestCase.java b/java/sca/itest/domains/standalone/src/test/java/itest/StandaloneTestCase.java deleted file mode 100644 index 0fbcc98a96..0000000000 --- a/java/sca/itest/domains/standalone/src/test/java/itest/StandaloneTestCase.java +++ /dev/null @@ -1,66 +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 itest;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.domain.node.DomainNode;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class StandaloneTestCase{
-
- private static DomainNode node;
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {
- node = new DomainNode();
- node.addContribution("../helloworld/target/itest-domains-helloworld.zip");
- }
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {
- node.stop();
- }
-
- @Test
- public void testServices() throws Exception {
- assertEquals(1, node.getServiceNames().size());
- assertEquals("HelloworldComponent/Helloworld", node.getServiceNames().get(0));
- }
-
- @Test
- public void testDuplicateComponents() throws Exception {
- try {
- node.addContribution("../helloworld/target/itest-domains-helloworld.zip", "dup");
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- // verify the old one is still there
- // TODO: doesn't work correctly yet
-// assertEquals(1, node.getServiceNames().size());
-// assertEquals("HelloworldComponent/Helloworld", node.getServiceNames().get(0));
- }
-
-}
diff --git a/java/sca/itest/endpoints/pom.xml b/java/sca/itest/endpoints/pom.xml deleted file mode 100644 index 6a1930c627..0000000000 --- a/java/sca/itest/endpoints/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-endpoints</artifactId>
- <name>Apache Tuscany SCA iTest Endpoints</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jsonp-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-rmi-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-jetty</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- </dependencies>
-
-</project>
diff --git a/java/sca/itest/endpoints/src/test/java/helloworld/HelloWorldImpl.java b/java/sca/itest/endpoints/src/test/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index c307547f56..0000000000 --- a/java/sca/itest/endpoints/src/test/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,28 +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;
-
-
-public class HelloWorldImpl implements HelloWorldService {
-
- public String sayHello(String name) {
- return "Hello " + name;
- }
-
-}
diff --git a/java/sca/itest/endpoints/src/test/java/helloworld/HelloWorldService.java b/java/sca/itest/endpoints/src/test/java/helloworld/HelloWorldService.java deleted file mode 100644 index 064d615c45..0000000000 --- a/java/sca/itest/endpoints/src/test/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,28 +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.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface HelloWorldService {
-
- String sayHello(String name);
-
-}
diff --git a/java/sca/itest/endpoints/src/test/java/test/EndpointsTestCase.java b/java/sca/itest/endpoints/src/test/java/test/EndpointsTestCase.java deleted file mode 100644 index 7802848c3b..0000000000 --- a/java/sca/itest/endpoints/src/test/java/test/EndpointsTestCase.java +++ /dev/null @@ -1,110 +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 test;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-
-import org.apache.tuscany.sca.http.jetty.JettyServer;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class EndpointsTestCase {
-
- private static Node node;
-
- @Test
- public void testJSONP1() throws MalformedURLException, IOException {
- // <tuscany:binding.jsonp />
- Utils.invokeJSONPEndpoint("http://localhost:8085/JSONPComponent1/HelloWorldService/sayHello?name=petra&callback=foo");
- }
- @Test
- public void testJSONP2() throws MalformedURLException, IOException {
- // <tuscany:binding.jsonp name="jsonp2"/>
- Utils.invokeJSONPEndpoint("http://localhost:8085/JSONPComponent2/HelloWorldService/jsonp2/sayHello?name=petra&callback=foo");
- }
- @Test
- public void testJSONP3() throws MalformedURLException, IOException {
- // <tuscany:binding.jsonp uri="jsonp3"/>
- Utils.invokeJSONPEndpoint("http://localhost:8085/JSONPComponent3/HelloWorldService/jsonp3/sayHello?name=petra&callback=foo");
- }
- @Test
- public void testJSONP4() throws MalformedURLException, IOException {
- // <tuscany:binding.jsonp uri="/jsonp4"/>
- Utils.invokeJSONPEndpoint("http://localhost:8085/jsonp4/sayHello?name=petra&callback=foo");
- }
- @Test
- public void testJSONP5() throws MalformedURLException, IOException {
- // <tuscany:binding.jsonp name="jsonp5a" uri="/jsonp5b"/>
- Utils.invokeJSONPEndpoint("http://localhost:8085/jsonp5b/sayHello?name=petra&callback=foo");
- }
- @Test
- public void testJSONP6() throws MalformedURLException, IOException {
- // <tuscany:binding.jsonp name="jsonp6a" uri="jsonp6b"/>
- Utils.invokeJSONPEndpoint("http://localhost:8085/JSONPComponent6/HelloWorldService/jsonp6a/jsonp6b/sayHello?name=petra&callback=foo");
- }
-
- @Test
- public void testWS1() throws MalformedURLException, Exception {
- // <tuscany:binding.WS />
- Utils.invokeWSEndpoint("http://localhost:8085/WSComponent1/HelloWorldService");
- }
- @Test
- public void testWS2() throws MalformedURLException, Exception {
- // <tuscany:binding.WS name="WS2"/>
- Utils.invokeWSEndpoint("http://localhost:8085/WSComponent2/HelloWorldService/ws2");
- }
- @Test
- public void testWS3() throws MalformedURLException, Exception {
- // <tuscany:binding.WS uri="WS3"/>
- Utils.invokeWSEndpoint("http://localhost:8085/WSComponent3/HelloWorldService/ws3");
- }
- @Test
- public void testWS4() throws MalformedURLException, Exception {
- // <tuscany:binding.WS uri="/WS4"/>
- Utils.invokeWSEndpoint("http://localhost:8085/ws4");
- }
- @Test
- public void testWS5() throws MalformedURLException, Exception {
- // <tuscany:binding.WS name="WS5a" uri="/WS5b"/>
- Utils.invokeWSEndpoint("http://localhost:8085/ws5b");
- }
- @Test
- public void testWS6() throws Exception {
- // <tuscany:binding.ws name="ws6a" uri="ws6b"/>
- Utils.invokeWSEndpoint("http://localhost:8085/WSComponent6/HelloWorldService/ws6a/ws6b");
- }
-
- @BeforeClass
- public static void init() throws Exception {
- JettyServer.portDefault = 8085;
- node = NodeFactory.newInstance().createNode("helloworld.composite").start();
- }
-
- @AfterClass
- public static void destroy() throws Exception {
- if (node != null) {
- node.stop();
- }
- }
-
-}
diff --git a/java/sca/itest/endpoints/src/test/java/test/NestedEndpointsTestCase.java b/java/sca/itest/endpoints/src/test/java/test/NestedEndpointsTestCase.java deleted file mode 100644 index f3b6c15bf1..0000000000 --- a/java/sca/itest/endpoints/src/test/java/test/NestedEndpointsTestCase.java +++ /dev/null @@ -1,110 +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 test;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-
-import org.apache.tuscany.sca.http.jetty.JettyServer;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class NestedEndpointsTestCase {
-
- private static Node node;
-
- @Test
- public void testJSONP1() throws MalformedURLException, IOException {
- // <tuscany:binding.jsonp />
- Utils.invokeJSONPEndpoint("http://localhost:8085/NestedComponent1/JSONPComponent1/HelloWorldService/sayHello?name=petra&callback=foo");
- }
- @Test
- public void testJSONP2() throws MalformedURLException, IOException {
- // <tuscany:binding.jsonp name="jsonp2"/>
- Utils.invokeJSONPEndpoint("http://localhost:8085/NestedComponent1/JSONPComponent2/HelloWorldService/jsonp2/sayHello?name=petra&callback=foo");
- }
- @Test
- public void testJSONP3() throws MalformedURLException, IOException {
- // <tuscany:binding.jsonp uri="jsonp3"/>
- Utils.invokeJSONPEndpoint("http://localhost:8085/NestedComponent1/JSONPComponent3/HelloWorldService/jsonp3/sayHello?name=petra&callback=foo");
- }
- @Test
- public void testJSONP4() throws MalformedURLException, IOException {
- // <tuscany:binding.jsonp uri="/jsonp4"/>
- Utils.invokeJSONPEndpoint("http://localhost:8085/jsonp4/sayHello?name=petra&callback=foo");
- }
- @Test
- public void testJSONP5() throws MalformedURLException, IOException {
- // <tuscany:binding.jsonp name="jsonp5a" uri="/jsonp5b"/>
- Utils.invokeJSONPEndpoint("http://localhost:8085/jsonp5b/sayHello?name=petra&callback=foo");
- }
- @Test
- public void testJSONP6() throws MalformedURLException, IOException {
- // <tuscany:binding.jsonp name="jsonp6a" uri="jsonp6b"/>
- Utils.invokeJSONPEndpoint("http://localhost:8085/NestedComponent1/JSONPComponent6/HelloWorldService/jsonp6a/jsonp6b/sayHello?name=petra&callback=foo");
- }
-
- @Test
- public void testWS1() throws MalformedURLException, Exception {
- // <tuscany:binding.WS />
- Utils.invokeWSEndpoint("http://localhost:8085/NestedComponent1/WSComponent1/HelloWorldService");
- }
- @Test
- public void testWS2() throws MalformedURLException, Exception {
- // <tuscany:binding.WS name="WS2"/>
- Utils.invokeWSEndpoint("http://localhost:8085/NestedComponent1/WSComponent2/HelloWorldService/ws2");
- }
- @Test
- public void testWS3() throws MalformedURLException, Exception {
- // <tuscany:binding.WS uri="WS3"/>
- Utils.invokeWSEndpoint("http://localhost:8085/NestedComponent1/WSComponent3/HelloWorldService/ws3");
- }
- @Test
- public void testWS4() throws MalformedURLException, Exception {
- // <tuscany:binding.WS uri="/WS4"/>
- Utils.invokeWSEndpoint("http://localhost:8085/ws4");
- }
- @Test
- public void testWS5() throws MalformedURLException, Exception {
- // <tuscany:binding.WS name="WS5a" uri="/WS5b"/>
- Utils.invokeWSEndpoint("http://localhost:8085/ws5b");
- }
- @Test
- public void testWS6() throws Exception {
- // <tuscany:binding.ws name="ws6a" uri="ws6b"/>
- Utils.invokeWSEndpoint("http://localhost:8085/NestedComponent1/WSComponent6/HelloWorldService/ws6a/ws6b");
- }
-
- @BeforeClass
- public static void init() throws Exception {
- JettyServer.portDefault = 8085;
- node = NodeFactory.newInstance().createNode("nested.composite").start();
- }
-
- @AfterClass
- public static void destroy() throws Exception {
- if (node != null) {
- node.stop();
- }
- }
-
-}
diff --git a/java/sca/itest/endpoints/src/test/java/test/Utils.java b/java/sca/itest/endpoints/src/test/java/test/Utils.java deleted file mode 100644 index 5107d8f660..0000000000 --- a/java/sca/itest/endpoints/src/test/java/test/Utils.java +++ /dev/null @@ -1,70 +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 test;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-
-import javax.wsdl.Definition;
-import javax.wsdl.Port;
-import javax.wsdl.Service;
-import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-
-import junit.framework.Assert;
-
-public class Utils {
-
- public static void invokeJSONPEndpoint(String s) throws MalformedURLException, IOException {
- URL url = new URL(s);
- BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
- String response = br.readLine();
- Assert.assertEquals("foo(\"Hello petra\");", response);
- }
-
- public static void invokeWSEndpoint(String endpoint) throws Exception {
- WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
- wsdlReader.setFeature("javax.wsdl.verbose",false);
- wsdlReader.setFeature("javax.wsdl.importDocuments",true);
-
- Definition definition = wsdlReader.readWSDL(endpoint + "?wsdl");
- Assert.assertNotNull(definition);
- Service service = (Service)definition.getServices().values().iterator().next();
- Port port = (Port)service.getPorts().values().iterator().next();
-
- Assert.assertEquals(new URL(endpoint).getPath(), new URL(getEndpoint(port)).getPath());
- }
-
- private static String getEndpoint(Port port) {
- List<?> wsdlPortExtensions = port.getExtensibilityElements();
- for (final Object extension : wsdlPortExtensions) {
- if (extension instanceof SOAPAddress) {
- return ((SOAPAddress) extension).getLocationURI();
- }
- }
- throw new RuntimeException("no SOAPAddress");
- }
-
-}
diff --git a/java/sca/itest/endpoints/src/test/resources/helloworld.composite b/java/sca/itest/endpoints/src/test/resources/helloworld.composite deleted file mode 100644 index 081804b34e..0000000000 --- a/java/sca/itest/endpoints/src/test/resources/helloworld.composite +++ /dev/null @@ -1,116 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://itest"
- name="HelloWorldComposite">
-
- <component name="JSONPComponent1">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <tuscany:binding.jsonp />
- </service>
- </component>
-
- <component name="JSONPComponent2">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <tuscany:binding.jsonp name="jsonp2"/>
- </service>
- </component>
-
- <component name="JSONPComponent3">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <tuscany:binding.jsonp uri="jsonp3"/>
- </service>
- </component>
-
- <component name="JSONPComponent4">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <tuscany:binding.jsonp uri="/jsonp4"/>
- </service>
- </component>
-
- <component name="JSONPComponent5">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <tuscany:binding.jsonp name="jsonp5a" uri="/jsonp5b"/>
- </service>
- </component>
-
- <component name="JSONPComponent6">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <tuscany:binding.jsonp name="jsonp6a" uri="jsonp6b"/>
- </service>
- </component>
-
- <component name="RMIComponent6">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <tuscany:binding.rmi name="rmi6a" uri="rmi6b"/>
- </service>
- </component>
-
- <component name="WSComponent1">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <binding.ws />
- </service>
- </component>
-
- <component name="WSComponent2">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <binding.ws name="ws2"/>
- </service>
- </component>
-
- <component name="WSComponent3">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <binding.ws uri="ws3"/>
- </service>
- </component>
-
- <component name="WSComponent4">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <binding.ws uri="/ws4"/>
- </service>
- </component>
-
- <component name="WSComponent5">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <binding.ws name="ws5a" uri="/ws5b"/>
- </service>
- </component>
-
- <component name="WSComponent6">
- <implementation.java class="helloworld.HelloWorldImpl"/>
- <service name="HelloWorldService" >
- <binding.ws name="ws6a" uri="ws6b"/>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/endpoints/src/test/resources/nested.composite b/java/sca/itest/endpoints/src/test/resources/nested.composite deleted file mode 100644 index ffc73644f1..0000000000 --- a/java/sca/itest/endpoints/src/test/resources/nested.composite +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:itest="http://itest"
- targetNamespace="http://itest"
- name="NestedComposite">
-
- <component name="NestedComponent1">
- <implementation.composite name="itest:HelloWorldComposite"/>
- </component>
-
-</composite>
diff --git a/java/sca/itest/exceptions/pom.xml b/java/sca/itest/exceptions/pom.xml deleted file mode 100644 index 41dd198009..0000000000 --- a/java/sca/itest/exceptions/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-exceptions</artifactId> - <name>Apache Tuscany SCA iTest Exceptions</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java b/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java deleted file mode 100644 index 1f57116bac..0000000000 --- a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java +++ /dev/null @@ -1,57 +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 org.apache.tuscany.sca.test.exceptions; - -public class Checked extends Exception { - private static final long serialVersionUID = -129752837478357452L; - - /** - * - */ - public Checked() { - - } - - /** - * @param message - */ - public Checked(String message) { - super(message); - - } - - /** - * @param cause - */ - public Checked(Throwable cause) { - super(cause); - - } - - /** - * @param message - * @param cause - */ - public Checked(String message, Throwable cause) { - super(message, cause); - - } - -} diff --git a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java b/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java deleted file mode 100644 index 112aefc747..0000000000 --- a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.test.exceptions; - -public interface ExceptionHandler { - - void testing(); - - Checked getTheBad(); - - String getTheGood(); - - UnChecked getTheUgly(); - -} diff --git a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java b/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java deleted file mode 100644 index 53a6c70b57..0000000000 --- a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.test.exceptions; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * Remote exception thrower - * @version $Rev$ $Date$ - */ -@Remotable -public interface ExceptionRemoteThrower extends ExceptionThrower { -} diff --git a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java b/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java deleted file mode 100644 index ace219991b..0000000000 --- a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java +++ /dev/null @@ -1,37 +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 org.apache.tuscany.sca.test.exceptions; - -/** - * Local exception thrower - * @version $Rev$ $Date$ - */ -public interface ExceptionThrower { - Checked BAD = new Checked("theBad"); - UnChecked UGLY = new UnChecked("theUgly"); - String SO_THEY_SAY = "All is good that ends good."; - - String theGood() throws Checked; - - String theBad() throws Checked; - - String theUgly() throws Checked; - -} diff --git a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java b/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java deleted file mode 100644 index 453528444d..0000000000 --- a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java +++ /dev/null @@ -1,57 +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 org.apache.tuscany.sca.test.exceptions; - -public class UnChecked extends RuntimeException { - private static final long serialVersionUID = -1318118082838092244L; - - /** - * - */ - public UnChecked() { - - } - - /** - * @param message - */ - public UnChecked(String message) { - super(message); - - } - - /** - * @param cause - */ - public UnChecked(Throwable cause) { - super(cause); - - } - - /** - * @param message - * @param cause - */ - public UnChecked(String message, Throwable cause) { - super(message, cause); - - } - -} diff --git a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java b/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java deleted file mode 100644 index 26b9f0a383..0000000000 --- a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java +++ /dev/null @@ -1,115 +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 org.apache.tuscany.sca.test.exceptions.impl; - -import org.apache.tuscany.sca.test.exceptions.Checked; -import org.apache.tuscany.sca.test.exceptions.ExceptionHandler; -import org.apache.tuscany.sca.test.exceptions.ExceptionThrower; -import org.apache.tuscany.sca.test.exceptions.UnChecked; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; - -@Scope("COMPOSITE") -public class ExceptionHandlerImpl implements ExceptionHandler { - static final String INIT = "INIT"; - - private ExceptionThrower exceptionThrower; - - private String theGood; - - private Checked theBad; - - private UnChecked theUgly; - - public void testing() { - - assert exceptionThrower != null : "'exceptionThrower' never wired"; - String result = INIT; - try { - theGood = result = exceptionThrower.theGood(); - assert result == ExceptionThrower.SO_THEY_SAY; - } catch (Throwable e) { - assert result == INIT; - assert false; - e.printStackTrace(); - } - - result = INIT; - try { - result = exceptionThrower.theBad(); - // incredible - assert false : "Expected 'Check' Exception"; - - } catch (Checked e) { - // This is good... - assert result == INIT; - theBad = e; - } catch (Throwable t) { - // This is not so good. - t.printStackTrace(); - assert result == INIT; - assert false : "Got wrong exception '" + t.getClass().getName(); - } - - result = INIT; - try { - result = exceptionThrower.theUgly(); - // incredible - assert false : "Expected 'UnCheck' Exception"; - - } catch (Checked e) { - // This is not so good... - assert false : "Got wrong exception '" + e.getClass().getName(); - assert result == INIT; - } catch (UnChecked e) { - theUgly = e; - - } catch (Throwable t) { - // This is not good. - assert false; - assert result == INIT; - - System.out.println(ExceptionThrower.SO_THEY_SAY + " " + INIT); - } - - } - - @Reference - public void setExceptionThrower(ExceptionThrower exceptionThrower) { - this.exceptionThrower = exceptionThrower; - } - - public String getTheGood() { - return theGood; - } - - public Checked getTheBad() { - return theBad; - } - - public UnChecked getTheUgly() { - return theUgly; - } - - public ExceptionThrower getExceptionThrower() { - return exceptionThrower; - } - -} diff --git a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java b/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java deleted file mode 100644 index cd62338841..0000000000 --- a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java +++ /dev/null @@ -1,44 +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 org.apache.tuscany.sca.test.exceptions.impl; - -import org.apache.tuscany.sca.test.exceptions.Checked; -import org.apache.tuscany.sca.test.exceptions.ExceptionRemoteThrower; -import org.oasisopen.sca.annotation.Service; - -/** - * - * @version $Rev$ $Date$ - */ -@Service(ExceptionRemoteThrower.class) -public class ExceptionRemoteThrowerImpl implements ExceptionRemoteThrower { - public String theBad() throws Checked { - throw BAD; - } - - public String theGood() throws Checked { - return SO_THEY_SAY; - } - - public String theUgly() throws Checked { - throw UGLY; - } - -} diff --git a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java b/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java deleted file mode 100644 index 56b9fc6f5b..0000000000 --- a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java +++ /dev/null @@ -1,45 +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 org.apache.tuscany.sca.test.exceptions.impl; - -import org.apache.tuscany.sca.test.exceptions.Checked; -import org.apache.tuscany.sca.test.exceptions.ExceptionThrower; -import org.oasisopen.sca.annotation.Service; - -/** - * - * @version $Rev$ $Date$ - */ -@Service(ExceptionThrower.class) -public class ExceptionThrowerImpl implements ExceptionThrower { - - public String theBad() throws Checked { - throw BAD; - } - - public String theGood() throws Checked { - return SO_THEY_SAY; - } - - public String theUgly() throws Checked { - throw UGLY; - } - -} diff --git a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java b/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java deleted file mode 100644 index c5b54ff902..0000000000 --- a/java/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java +++ /dev/null @@ -1,116 +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 org.apache.tuscany.sca.test.exceptions.impl; - -import org.apache.tuscany.sca.test.exceptions.Checked; -import org.apache.tuscany.sca.test.exceptions.ExceptionHandler; -import org.apache.tuscany.sca.test.exceptions.ExceptionRemoteThrower; -import org.apache.tuscany.sca.test.exceptions.ExceptionThrower; -import org.apache.tuscany.sca.test.exceptions.UnChecked; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; - -@Scope("COMPOSITE") -public class RemoteExceptionHandlerImpl implements ExceptionHandler { - static final String INIT = "INIT"; - - private ExceptionRemoteThrower exceptionThrower; - - private String theGood; - - private Checked theBad; - - private UnChecked theUgly; - - public void testing() { - - assert exceptionThrower != null : "'exceptionThrower' never wired"; - String result = INIT; - try { - theGood = result = exceptionThrower.theGood(); - assert result == ExceptionThrower.SO_THEY_SAY; - } catch (Throwable e) { - assert result == INIT; - assert false; - e.printStackTrace(); - } - - result = INIT; - try { - result = exceptionThrower.theBad(); - // incredible - assert false : "Expected 'Check' Exception"; - - } catch (Checked e) { - // This is good... - assert result == INIT; - theBad = e; - } catch (Throwable t) { - // This is not so good. - t.printStackTrace(); - assert result == INIT; - assert false : "Got wrong exception '" + t.getClass().getName(); - } - - result = INIT; - try { - result = exceptionThrower.theUgly(); - // incredible - assert false : "Expected 'UnCheck' Exception"; - - } catch (Checked e) { - // This is not so good... - assert false : "Got wrong exception '" + e.getClass().getName(); - assert result == INIT; - } catch (UnChecked e) { - theUgly = e; - - } catch (Throwable t) { - // This is not good. - assert false; - assert result == INIT; - - System.out.println(ExceptionThrower.SO_THEY_SAY + " " + INIT); - } - - } - - @Reference - public void setExceptionThrower(ExceptionRemoteThrower exceptionThrower) { - this.exceptionThrower = exceptionThrower; - } - - public String getTheGood() { - return theGood; - } - - public Checked getTheBad() { - return theBad; - } - - public UnChecked getTheUgly() { - return theUgly; - } - - public ExceptionRemoteThrower getExceptionThrower() { - return exceptionThrower; - } - -} diff --git a/java/sca/itest/exceptions/src/main/resources/ExceptionTest.composite b/java/sca/itest/exceptions/src/main/resources/ExceptionTest.composite deleted file mode 100644 index d42866303e..0000000000 --- a/java/sca/itest/exceptions/src/main/resources/ExceptionTest.composite +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" xmlns:foo="http://foo" targetNamespace="http://foo" - name="ExceptionTest"> - <component name="main"> - <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.ExceptionHandlerImpl" /> - <reference name="exceptionThrower" target="exceptionThrower" /> - </component> - - <component name="exceptionThrower"> - <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.ExceptionThrowerImpl" /> - </component> - - <component name="mainRemote"> - <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.RemoteExceptionHandlerImpl" /> - <reference name="exceptionThrower" target="exceptionThrowerRemote" /> - </component> - - <component name="exceptionThrowerRemote"> - <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.ExceptionRemoteThrowerImpl" /> - </component> - - -</composite> diff --git a/java/sca/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java b/java/sca/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java deleted file mode 100644 index 7794348476..0000000000 --- a/java/sca/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java +++ /dev/null @@ -1,85 +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 org.apache.tuscany.sca.test.exceptions; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertSame; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class ExceptionsTestCase { - - private static Node node; - - /** - * Test exception handling over a local interface - */ - @Test - public void testLocal() { - ExceptionHandler exceptionHandler = node.getService(ExceptionHandler.class, "main"); - exceptionHandler.testing(); - assertEquals(ExceptionThrower.SO_THEY_SAY, exceptionHandler.getTheGood()); - assertNotNull(exceptionHandler.getTheBad()); - assertEquals(Checked.class, exceptionHandler.getTheBad().getClass()); - assertSame(ExceptionThrower.BAD, exceptionHandler.getTheBad()); - assertNotNull(exceptionHandler.getTheUgly()); - assertEquals(UnChecked.class, exceptionHandler.getTheUgly().getClass()); - assertSame(ExceptionThrower.UGLY, exceptionHandler.getTheUgly()); - } - - /** - * Test exception handling over a remotable interface - */ - @Test - public void testRemote() { - ExceptionHandler exceptionHandler = node.getService(ExceptionHandler.class, "mainRemote"); - exceptionHandler.testing(); - assertEquals(ExceptionThrower.SO_THEY_SAY, exceptionHandler.getTheGood()); - assertNotNull(exceptionHandler.getTheBad()); - assertEquals(Checked.class, exceptionHandler.getTheBad().getClass()); - assertNotSame(ExceptionThrower.BAD, exceptionHandler.getTheBad()); - assertNotNull(exceptionHandler.getTheUgly()); - assertEquals(UnChecked.class, exceptionHandler.getTheUgly().getClass()); - - // [rfeng] We're not in a position to copy non business exceptions - // assertNotSame(ExceptionThrower.UGLY, exceptionHandler.getTheUgly()); - - } - - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("ExceptionTest.composite"); - node = NodeFactory.newInstance().createNode("ExceptionTest.composite", new Contribution("c1", location)); - node.start(); - } - - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/java/sca/itest/implementation-spring/pom.xml b/java/sca/itest/implementation-spring/pom.xml deleted file mode 100644 index 1ce02ed1ee..0000000000 --- a/java/sca/itest/implementation-spring/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-implementation-spring</artifactId> - <name>Apache Tuscany SCA iTest Spring Implementation</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-spring</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-spring-sca</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <!-- Spring dependencies... --> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>2.5.5</version> - </dependency> - - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-beans</artifactId> - <version>2.5.5</version> - </dependency> - - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>2.5.5</version> - </dependency> - </dependencies> -</project> diff --git a/java/sca/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java b/java/sca/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java deleted file mode 100644 index bd7770ca7d..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java +++ /dev/null @@ -1,38 +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 bigbank.stockquote; - -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the StockQuote service. - */ -@Service(StockQuoteService.class) -public class StockQuoteImpl implements StockQuoteService { - - public double getQuote(String symbol) { - double price = 104.0 + Math.random(); - price = ((int)(price * 100)) / 100.0; - - System.out.println("Getting stock quote for: " + symbol + ", value: "+ price); - - return price; - } - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java b/java/sca/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java deleted file mode 100644 index 747433a9e7..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java +++ /dev/null @@ -1,30 +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 bigbank.stockquote; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the StockQuote service. - */ -@Remotable -public interface StockQuoteService { - - public double getQuote(String symbol); -} diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/AddService.java b/java/sca/itest/implementation-spring/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +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 calculator; - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java b/java/sca/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index eae607a7ca..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,35 +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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Adding " + n1 + " and " + n2); - return n1 + n2; - } - -}
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/CalculatorService.java b/java/sca/itest/implementation-spring/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index ce1cdaae5a..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,37 +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 calculator; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * The Calculator service interface. - */ -@Remotable -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java b/java/sca/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index b033516c1b..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,79 +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 calculator; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - public void setAddService(AddService addService) { - this.addService = addService; - } - - public AddService getAddService() { - return addService; - } - - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - public SubtractService getSubtractService() { - return subtractService; - } - - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - public DivideService getDivideService() { - return divideService; - } - - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public MultiplyService getMultiplyService() { - return multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/DivideService.java b/java/sca/itest/implementation-spring/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +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 calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java b/java/sca/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,35 +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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2); - return n1 / n2; - } - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/MultiplyService.java b/java/sca/itest/implementation-spring/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +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 calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java b/java/sca/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,35 +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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2); - return n1 * n2; - } - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/SubtractService.java b/java/sca/itest/implementation-spring/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +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 calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java b/java/sca/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,35 +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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2); - return n1 - n2; - } - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java b/java/sca/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java deleted file mode 100644 index 4f063993a3..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java +++ /dev/null @@ -1,50 +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 calculator.security; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.security.auth.callback.UnsupportedCallbackException; - -/** - * @version $Rev$ $Date$ - */ -public class CalculatorCallbackHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - if (callbacks[i] instanceof NameCallback) { - NameCallback nc = (NameCallback)callbacks[i]; - nc.setName("CalculatorUser"); - } else if (callbacks[i] instanceof PasswordCallback) { - PasswordCallback pc = (PasswordCallback)callbacks[i]; - pc.setPassword("CalculatorUserPasswd".toCharArray()); - } else { - throw new UnsupportedCallbackException - (callbacks[i], "Unsupported Callback!"); - } - } - } - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java b/java/sca/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java deleted file mode 100644 index b3ef6e7312..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java +++ /dev/null @@ -1,178 +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 calculator.security; - -import java.security.Principal; -import java.util.Map; - -import javax.security.auth.Subject; -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.security.auth.login.LoginException; -import javax.security.auth.spi.LoginModule; - -/** - * @version $Rev$ $Date$ - */ -public class JaasLoginModule implements LoginModule { - - private CallbackHandler callbackHandler; - private Subject subject; - private Principal userPrincipal; - private String userId; - private String password; - private boolean succeeded; - private boolean commitSucceeded; - - public void initialize(Subject subject, - CallbackHandler callbackHandler, - Map<String, ?> sharedState, - Map<String, ?> options) { - this.callbackHandler = callbackHandler; - this.subject = subject; - } - - public boolean login() throws LoginException { - Callback[] callbacks = new Callback[2]; - callbacks[0] = new NameCallback("UserId:"); - callbacks[1] = new PasswordCallback("Password:", false); - - try { - callbackHandler.handle(callbacks); - userId = ((NameCallback)callbacks[0]).getName(); - password = new String(((PasswordCallback)callbacks[1]).getPassword()); - - if (userId.equals("CalculatorUser") && password.equals("CalculatorUserPasswd")) { - System.out.println("Successfully AUTHENTICATED!!"); - succeeded = true; - return true; - } else { - System.out.println("Incorrect userId / password! AUTHENTICATION FAILED!!"); - return false; - } - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - /** - * <p> This method is called if the LoginContext's - * overall authentication succeeded - * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules - * succeeded). - * - * <p> If this LoginModule's own authentication attempt - * succeeded (checked by retrieving the private state saved by the - * <code>login</code> method), then this method associates a - * <code>UserPrincipal</code> - * with the <code>Subject</code> located in the - * <code>LoginModule</code>. If this LoginModule's own - * authentication attempted failed, then this method removes - * any state that was originally saved. - * - * <p> - * - * @exception LoginException if the commit fails. - * - * @return true if this LoginModule's own login and commit - * attempts succeeded, or false otherwise. - */ - public boolean commit() throws LoginException { - if (succeeded == false) { - return false; - } else { - // add a Principal (authenticated identity) to the Subject - - // assume the user we authenticated is the UserPrincipal - userPrincipal = new UserPrincipal(userId); - if (!subject.getPrincipals().contains(userPrincipal)) - subject.getPrincipals().add(userPrincipal); - - // in any case, clean out state - userId = null; - password = null; - commitSucceeded = true; - return true; - } - } - - /** - * <p> This method is called if the LoginContext's - * overall authentication failed. - * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules - * did not succeed). - * - * <p> If this LoginModule's own authentication attempt - * succeeded (checked by retrieving the private state saved by the - * <code>login</code> and <code>commit</code> methods), - * then this method cleans up any state that was originally saved. - * - * <p> - * - * @exception LoginException if the abort fails. - * - * @return false if this LoginModule's own login and/or commit attempts - * failed, and true otherwise. - */ - public boolean abort() throws LoginException { - if (succeeded == false) { - return false; - } else if (succeeded == true && commitSucceeded == false) { - // login succeeded but overall authentication failed - succeeded = false; - userId = null; - password = null; - userPrincipal = null; - } else { - // overall authentication succeeded and commit succeeded, - // but someone else's commit failed - logout(); - } - return true; - } - - /** - * Logout the user. - * - * <p> This method removes the <code>SimplePrincipal</code> - * that was added by the <code>commit</code> method. - * - * <p> - * - * @exception LoginException if the logout fails. - * - * @return true in all cases since this <code>LoginModule</code> - * should not be ignored. - */ - public boolean logout() throws LoginException { - subject.getPrincipals().remove(userPrincipal); - succeeded = false; - succeeded = commitSucceeded; - userId = null; - if (password != null) - password = null; - userPrincipal = null; - return true; - } - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java b/java/sca/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java deleted file mode 100644 index 595626e672..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java +++ /dev/null @@ -1,66 +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 calculator.security; - -import java.security.Principal; - -/** - * @version $Rev$ $Date$ - */ -public class UserPrincipal implements Principal { - - private final String name; - - public UserPrincipal(String name) { - if (name == null) - throw new IllegalArgumentException("name cannot be null"); - this.name = name; - } - - public String getName() { - return name; - } - - public String toString() { - return name; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((name == null) ? 0 : name.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - final UserPrincipal other = (UserPrincipal)obj; - if (name == null) { - if (other.name != null) - return false; - } else if (!name.equals(other.name)) - return false; - return true; - } -} diff --git a/java/sca/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java b/java/sca/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java deleted file mode 100644 index fed509df98..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java +++ /dev/null @@ -1,37 +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 context.access; - -import org.springframework.beans.BeansException; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; - -public class SCAApplicationContextProvider implements ApplicationContextAware { - - private static ApplicationContext ctx; - - public void setApplicationContext(ApplicationContext appContext) throws BeansException { - // Wiring the ApplicationContext into a static method - ctx = appContext; - } - - public static ApplicationContext getApplicationContext() { - return ctx; - } -} diff --git a/java/sca/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java b/java/sca/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java deleted file mode 100644 index 8bb3006d12..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java +++ /dev/null @@ -1,35 +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.oasisopen.sca.annotation.Remotable; - -/** - * Interface for the "hello world" service - predictably simple with a single operation - * "sayHello" - * - * @version $Rev$ $Date$ - */ -@Remotable -public interface HelloWorld { - - String sayHello(String s); - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java b/java/sca/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index f68134702b..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,38 +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; - -/** - * A simple proxy Java class which implements the HelloWorld interface but which uses - * a reference "delegate" to actually provide the HelloWorld service - * - * @version $Rev$ $Date$ - */ -public class HelloWorldImpl implements HelloWorld { - - static String hello = "Hello "; - - public String sayHello(String s) { - // Simply call the reference to satisfy the service request... - System.out.println("HelloWorldImpl - sayHello called"); - return (hello + s); - } - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java b/java/sca/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java deleted file mode 100644 index 78b3649b5b..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java +++ /dev/null @@ -1,42 +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.oasisopen.sca.annotation.Reference; - -/** - * A simple proxy Java class which implements the HelloWorld interface but which uses - * a reference "delegate" to actually provide the HelloWorld service - * - * @version $Rev$ $Date$ - */ -public class HelloWorldProxy implements HelloWorld { - - // Here is the reference "delegate" - it implements the HelloWorld interface... - @Reference - public HelloWorld delegate; - - public String sayHello(String s) { - // Simply call the reference to satisfy the service request... - System.out.println("HelloWorldProxy - calling sayHello"); - return delegate.sayHello(s); - } - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/mock/TestBean.java b/java/sca/itest/implementation-spring/src/main/java/mock/TestBean.java deleted file mode 100644 index 1a0abd7f8f..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/mock/TestBean.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 mock; - -/** - * @version $Rev$ $Date$ - */ -public interface TestBean { - String echo(String msg); - - TestBean getBean(); - - void setBean(TestBean bean); - -} diff --git a/java/sca/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java b/java/sca/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java deleted file mode 100644 index e3d9a36bb8..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java +++ /dev/null @@ -1,42 +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 mock; - -/** - * @version $Rev$ $Date$ - */ -public class TestBeanImpl implements TestBean { - - private TestBean bean; - - public TestBeanImpl() { - } - - public String echo(String msg) { - return msg; - } - - public TestBean getBean() { - return bean; - } - - public void setBean(TestBean bean) { - this.bean = bean; - } -} diff --git a/java/sca/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java b/java/sca/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java deleted file mode 100644 index 47342fded8..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java +++ /dev/null @@ -1,39 +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 mock; - -/** - * A simple test Spring bean which provides the HelloWorld service - * - * @version $Rev$ $Date$ - */ - -import helloworld.HelloWorld; - -public class TestHelloWorldBean implements HelloWorld { - - static String hello = "Hello "; - - // Classic "Hello xxx" response to any input message - public String sayHello(String message) { - System.out.println("TestHelloWorldBean - sayHello called"); - return (hello + message); - } - -} // end class TestHelloWorldBean diff --git a/java/sca/itest/implementation-spring/src/main/java/mock/TestReference.java b/java/sca/itest/implementation-spring/src/main/java/mock/TestReference.java deleted file mode 100644 index 6f5b280f31..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/mock/TestReference.java +++ /dev/null @@ -1,27 +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 mock; - -/** - * @version $Rev$ $Date$ - */ -public interface TestReference { - String echo(String msg); -} diff --git a/java/sca/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java b/java/sca/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java deleted file mode 100644 index dea7933e1a..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java +++ /dev/null @@ -1,57 +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 mock; - -/** - * A test Spring bean which provides the HelloWorld service by calling a reference - * to provide the content of the response - * - * @version $Rev$ $Date$ - */ - -import helloworld.HelloWorld; - -public class TestReferenceBean implements HelloWorld { - - // The reference - private HelloWorld bean; - - // Classic "Hello xxx" response to any input message - public String sayHello(String message) { - System.out.println("TestReferenceBean - sayHello called"); - return (bean.sayHello(message)); - } - - /** - * Setter for the bean reference - * @param theBean - */ - public void setBean(HelloWorld theBean) { - this.bean = theBean; - } - - /** - * Getter for the reference - * @return - */ - public HelloWorld getBean() { - return this.bean; - } - -} // end class TestReferenceBean diff --git a/java/sca/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java b/java/sca/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java deleted file mode 100644 index b80b05dc08..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java +++ /dev/null @@ -1,55 +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 mock; - -/** - * A test Spring bean which provides the HelloWorld service. - * This bean has a single String property called "hello" which must be set through - * external configuration to give the correct response message, otherwise an (incorrect) - * default message is generated - * - * @version $Rev$ $Date$ - */ - -import helloworld.HelloWorld; - -public class TestSCAPropertyBean implements HelloWorld { - - private String hello = "Go away"; - - /** - * Provides the operation of the "HelloWorld" interface - a simple string response - * to a string input message, where the response is a greeting followed by the original - * input message. - */ - public String sayHello(String message) { - System.out.println("TestHelloWorldBean - sayHello called"); - return (hello + " " + message); - } - - /** - * Public setter for the (unannotated) field "hello" which constitutes an SCA - * property - * @param message - the message to use for the response to "sayHello" - */ - public void setHello(String message) { - hello = message; - } - -} // end class TestSCAPropertyBean diff --git a/java/sca/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java b/java/sca/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java deleted file mode 100644 index ecb085858d..0000000000 --- a/java/sca/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java +++ /dev/null @@ -1,131 +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 spring.annotations; - -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Service; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.ComponentName; - -import calculator.AddService; -import calculator.CalculatorService; -import calculator.DivideService; -import calculator.MultiplyService; -import calculator.SubtractService; - -/** - * An implementation of the Calculator service. - */ -@Service(CalculatorService.class) -public class CalculatorServiceImpl implements AddService, SubtractService, MultiplyService, DivideService { - - public AddService addService; // setter injection - - @Reference - public SubtractService subtractService; // field injection - - @Reference(name="multiplyService", required=false) - public MultiplyService multiply; // field injection (different reference and field name) - - public DivideService divide; // setter injection (different reference and field name) - - public String message; // setter injection - - @Property(name="message", required=false) - public String message2; // field injection - - public String componentName; - - @Init - public void initMethod () { - System.out.println("Init method is sucessfully called....."); - // Property value should be null here. - System.out.println("Property Value message is...." + message); - } - - @Destroy - public void destroyMethod () { - System.out.println("Component Name is...." + componentName); - System.out.println("Property Value message is...." + message); - System.out.println("Property Value message2 is...." + message2); - System.out.println("Destroy method is sucessfully called....."); - } - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - public AddService getAddService() { - return addService; - } - - /*public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - public SubtractService getSubtractService() { - return subtractService; - }*/ - - @Reference(name="divideService", required=false) - public void setDivideService(DivideService divide) { - this.divide = divide; - } - - public DivideService getDivideService() { - return divide; - } - - /*public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public MultiplyService getMultiplyService() { - return multiplyService; - }*/ - - @ComponentName - public void setComponentName(String componentName) { - this.componentName = componentName; - } - - @Property - public void setMessage(String message) { - this.message = message; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiply.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divide.divide(n1, n2); - } -} diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml deleted file mode 100644 index 81d59432b8..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <sca:service name="CalculatorService" - type="calculator.CalculatorService" target="CalculatorServiceBean"/> - - <bean id="CalculatorServiceBean" class="calculator.CalculatorServiceImpl"> - <property name="addService" ref="addService"/> - <property name="subtractService" ref="subtractService"/> - <property name="multiplyService" ref="multiplyService"/> - <property name="divideService" ref="divideService"/> - </bean> - - <bean id="contextAccess" class="context.access.SCAApplicationContextProvider"> - </bean> - - <sca:reference name="addService" type="calculator.AddService"/> - <sca:reference name="subtractService" type="calculator.SubtractService"/> - <sca:reference name="multiplyService" type="calculator.MultiplyService"/> - <sca:reference name="divideService" type="calculator.DivideService"/> - -</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite b/java/sca/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite deleted file mode 100644 index abdaa98bff..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://contextaccess" - xmlns:sample="http://contextaccess" - name="ContextAccess" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> - - <component name="CalculatorServiceComponent"> - <implementation.spring location="CalculatorService-context.xml"/> - <reference name="addService" target="AddServiceComponent" /> - <reference name="subtractService" target="SubtractServiceComponent" /> - <reference name="multiplyService" target="MultiplyServiceComponent" /> - <reference name="divideService" target="DivideServiceComponent" /> - </component> - - <component name="AddServiceComponent"> - <implementation.java class="calculator.AddServiceImpl"/> - </component> - - <component name="SubtractServiceComponent"> - <implementation.java class="calculator.SubtractServiceImpl"/> - </component> - - <component name="MultiplyServiceComponent"> - <implementation.java class="calculator.MultiplyServiceImpl"/> - </component> - - <component name="DivideServiceComponent"> - <implementation.java class="calculator.DivideServiceImpl"/> - </component> -</composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite b/java/sca/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite deleted file mode 100644 index dd186bddfc..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://contextimports" - xmlns:sample="http://contextimports" - name="ContextImports" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> - - <component name="CalculatorServiceComponent"> - <implementation.spring location="META-INF/spring/SpringImport-context.xml"/> - <reference name="addService" target="AddServiceComponent" /> - <reference name="subtractService" target="SubtractServiceComponent" /> - <reference name="multiplyService" target="MultiplyServiceComponent" /> - <reference name="divideService" target="DivideServiceComponent" /> - </component> - - <component name="AddServiceComponent"> - <implementation.java class="calculator.AddServiceImpl"/> - </component> - - <component name="SubtractServiceComponent"> - <implementation.java class="calculator.SubtractServiceImpl"/> - </component> - - <component name="MultiplyServiceComponent"> - <implementation.java class="calculator.MultiplyServiceImpl"/> - </component> - - <component name="DivideServiceComponent"> - <implementation.java class="calculator.DivideServiceImpl"/> - </component> -</composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml deleted file mode 100644 index c50f0ef4d9..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <bean id="CalculatorServiceBean" class="calculator.CalculatorServiceImpl"> - <property name="addService" ref="addService"/> - <property name="subtractService" ref="subtractService"/> - <property name="multiplyService" ref="multiplyService"/> - <property name="divideService" ref="divideService"/> - </bean> - - <sca:reference name="addService" type="calculator.AddService"/> - <sca:reference name="subtractService" type="calculator.SubtractService"/> - <sca:reference name="multiplyService" type="calculator.MultiplyService"/> - <sca:reference name="divideService" type="calculator.DivideService"/> - -</beans> diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml deleted file mode 100644 index a0bb10e8dd..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <import resource="CalculatorService-context.xml"/> - -</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite deleted file mode 100644 index 1c4b81db33..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://stockquote" - xmlns:hw="http://stockquote" - name="MultipleContext"> - - <component name="StockQuoteServiceComponent"> - <implementation.spring location="springapp"/> - </component> - -</composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF deleted file mode 100644 index 9267f28e83..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0
-Spring-Context: META-INF/spring/beanRefContext.xml; META-INF/spring/StockQuoteService-context.xml
-
diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml deleted file mode 100644 index 62e4e077b6..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<!-- Application context for the SpringHelloWorld testcase --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" -http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd -http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <bean id="testBean" class="org.apache.tuscany.sca.itest.spring.TestHelloWorldBean" lazy-init="true"> - </bean> - -</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml deleted file mode 100644 index 5b1885d6b3..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <sca:service name="StockQuoteService" - type="bigbank.stockquote.StockQuoteService" target="StockQuoteServiceBean"/> - - <bean id="StockQuoteServiceBean" class="bigbank.stockquote.StockQuoteImpl"> - </bean> - - <bean id="applicationContextProvider" class="context.access.SCAApplicationContextProvider"> - </bean> - -</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml deleted file mode 100644 index dcc88f6770..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <bean id="beanRefFactory" class="org.springframework.context.support.ClassPathXmlApplicationContext"> - <constructor-arg> - <list> - <value>context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml</value> - </list> - </constructor-arg> - </bean> -</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config b/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config deleted file mode 100644 index 0e7cb86633..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config +++ /dev/null @@ -1,3 +0,0 @@ -Calculator {
- calculator.security.JaasLoginModule required debug=true;
-};
diff --git a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties b/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties deleted file mode 100644 index 0238f0b013..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties +++ /dev/null @@ -1,18 +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. -CALLING_OPERATION=Inovoking operation {0} with arguments {1} -OPERATION_RETURNED=Returning from operation {0} with return value {1}
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite b/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite deleted file mode 100644 index 1000e616a7..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="Calculator" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> - - <component name="CalculatorServiceComponent"> - <implementation.spring location="META-INF/spring/CalculatorService-context.xml"/> - <reference name="addService" target="AddServiceComponent" /> - <reference name="subtractService" target="SubtractServiceComponent" /> - <reference name="multiplyService" target="MultiplyServiceComponent" requires="tuscany:jaasAuthentication"/> - <reference name="divideService" target="DivideServiceComponent" /> - </component> - - <component name="AddServiceComponent"> - <implementation.java class="calculator.AddServiceImpl"/> - </component> - - <component name="SubtractServiceComponent"> - <implementation.java class="calculator.SubtractServiceImpl"/> - </component> - - <component name="MultiplyServiceComponent"> - <implementation.java class="calculator.MultiplyServiceImpl" requires="tuscany:jaasAuthentication"/> - </component> - - <component name="DivideServiceComponent"> - <implementation.java class="calculator.DivideServiceImpl"/> - </component> - - <component name="AnotherCalculatorServiceComponent"> - <implementation.spring location="META-INF/spring/CalculatorService-context.xml" requires="tuscany:logging"/> - <reference name="addService" target="AddServiceComponent" /> - <reference name="subtractService" target="SubtractServiceComponent" /> - <reference name="multiplyService" target="MultiplyServiceComponent" requires="tuscany:jaasAuthentication"/> - <reference name="divideService" target="DivideServiceComponent" /> - </component> - -</composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml deleted file mode 100644 index c50f0ef4d9..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <bean id="CalculatorServiceBean" class="calculator.CalculatorServiceImpl"> - <property name="addService" ref="addService"/> - <property name="subtractService" ref="subtractService"/> - <property name="multiplyService" ref="multiplyService"/> - <property name="divideService" ref="divideService"/> - </bean> - - <sca:reference name="addService" type="calculator.AddService"/> - <sca:reference name="subtractService" type="calculator.SubtractService"/> - <sca:reference name="multiplyService" type="calculator.MultiplyService"/> - <sca:reference name="divideService" type="calculator.DivideService"/> - -</beans> diff --git a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/definitions.xml b/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/definitions.xml deleted file mode 100644 index 278c94a18e..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/definitions.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * 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. ---> -<definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:calc="http://calculator"> - - <!-- PolicySets --> - <policySet name="JaasPolicy" provides="tuscany:jaasAuthentication" appliesTo="sca:implementation.java" - xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <tuscany:jaasAuthentication> - <tuscany:configurationName>Calculator</tuscany:configurationName> - <tuscany:callbackHandler>calculator.security.CalculatorCallbackHandler</tuscany:callbackHandler> - </tuscany:jaasAuthentication> - </policySet> - - <!-- PolicySets --> - <policySet name="JDKLoggingPolicy" provides="tuscany:logging" appliesTo="sca:implementation.spring" - xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <tuscany:jdkLogger name="calculator"> - <logLevel>FINER</logLevel> - </tuscany:jdkLogger> - </policySet> -</definitions>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite b/java/sca/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite deleted file mode 100644 index 2731fc455f..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<!-- Composite for the SpringSCAPropertyTestCase - * This composite has the HelloWorldComponent implemented with a Spring implementation where - * the Spring application context uses an explicit SCA property. The value of the property - * is set in this composite and is used to compute the response to a service invocation from - * the ClientComponent. - --> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://SpringFolderLocation" - name="SpringFolderLocation"> - - <component name="ClientComponent"> - <implementation.java class="helloworld.HelloWorldProxy"/> - <reference name="delegate" target="HelloWorldComponent"/> - </component> - - <component name="HelloWorldComponent"> - <implementation.spring location="springapp"/> - <property name="TestProperty">Hello</property> - </component> - -</composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF b/java/sca/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF deleted file mode 100644 index 950dbeba4c..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0
-Spring-Context: META-INF/spring/SpringSCAProperty-context.xml
-
diff --git a/java/sca/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml b/java/sca/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml deleted file mode 100644 index 8613e6c82a..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<!-- Application context for the SpringHelloWorld testcase --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" -http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd -http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <bean id="testBean" class="mock.TestSCAPropertyBean" lazy-init="true"> - <property name="hello" ref="TestProperty"/> - </bean> - - <sca:property id="foo" name="TestProperty" type="java.lang.String"/> - -</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite b/java/sca/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite deleted file mode 100644 index e8357cc62e..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<!-- Composite for the SpringSCAPropertyTestCase - * This composite has the HelloWorldComponent implemented with a Spring implementation where - * the Spring application context uses an explicit SCA property. The value of the property - * is set in this composite and is used to compute the response to a service invocation from - * the ClientComponent. - --> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://SpringJarLocation" - name="SpringJarLocation"> - - <component name="ClientComponent"> - <implementation.java class="helloworld.HelloWorldProxy"/> - <reference name="delegate" target="HelloWorldComponent"/> - </component> - - <component name="HelloWorldComponent"> - <implementation.spring location="spring-context.jar"/> - <property name="TestProperty">Hello</property> - </component> - -</composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar b/java/sca/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar Binary files differdeleted file mode 100644 index 504d59e5ff..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar +++ /dev/null diff --git a/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml b/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml deleted file mode 100644 index 9912624870..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<!-- Application context for the SpringHelloWorld testcase --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" -http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd -http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <sca:service name="HelloWorld" type="helloworld.HelloWorld" target="testBean"/> - - <bean id="delegateBean" - class="org.apache.tuscany.sca.itest.spring.TestHelloWorldBean" lazy-init="true"> - </bean> - - <bean id="testBean" - class="org.apache.tuscany.sca.itest.spring.TestHelloWorldDelegatorBean" lazy-init="true"> - <property name="delegate"><ref bean="delegateBean"/></property> - </bean> - -</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml b/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml deleted file mode 100644 index 62e4e077b6..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<!-- Application context for the SpringHelloWorld testcase --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" -http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd -http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <bean id="testBean" class="org.apache.tuscany.sca.itest.spring.TestHelloWorldBean" lazy-init="true"> - </bean> - -</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite b/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite deleted file mode 100644 index b8389be7f6..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://SpringDelegationHelloWorld" - name="SpringDelegationHelloWorld"> - - <component name="ClientComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.spring.HelloWorldProxy"/> - <reference name="delegate" target="HelloWorldComponent"/> - </component> - - <component name="HelloWorldComponent"> - <implementation.spring location="META-INF/spring/SpringDelegationHelloWorld-context.xml"/> - </component> - -</composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite b/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite deleted file mode 100644 index 8d1a655c4e..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="SpringHelloWorld" - name="SpringHelloWorld"> - - <component name="ClientComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.spring.HelloWorldProxy"/> - <reference name="delegate" target="HelloWorldComponent"/> - </component> - - <component name="HelloWorldComponent"> - <implementation.spring location="META-INF/spring/SpringHelloWorld-context.xml"/> - </component> - -</composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml b/java/sca/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml deleted file mode 100644 index 1705164104..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" -http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd -http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <bean id="testBean" class="mock.TestReferenceBean"> - <property name="bean" ref="testReference"/> - </bean> - - <sca:reference name="testReference" type="helloworld.HelloWorld"/> - -</beans> diff --git a/java/sca/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml b/java/sca/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml deleted file mode 100644 index 539dfa6e32..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" -http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd -http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <bean id="testBean" class="mock.TestReferenceBean"> - <!-- Here is the implicit reference - a property with a ref not satisifed within the - * Spring application context. - --> - <property name="bean" ref="testReference"/> - </bean> - -</beans> diff --git a/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite b/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite deleted file mode 100644 index 294b211431..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://SpringExplicitReference" - name="SpringExplicitReference"> - - <component name="ClientComponent"> - <implementation.spring location="META-INF/spring/SpringExplicitReference-context.xml"/> - <reference name="testReference" target="ExplicitReferenceComponent"/> - </component> - - <component name="ExplicitReferenceComponent"> - <implementation.java class="helloworld.HelloWorldImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite b/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite deleted file mode 100644 index c77ab00323..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<!-- Composite for the SpringImplicitReferenceTestCase - * This composite has a ClientComponent implemented with a Spring implementation where - * Spring application context uses an implicit reference definition through a Bean with - * a property with an unsatisfied ref attribute, which forms the reference. - * The reference is satisified by a wire to a ReferenceComponent which is implemented - * by a plain Java POJO. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://SpringImplicitReference" - name="SpringImplicitReference"> - - <component name="ClientComponent"> - <implementation.spring location="META-INF/spring/SpringImplicitReference-context.xml"/> - <reference name="testReference" target="ImplicitReferenceComponent"/> - </component> - - <component name="ImplicitReferenceComponent"> - <implementation.java class="helloworld.HelloWorldImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml deleted file mode 100644 index 42e0cdbd23..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<!-- Application context for the SpringExplicitHelloWorld testcase -In this case, the service offered by the Spring application is specified -explicitly using an sca:service element --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" -http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd -http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <sca:service name="fooService" - type="helloworld.HelloWorld" - target="testBean"/> - - <bean id="testBean" - class="mock.TestHelloWorldBean" - lazy-init="true"> - </bean> - -</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml deleted file mode 100644 index 83558e8abc..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<!-- Application context for the SpringHelloWorld testcase --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" -http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd -http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <bean id="testBean" class="mock.TestHelloWorldBean" lazy-init="true"> - </bean> - -</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite b/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite deleted file mode 100644 index b7c45b289f..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - targetNamespace="http://SpringExplicitService" - name="SpringExplicitService"> - - <component name="ClientComponent"> - <implementation.java class="helloworld.HelloWorldProxy"/> - <reference name="delegate" target="ExplicitServiceComponent"/> - </component> - - <component name="ExplicitServiceComponent"> - <implementation.spring location="META-INF/spring/SpringExplicitService-context.xml"/> - </component> - -</composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite b/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite deleted file mode 100644 index e1ccbcf3c6..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://SpringImplicitService" - name="SpringImplicitService"> - - <component name="ClientComponent"> - <implementation.java class="helloworld.HelloWorldProxy"/> - <reference name="delegate" target="ImplicitServiceComponent"/> - </component> - - <component name="ImplicitServiceComponent"> - <implementation.spring location="META-INF/spring/SpringImplicitService-context.xml"/> - </component> - -</composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite b/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite deleted file mode 100644 index 236e2b23e6..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite targetNamespace="http://sample" - xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:sample="http://sample" - name="Calculator" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> - - <component name="CalculatorServiceComponent"> - <implementation.spring location="CalculatorService-context.xml"/> - <property name="message">HelloWorld</property> - <reference name="addService" target="AddServiceComponent" /> - <reference name="subtractService" target="SubtractServiceComponent" /> - <reference name="multiplyService" target="MultiplyServiceComponent" /> - <reference name="divideService" target="DivideServiceComponent" /> - </component> - - <component name="AddServiceComponent"> - <implementation.java class="calculator.AddServiceImpl"/> - </component> - - <component name="SubtractServiceComponent"> - <implementation.java class="calculator.SubtractServiceImpl"/> - </component> - - <component name="MultiplyServiceComponent"> - <implementation.java class="calculator.MultiplyServiceImpl"/> - </component> - - <component name="DivideServiceComponent"> - <implementation.java class="calculator.DivideServiceImpl"/> - </component> - - <!--<component name="AnotherCalculatorServiceComponent"> - <implementation.spring location="CalculatorService-context.xml"/> - <property name="message">HelloWorld</property> - <reference name="addService" target="AddServiceComponent" /> - <reference name="subtractService" target="SubtractServiceComponent" /> - <reference name="multiplyService" target="MultiplyServiceComponent" /> - <reference name="divideService" target="DivideServiceComponent" /> - </component> - ---></composite> diff --git a/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml deleted file mode 100644 index 4a873f2424..0000000000 --- a/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <bean id="CalculatorServiceBean" class="spring.annotations.CalculatorServiceImpl"> - <property name="addService" ref="addService"/> - <!-- <property name="subtractService" ref="subtractService"/> - <property name="multiplyService" ref="multiplyService"/> --> - <property name="divideService" ref="divideService"/> - </bean> - - <sca:reference name="addService" type="calculator.AddService"/> - <sca:reference name="subtractService" type="calculator.SubtractService"/> - <sca:reference name="multiplyService" type="calculator.MultiplyService"/> - <sca:reference name="divideService" type="calculator.DivideService"/> - - <sca:property id="msg" name="message" type="java.lang.String"/> - -</beans> diff --git a/java/sca/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java b/java/sca/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java deleted file mode 100644 index 4503294f10..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java +++ /dev/null @@ -1,60 +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 context.access; - -import java.io.File; -import org.apache.tuscany.sca.node.Client; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.node.Contribution; -import org.springframework.context.ApplicationContext; - -import context.access.SCAApplicationContextProvider; -import calculator.CalculatorService; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - NodeFactory factory = NodeFactory.newInstance(); - Node node = factory.createNode(new File("src/main/resources/context/access/ContextAccess.composite").toURI().toURL().toString(), - new Contribution("TestContribution", new File("src/main/resources/context/access/").toURI().toURL().toString())); - node.start(); - - // Code: To access the Spring Application Context instance - ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext(); - if (ctx.containsBean("CalculatorServiceBean")) - System.out.println("CalculatorServiceBean is now available for use..."); - - CalculatorService calculatorService = - ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent"); - - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - node.stop(); - } - -} diff --git a/java/sca/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java b/java/sca/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java deleted file mode 100644 index 2602839d1d..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java +++ /dev/null @@ -1,32 +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 context.access; - -import junit.framework.TestCase; - -/** - * Tests out the big bank service - * - */ -public class ContextAccessTestCase extends TestCase { - - public void testServer() throws Exception { - CalculatorClient.main(new String[] {""}); - } -} diff --git a/java/sca/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java b/java/sca/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java deleted file mode 100644 index 254b8100e1..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java +++ /dev/null @@ -1,53 +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 context.imports; - -import java.io.File; - -import org.apache.tuscany.sca.node.Client; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.node.Contribution; -import calculator.CalculatorService; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - NodeFactory factory = NodeFactory.newInstance(); - Node node = factory.createNode(new File("src/main/resources/context/imports/ContextImports.composite").toURI().toURL().toString(), - new Contribution("TestContribution", new File("src/main/resources/context/imports/").toURI().toURL().toString())); - node.start(); - - CalculatorService calculatorService = - ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent"); - - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - node.stop(); - } - -} diff --git a/java/sca/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java b/java/sca/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java deleted file mode 100644 index 8df60c5bab..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java +++ /dev/null @@ -1,32 +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 context.imports; - -import junit.framework.TestCase; - -/** - * Tests out the big bank service - * - */ -public class ContextImportsTestCase extends TestCase { - - public void testServer() throws Exception { - CalculatorClient.main(new String[] {""}); - } -} diff --git a/java/sca/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java b/java/sca/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java deleted file mode 100644 index f5261c85bb..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java +++ /dev/null @@ -1,32 +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 context.multiple; - -import junit.framework.TestCase; - -/** - * Tests out the big bank service - * - */ -public class MultipleContextTestCase extends TestCase { - - public void testServer() throws Exception { - StockQuoteServer.main(new String[] {"1000"}); - } -} diff --git a/java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java b/java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java deleted file mode 100644 index 9ff1b74567..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java +++ /dev/null @@ -1,54 +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 context.multiple; - -import java.io.File; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.springframework.context.ApplicationContext; -import context.access.SCAApplicationContextProvider; - -/** - * This server program shows how to bootstrap SCA from a simple J2SE program - * and start it which activates the StockQuote Web service endpoint. - */ -public class StockQuoteServer { - - public static void main(String[] args) throws Exception { - - NodeFactory factory = NodeFactory.newInstance(); - Node node = factory.createNode(new File("src/main/resources/context/multiple/MultipleContext.composite").toURI().toURL().toString(), - new Contribution("TestContribution", new File("src/main/resources/context/multiple/").toURI().toURL().toString())); - node.start(); - - // Method 1: To access the Spring Application Context instance - ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext(); - if (ctx.containsBean("StockQuoteServiceBean")) - System.out.println("StockQuoteServiceBean is now available for use..."); - - System.out.println("Press Enter to Exit..."); - Thread.sleep(1000); - - node.stop(); - System.out.println("Bye"); - } -} diff --git a/java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java b/java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java deleted file mode 100644 index 8b12dd7af7..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java +++ /dev/null @@ -1,76 +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 implementation.policies; - -import java.io.File; - -import javax.security.auth.login.Configuration; -import org.apache.tuscany.sca.node.Client; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import calculator.CalculatorService; - - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - try { - Configuration secConf = Configuration.getConfiguration(); - } catch (java.lang.SecurityException e) { - System.setProperty("java.security.auth.login.config", CalculatorClient.class.getClassLoader() - .getResource("implementation/policies/CalculatorJass.config").toString()); - } - - NodeFactory factory = NodeFactory.newInstance(); - Node node = factory.createNode(new File("src/main/resources/implementation/policies/ImplementationPolicies.composite").toURI().toURL().toString(), - new Contribution("TestContribution", new File("src/main/resources/implementation/policies/").toURI().toURL().toString())); - node.start(); - - CalculatorService calculatorService = - ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent"); - - // Calculate - System.out.println("Calling CalculatorServiceComponent configured with 'logging' " + - "policy for subtract and divide operations..."); - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - calculatorService = - ((Client)node).getService(CalculatorService.class, "AnotherCalculatorServiceComponent"); - - // Calculate - System.out.println("Calling CalculatorServiceComponent configured with 'logging' " + - "for all operations in the implementation..."); - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - node.stop(); - System.out.println("Bye"); - } - -} diff --git a/java/sca/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java b/java/sca/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java deleted file mode 100644 index a44ae38d24..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java +++ /dev/null @@ -1,32 +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 implementation.policies; - -import junit.framework.TestCase; - -/** - * Tests out the big bank service - * - */ -public class ImplementationPoliciesTestCase extends TestCase { - - public void testServer() throws Exception { - CalculatorClient.main(new String[] {""}); - } -} diff --git a/java/sca/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java b/java/sca/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java deleted file mode 100644 index d54f0544d8..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java +++ /dev/null @@ -1,45 +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 location.folder; - -import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; - -/** - * A test case designed to test the implementation of Properties from a Spring application - * context, where the properties are explicit, through the presence of an sca:property - * element within the Spring application context - * - * The artifacts involved in this test are: - * - * 1) A composite containing a component with a Spring implementation - * 2) The <implementation.spring.../> element references an application context that - * uses an explicit sca:property element which is used to compute the response to an invocation - * of the service of the implementation - * - * @version $Rev$ $Date$ - */ -public class SpringFolderLocationTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringFolderLocationTestCase() { - super("SpringFolderLocation.composite", "location/folder/"); - } -} - diff --git a/java/sca/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java b/java/sca/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java deleted file mode 100644 index 71768f5a7b..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java +++ /dev/null @@ -1,45 +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 location.jar; - -import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; - -/** - * A test case designed to test the implementation of Properties from a Spring application - * context, where the properties are explicit, through the presence of an sca:property - * element within the Spring application context - * - * The artifacts involved in this test are: - * - * 1) A composite containing a component with a Spring implementation - * 2) The <implementation.spring.../> element references an application context that - * uses an explicit sca:property element which is used to compute the response to an invocation - * of the service of the implementation - * - * @version $Rev$ $Date$ - */ -public class SpringJarLocationTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringJarLocationTestCase() { - super("SpringJarLocation.composite", "location/jar/"); - } -} - diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java deleted file mode 100644 index 0c6f8d2e84..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java +++ /dev/null @@ -1,44 +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 org.apache.tuscany.sca.itest.spring; - - -/** - * Basic "hello world" style test case for testing Spring component implementation - * - */ -public abstract class AbstractHelloWorldTestCase extends AbstractSCATestCase<HelloWorld> { - - /** - * Calls the hello world service and checks that it gives the right response... - */ - public AbstractHelloWorldTestCase(String compositeName, String contributionLocation) { - super(compositeName, contributionLocation); - } - - public void testHello() throws Exception { - assertEquals("Hello petra", service.sayHello("petra")); - } - - @Override - protected Class<HelloWorld> getServiceClass() { - return HelloWorld.class; - } -} diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java deleted file mode 100644 index 73b151bf7a..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java +++ /dev/null @@ -1,60 +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 org.apache.tuscany.sca.itest.spring; - -import java.io.File; -import junit.framework.TestCase; -import java.net.MalformedURLException; - -import org.apache.tuscany.sca.node.Client; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -public abstract class AbstractSCATestCase<T> extends TestCase { - - protected Node node; - protected T service; - protected String compositeName; - protected String contributionLocation; - - public AbstractSCATestCase(String compositeName, String contributionLocation) { - super(); - this.compositeName = compositeName; - this.contributionLocation = contributionLocation; - } - - @Override - protected void setUp() throws Exception { - NodeFactory factory = NodeFactory.newInstance(); - node = factory.createNode(new File("src/main/resources/" + contributionLocation + compositeName).toURI().toURL().toString(), - new Contribution("TestContribution", new File("src/main/resources/" + contributionLocation).toURI().toURL().toString())); - node.start(); - service = ((Client)node).getService(getServiceClass(), "ClientComponent"); - } - - abstract protected Class<T> getServiceClass(); - - @Override - protected void tearDown() throws Exception { - node.stop(); - } -} diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java deleted file mode 100644 index 5869d344f6..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.itest.spring; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * Interface for the "hello world" service - predictably simple with a single operation - * "sayHello" - * - */ -@Remotable -public interface HelloWorld { - - public String sayHello(String s); - -} diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java deleted file mode 100644 index 90d26dd89f..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.itest.spring; - -import org.oasisopen.sca.annotation.Reference; - -/** - * A simple proxy Java class which implements the HelloWorld interface but which uses - * a reference "delegate" to actually provide the HelloWorld service - * - */ -public class HelloWorldProxy implements HelloWorld { - - // Here is the reference "delegate" - it implements the HelloWorld interface... - @Reference - public HelloWorld delegate; - - public String sayHello(String s) { - // Simply call the reference to satisfy the service request... - System.out.println("HelloWorldProxy - calling sayHello"); - return delegate.sayHello(s); - } - -} diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java deleted file mode 100644 index f28dace31a..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.itest.spring; - -/** - * A basic test case of: - * 1) A composite containing a component with a Spring implementation - * 2) The composite has a component with a Java POJO implementation which uses the - * Spring implementation to satisfy a reference - * - */ -public class SpringDelegationHelloWorldTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringDelegationHelloWorldTestCase() { - super("SpringDelegationHelloWorld.composite", "org/apache/tuscany/sca/itest/spring/"); - } -} diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java deleted file mode 100644 index def30b3ea0..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java +++ /dev/null @@ -1,36 +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 org.apache.tuscany.sca.itest.spring; - -/** - * A basic test case of: - * 1) A composite containing a component with a Spring implementation - * 2) The composite has a component with a Java POJO implementation which uses the - * Spring implementation to satisfy a reference - * 3) The Spring component delegates function to a second spring bean - * - */ -public class SpringHelloWorldTestCase extends AbstractHelloWorldTestCase { - - // super class does it all getting composite based on this class name - public SpringHelloWorldTestCase() { - super("SpringHelloWorld.composite", "org/apache/tuscany/sca/itest/spring/"); - } -} diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java deleted file mode 100644 index fa7967c964..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java +++ /dev/null @@ -1,36 +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 org.apache.tuscany.sca.itest.spring; - -/** - * A simple test Spring bean which provides the HelloWorld service - * - */ - -public class TestHelloWorldBean implements HelloWorld { - - static String hello = "Hello "; - - // Classic "Hello xxx" response to any input message - public String sayHello(String message) { - System.out.println("TestHelloWorldBean - sayHello called"); - return (hello + message); - } - -} // end class TestHelloWorldBean diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java deleted file mode 100644 index b57cc7f366..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java +++ /dev/null @@ -1,40 +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 org.apache.tuscany.sca.itest.spring; - -/** - * A simple test Spring bean which delgates to another bean - * - */ - -public class TestHelloWorldDelegatorBean implements HelloWorld { - - HelloWorld delegate; - - public void setDelegate(HelloWorld delegate) { - this.delegate = delegate; - } - - // Classic "Hello xxx" response to any input message - public String sayHello(String message) { - System.out.println("TestHelloWorldDelegatorBean - sayHello called"); - return delegate.sayHello(message); - } - -} diff --git a/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java b/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java deleted file mode 100644 index 0c2e1daa81..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java +++ /dev/null @@ -1,45 +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 sca.references; - -import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; - -/** - * A test case designed to test the implementation of References from a Spring application - * context, where the references are explicit, through the presence of an sca:reference - * element within the Spring application context - * - * The artifacts involved in this test are: - * - * 1) A composite containing a component with a Spring implementation which makes - * a reference to a second component - * 2) The composite has a component with a Java POJO implementation which satisfies the reference - * 3) The <implementation.spring.../> element references an application context that - * uses an explicit sca:reference element to identify the reference made by the Spring application - * - * @version $Rev$ $Date$ - */ -public class SpringExplicitReferenceTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringExplicitReferenceTestCase() { - super("SpringExplicitReference.composite", "sca/references/"); - } -} diff --git a/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java b/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java deleted file mode 100644 index 8d0c548899..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java +++ /dev/null @@ -1,48 +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 sca.references; - -import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; - -/** - * A test case designed to test the implementation of References from a Spring application - * context, where the references are implicit, through the presence of Bean properties with a - * ref attribute which is not satisfied by a Bean within the application context. - * - * The artifacts involved in this test are: - * - * 1) A composite containing a component with a Spring implementation which makes - * a reference to a second component - * 2) The composite has a component with a Java POJO implementation which satisfies the reference - * 3) The <implementation.spring.../> element references an application context that - * does not use an explicit sca:reference element to identify the reference made by the - * Spring application, but relies on an unsatisfied Bean property with a ref attribute. - * - * @version $Rev$ $Date$ - */ -public class SpringImplicitReferenceTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringImplicitReferenceTestCase() { - super("SpringImplicitReference.composite", "sca/references/"); - } -} - - diff --git a/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java b/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java deleted file mode 100644 index f4bd53876c..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java +++ /dev/null @@ -1,40 +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 sca.services; - -import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; - -/** - * A basic test case of: - * 1) A composite containing a component with a Spring implementation - * 2) The composite has a component with a Java POJO implementation which uses the - * Spring implementation to satisfy a reference - * 3) The <implementation.spring.../> element references an application context that - * uses an explicit sca: element to identify the service offered by the Spring application - * - * @version $Rev$ $Date$ - */ -public class SpringExplicitServiceTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringExplicitServiceTestCase() { - super("SpringExplicitService.composite", "sca/services/"); - } -} diff --git a/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java b/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java deleted file mode 100644 index 0907985d7f..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java +++ /dev/null @@ -1,38 +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 sca.services; - -import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; - -/** - * A basic test case of: - * 1) A composite containing a component with a Spring implementation - * 2) The composite has a component with a Java POJO implementation which uses the - * Spring implementation to satisfy a reference - * - * @version $Rev$ $Date$ - */ -public class SpringImplicitServiceTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringImplicitServiceTestCase() { - super("SpringImplicitService.composite", "sca/services/"); - } -} diff --git a/java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java b/java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java deleted file mode 100644 index 13b84c8c73..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java +++ /dev/null @@ -1,55 +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 spring.annotations; - -import java.io.File; - -import org.apache.tuscany.sca.node.Client; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import calculator.CalculatorService; - - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - NodeFactory factory = NodeFactory.newInstance(); - Node node = factory.createNode(new File("src/main/resources/spring/annotations/Calculator.composite").toURI().toURL().toString(), - new Contribution("TestContribution", new File("src/main/resources/spring/annotations/").toURI().toURL().toString())); - node.start(); - - CalculatorService calculatorService = - ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent"); - - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - node.stop(); - System.out.println("Bye"); - } - -} diff --git a/java/sca/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java b/java/sca/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java deleted file mode 100644 index 5db9c84c00..0000000000 --- a/java/sca/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java +++ /dev/null @@ -1,32 +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 spring.annotations; - -import junit.framework.TestCase; - -/** - * Tests out the big bank service - * - */ -public class SpringAnnotationsTestCase extends TestCase { - - public void testServer() throws Exception { - CalculatorClient.main(new String[] {""}); - } -} diff --git a/java/sca/itest/interfaces/pom.xml b/java/sca/itest/interfaces/pom.xml deleted file mode 100644 index 09a969d146..0000000000 --- a/java/sca/itest/interfaces/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-interfaces</artifactId> - <name>Apache Tuscany SCA iTest Interface</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java b/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java deleted file mode 100644 index f4131593d5..0000000000 --- a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.itest.interfaces; - -/** - * only for callBack - */ -public interface LocalCallbackInterface { - - void callbackMethod(String str); - - void modifyParameter(ParameterObject po); - -} diff --git a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java b/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java deleted file mode 100644 index 5fc9ed51b3..0000000000 --- a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java +++ /dev/null @@ -1,47 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.OneWay; - -/* - * itest for interface: local,method-overloading - */ -public interface LocalClientComponent { - - String foo1(ParameterObject po); - - String foo1(String str) throws Exception; - - String foo2(String str, int i); - - String foo2(int i, String str) throws Exception; - - void callback(String str); - - void callModifyParameter(); - - @OneWay - void onewayMethod(String str); - - String getCallbackValue(); - - String getOnewayValue(); -} diff --git a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java b/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java deleted file mode 100644 index 6cd937af12..0000000000 --- a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java +++ /dev/null @@ -1,83 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(LocalClientComponent.class) -public class LocalClientComponentImpl implements LocalClientComponent, LocalCallbackInterface { - - @Reference - protected LocalServiceComponent aCallBackService; - private static String callbackValue; - private static String onewayValue; - - public String foo1(ParameterObject po) { - po.field1 = "AComponent"; - return "AComponent"; - } - - public String foo1(String str) throws Exception { - return str + "AComponent"; - } - - public String foo2(String str, int i) { - return str + "AComponent" + i; - } - - public String foo2(int i, String str) throws Exception { - return str + "AComponent" + i; - } - - public void callback(String str) { - aCallBackService.callback(str); - } - - public void callbackMethod(String str) { - callbackValue = str; - } - - public void callModifyParameter() { - this.aCallBackService.modifyParameter(); - } - - public String getCallbackValue() { - return callbackValue; - } - - public void onewayMethod(String str) { - onewayValue = str; - try { - Thread.sleep(200); - } catch (Exception e) { - //do nothing - } - } - - public String getOnewayValue() { - return onewayValue; - } - - public void modifyParameter(ParameterObject po) { - po.field1 = "AComponent"; - } - -} diff --git a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java b/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java deleted file mode 100644 index 05a9d09bdd..0000000000 --- a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java +++ /dev/null @@ -1,37 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Callback; - -/** - * Local be-directional callBackService - */ -@Callback(LocalCallbackInterface.class) -public interface LocalServiceComponent { - - String foo(String str); - - void callback(String str); - - void modifyParameter(); - - ParameterObject getPO(); - -} diff --git a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java b/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java deleted file mode 100644 index ab0b18191c..0000000000 --- a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java +++ /dev/null @@ -1,49 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -@Service(LocalServiceComponent.class) -public class LocalServiceComponentImpl implements LocalServiceComponent { - - @Callback - protected LocalCallbackInterface callback; - - private static ParameterObject po; - - public void callback(String str) { - callback.callbackMethod(str); - } - - public void modifyParameter() { - po = new ParameterObject("CallBack"); - callback.modifyParameter(po); - } - - public String foo(String str) { - return str; - } - - public ParameterObject getPO() { - return po; - } - -} diff --git a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java b/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java deleted file mode 100644 index 724d94dffb..0000000000 --- a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java +++ /dev/null @@ -1,48 +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 org.apache.tuscany.sca.itest.interfaces; - -import java.io.Serializable; - -public class ParameterObject implements Serializable { - private static final long serialVersionUID = 1L; - public String field1; - - public ParameterObject() { - this.field1 = null; - } - - public ParameterObject(String field1) { - this.field1 = field1; - } - - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ParameterObject) { - ParameterObject other = (ParameterObject)o; - if (field1 != null) { - return field1.equals(other.field1); - } - } - return false; - } -} diff --git a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java b/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java deleted file mode 100644 index be3fa4c15a..0000000000 --- a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * only for callBack - */ -@Remotable -public interface RemoteCallbackInterface { - - void callbackMethod(String str); - - void modifyParameter(ParameterObject po); -} diff --git a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java b/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java deleted file mode 100644 index 9f34dfd274..0000000000 --- a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java +++ /dev/null @@ -1,64 +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. - */ -/* - * 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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Remotable; - -/* - * different signatures - */ - -@Remotable -public interface RemoteClientComponent { - - String foo1(ParameterObject po); - - String foo3(ParameterObject po); - - String foo2(int i, String str1) throws Exception; - - void callback(String str); - - void callModifyParameter(); - - String getCallbackValue(); - - void onewayMethod(String str); - - String getOnewayValue(); -} diff --git a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java b/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java deleted file mode 100644 index 541b1f1508..0000000000 --- a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java +++ /dev/null @@ -1,81 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.AllowsPassByReference; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(RemoteClientComponent.class) -public class RemoteClientComponentImpl implements RemoteClientComponent, RemoteCallbackInterface { - - @Reference - protected RemoteServiceComponent aCallBackService; - private static String callbackValue; - private static String onewayValue; - - public String foo1(ParameterObject po) { - po.field1 = "BComponent"; - return "BComponent"; - } - - @AllowsPassByReference - public String foo3(ParameterObject po) { - po.field1 = "BComponent"; - return "BComponent"; - } - - public String foo2(int i, String str) throws Exception { - return str + "BComponent" + i; - } - - public void callback(String str) { - aCallBackService.callback(str); - } - - public void callModifyParameter() { - this.aCallBackService.modifyParameter(); - } - - public void callbackMethod(String str) { - callbackValue = str; - } - - public String getCallbackValue() { - return callbackValue; - } - - public void onewayMethod(String str) { - onewayValue = str; - try { - Thread.sleep(200); - } catch (Exception e) { - //do nothing - } - } - - public String getOnewayValue() { - return onewayValue; - } - - public void modifyParameter(ParameterObject po) { - po.field1 = "BComponent"; - } -} diff --git a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java b/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java deleted file mode 100644 index b29b298ab6..0000000000 --- a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(RemoteCallbackInterface.class) -public interface RemoteServiceComponent { - - String foo(String str); - - void callback(String str); - - void modifyParameter(); - - ParameterObject getPO(); - - String[] bar(int[][] intArray); -} diff --git a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java b/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java deleted file mode 100644 index 00a0f5645b..0000000000 --- a/java/sca/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java +++ /dev/null @@ -1,54 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -@Service(RemoteServiceComponent.class) -public class RemoteServiceComponentImpl implements RemoteServiceComponent { - - @Callback - protected RemoteCallbackInterface callback; - - private static ParameterObject po; - - public void callback(String str) { - callback.callbackMethod(str); - } - - public void modifyParameter() { - po = new ParameterObject("CallBack"); - callback.modifyParameter(po); - } - - public String foo(String str) { - return str; - } - - public ParameterObject getPO() { - return po; - } - - public String[] bar(int[][] intArray) { - return new String[] {"int"}; - } - -} diff --git a/java/sca/itest/interfaces/src/main/resources/InterfacesTest.composite b/java/sca/itest/interfaces/src/main/resources/InterfacesTest.composite deleted file mode 100644 index 27ada047b9..0000000000 --- a/java/sca/itest/interfaces/src/main/resources/InterfacesTest.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" xmlns:foo="http://foo" targetNamespace="http://foo" - name="InterfacesTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - - <component name="LocalClientComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.interfaces.LocalClientComponentImpl" /> - <reference name="aCallBackService" target="LocalServiceComponent" /> - </component> - - <component name="RemoteClientComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.interfaces.RemoteClientComponentImpl" /> - <reference name="aCallBackService" target="RemoteServiceComponent" /> - </component> - - <component name="LocalServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.interfaces.LocalServiceComponentImpl" /> - </component> - - <component name="RemoteServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.interfaces.RemoteServiceComponentImpl" /> - </component> - -</composite>
\ No newline at end of file diff --git a/java/sca/itest/interfaces/src/main/resources/InvalidRemoteAttribute.composite b/java/sca/itest/interfaces/src/main/resources/InvalidRemoteAttribute.composite deleted file mode 100644 index c91d49a49a..0000000000 --- a/java/sca/itest/interfaces/src/main/resources/InvalidRemoteAttribute.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" xmlns:foo="http://foo" targetNamespace="http://foo" - name="InvalidRemoteAttribute" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - - <component name="RemoteServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.interfaces.RemoteServiceComponentImpl" /> - <service name="RemoteServiceComponent"> - <interface.java interface="org.apache.tuscany.sca.itest.interfaces.RemoteServiceComponent" remotable="false"/> - </service> - </component> -</composite>
\ No newline at end of file diff --git a/java/sca/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java b/java/sca/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java deleted file mode 100644 index 31e40d59c5..0000000000 --- a/java/sca/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java +++ /dev/null @@ -1,133 +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 org.apache.tuscany.sca.itest.interfaces; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -@Ignore("TUSCANY-3138") -public class InterfacesTestCase { - private static Node node; - - @BeforeClass - public static void init() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("InterfacesTest.composite"); - node = NodeFactory.newInstance().createNode("InterfacesTest.composite", new Contribution("c1", location)); - node.start(); - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testLocalClient() { - LocalServiceComponent service = node.getService(LocalServiceComponent.class, "LocalServiceComponent"); - LocalClientComponent local = node.getService(LocalClientComponent.class, "LocalClientComponent"); - - try { - ParameterObject po = new ParameterObject(); - assertEquals("AComponent", local.foo1(po)); - assertEquals("AComponent", po.field1); - - assertEquals("AAComponent", local.foo1("A")); - - assertEquals("AAComponent1", local.foo2("A", 1)); - assertEquals("AAComponent1", local.foo2(1, "A")); - } catch (Exception e) { - fail(); - } - - try { - // test local callback - local.callback("CallBack"); - Thread.sleep(100); - assertEquals("CallBack", local.getCallbackValue()); - - local.callModifyParameter(); - Thread.sleep(100); - assertEquals("AComponent", service.getPO().field1); - } catch (Exception e) { - e.printStackTrace(); - fail("CallBack failed"); - } - - try { - local.onewayMethod("OneWay"); - Thread.sleep(100); - assertEquals("OneWay", local.getOnewayValue()); - } catch (Exception e) { - fail("OneWay failed"); - } - } - - @Test - public void testRemoteClient() { - RemoteServiceComponent service = node.getService(RemoteServiceComponent.class, "RemoteServiceComponent"); - RemoteClientComponent remote = node.getService(RemoteClientComponent.class, "RemoteClientComponent"); - - try { - // Test Pass By Value - ParameterObject po = new ParameterObject("NotBComponent"); - assertEquals("BComponent", remote.foo1(po)); - assertEquals("NotBComponent", po.field1); - - assertEquals("BBComponent1", remote.foo2(1, "B")); - - // Test allowsPassByReference - assertEquals("BComponent", remote.foo3(po)); - assertEquals("BComponent", po.field1); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - - try { - remote.callback("CallBack"); - Thread.sleep(100); - assertEquals("CallBack", remote.getCallbackValue()); - - remote.callModifyParameter(); - Thread.sleep(100); - assertEquals("CallBack", service.getPO().field1); - } catch (Exception e) { - fail("CallBack failed"); - } - - try { - remote.onewayMethod("OneWay"); - Thread.sleep(100); - assertEquals("OneWay", remote.getOnewayValue()); - } catch (Exception e) { - fail("OneWay failed"); - } - } - -} diff --git a/java/sca/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java b/java/sca/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java deleted file mode 100644 index b1d4dba07d..0000000000 --- a/java/sca/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java +++ /dev/null @@ -1,49 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.apache.tuscany.sca.interfacedef.InvalidAnnotationException; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.Test; - -public class InvalidRemoteAttributeTestCase { - - @Test - public void testInvalidRemoteAttribute() throws Exception { - Node node = null; - - try { - String location = ContributionLocationHelper.getContributionLocation("InvalidRemoteAttribute.composite"); - node = NodeFactory.newInstance().createNode("InvalidRemoteAttribute.composite", new Contribution("c1", location)); - node.start(); - } catch (Exception e) { - if (! e.getCause().getClass().equals(InvalidAnnotationException.class)) { - throw e; - } - } finally { - if (node != null) { - node.stop(); - } - } - } -} diff --git a/java/sca/itest/jaxws-asyncclient/pom.xml b/java/sca/itest/jaxws-asyncclient/pom.xml deleted file mode 100644 index 97963fdd6c..0000000000 --- a/java/sca/itest/jaxws-asyncclient/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jaxws-asyncclient</artifactId>
- <name>Apache Tuscany JAX-WS Integration Tests</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/java/sca/itest/jaxws-asyncclient/src/main/java/stock/StockQuote.java b/java/sca/itest/jaxws-asyncclient/src/main/java/stock/StockQuote.java deleted file mode 100644 index 4e55bae98d..0000000000 --- a/java/sca/itest/jaxws-asyncclient/src/main/java/stock/StockQuote.java +++ /dev/null @@ -1,36 +0,0 @@ -package stock;
-/*
- * 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.
- */
-
-
-
-import javax.jws.WebService;
-
-/**
- * JAX-WS Async style Stock quote interface
- *
- * @version $Rev: 828277 $ $Date: 2009-10-22 02:40:52 +0100 (Thu, 22 Oct 2009) $
- */
-
-@WebService
-public interface StockQuote {
-
- float getPrice(String ticker);
-
-}
diff --git a/java/sca/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteClient.java b/java/sca/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteClient.java deleted file mode 100644 index 0bf3328c31..0000000000 --- a/java/sca/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteClient.java +++ /dev/null @@ -1,69 +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 stock;
-
-import java.util.concurrent.ExecutionException;
-
-import javax.xml.ws.AsyncHandler;
-import javax.xml.ws.Response;
-
-import org.oasisopen.sca.annotation.Reference;
-
-public class StockQuoteClient {
-
- @Reference public StockQuoteRef stockQuote;
-
- public float getPrice(String ticker) {
- return stockQuote.getPrice(ticker);
- }
-
- public float getPriceAsyncPoll(String ticker) throws InterruptedException, ExecutionException {
- Response<Float> response = stockQuote.getPriceAsync("foo");
- return response.get();
- }
-
- float price = 0f;
- Object mutex = new Object();
- Exception exception;
-
- public float getPriceAsyncCallback(String ticker) throws Exception {
- AsyncHandler<Float> callback = new AsyncHandler<Float>() {
- public void handleResponse(Response<Float> arg) {
- synchronized (mutex) {
- try {
- price = arg.get();
- } catch (Exception e) {
- exception = e;
- }
- mutex.notify();
- }
- }
- };
- stockQuote.getPriceAsync("foo", callback);
- synchronized (mutex) {
- if (price == 0f)
- mutex.wait(5000); // wait for up to 5 seconds
- }
-
- if (exception != null) throw exception;
- return price;
- }
-
-}
diff --git a/java/sca/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteImpl.java b/java/sca/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteImpl.java deleted file mode 100644 index a43b85361b..0000000000 --- a/java/sca/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteImpl.java +++ /dev/null @@ -1,34 +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 stock;
-
-
-/**
- * Stock quote impl
- *
- * @version $Rev: 828277 $ $Date: 2009-10-22 02:40:52 +0100 (Thu, 22 Oct 2009) $
- */
-public class StockQuoteImpl implements StockQuote {
-
- public float getPrice(String ticker) {
- return 10;
- }
-
-}
diff --git a/java/sca/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteRef.java b/java/sca/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteRef.java deleted file mode 100644 index b15ab6be08..0000000000 --- a/java/sca/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteRef.java +++ /dev/null @@ -1,39 +0,0 @@ -package stock;
-/*
- * 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.
- */
-
-
-
-import java.util.concurrent.Future;
-
-import javax.xml.ws.AsyncHandler;
-import javax.xml.ws.Response;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * JAX-WS Async style Stock quote interface
- */
-@Remotable
-public interface StockQuoteRef extends StockQuote {
-
- Response<Float> getPriceAsync(String ticker);
-
- Future<?> getPriceAsync(String ticker, AsyncHandler<Float> callback);
-}
diff --git a/java/sca/itest/jaxws-asyncclient/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jaxws-asyncclient/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 11ace7a788..0000000000 --- a/java/sca/itest/jaxws-asyncclient/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest/jaxws">
- <deployable composite="itest:jaxwsAsync"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jaxws-asyncclient/src/main/resources/StockQuote.composite b/java/sca/itest/jaxws-asyncclient/src/main/resources/StockQuote.composite deleted file mode 100644 index 313edf0435..0000000000 --- a/java/sca/itest/jaxws-asyncclient/src/main/resources/StockQuote.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:foo="http://itest/jaxws"
- targetNamespace="http://itest/jaxws"
- name="jaxwsAsync">
-
- <component name="StockQuote">
- <implementation.java class="stock.StockQuoteImpl" />
- </component>
-
- <component name="StockQuoteClient">
- <implementation.java class="stock.StockQuoteClient" />
- <reference name="stockQuote" target="StockQuote" />
- </component>
-
-</composite>
\ No newline at end of file diff --git a/java/sca/itest/jaxws-asyncclient/src/test/java/itest/AsyncServiceTestCase.java b/java/sca/itest/jaxws-asyncclient/src/test/java/itest/AsyncServiceTestCase.java deleted file mode 100644 index eb72924093..0000000000 --- a/java/sca/itest/jaxws-asyncclient/src/test/java/itest/AsyncServiceTestCase.java +++ /dev/null @@ -1,67 +0,0 @@ -package itest;
-import java.util.concurrent.ExecutionException;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import stock.StockQuoteClient;
-
-/*
- * 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.
- */
-
-public class AsyncServiceTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-
- @Test
- public void invokeRPC() {
- StockQuoteClient sc = node.getService(StockQuoteClient.class, "StockQuoteClient");
- Assert.assertEquals(10.0f, sc.getPrice("foo"));
- }
-
- @Test
- public void invokeAsyncPoll() throws InterruptedException, ExecutionException {
- StockQuoteClient sc = node.getService(StockQuoteClient.class, "StockQuoteClient");
- Assert.assertEquals(10.0f, sc.getPriceAsyncPoll("foo"));
- }
-
- @Test
- public void invokeAsyncCallback() throws Exception {
- StockQuoteClient sc = node.getService(StockQuoteClient.class, "StockQuoteClient");
- Assert.assertEquals(10.0f, sc.getPriceAsyncCallback("foo"));
- }
-
-}
diff --git a/java/sca/itest/jaxws/pom.xml b/java/sca/itest/jaxws/pom.xml deleted file mode 100644 index 1f0274b7ed..0000000000 --- a/java/sca/itest/jaxws/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>itest-jaxws</artifactId> - <name>Apache Tuscany JAX-WS Integration Tests</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> diff --git a/java/sca/itest/jaxws/src/test/java/stock/AsyncServiceTestCase.java b/java/sca/itest/jaxws/src/test/java/stock/AsyncServiceTestCase.java deleted file mode 100644 index e1c2bedea3..0000000000 --- a/java/sca/itest/jaxws/src/test/java/stock/AsyncServiceTestCase.java +++ /dev/null @@ -1,42 +0,0 @@ -package stock; -import junit.framework.Assert; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.Test; - -/* - * 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. - */ - -public class AsyncServiceTestCase { - - @Test - public void init() throws Exception { - try{ - String location = ContributionLocationHelper.getContributionLocation("StockQuote.composite"); - Node node = NodeFactory.newInstance().createNode("StockQuote.composite", new Contribution("c1", location)); - node.start(); - node.stop(); - } catch (Exception e) { - Assert.assertTrue(e.getMessage().contains("[JCA100006]")); - } - } -} diff --git a/java/sca/itest/jaxws/src/test/java/stock/StockQuote.java b/java/sca/itest/jaxws/src/test/java/stock/StockQuote.java deleted file mode 100644 index 74e25bb3bd..0000000000 --- a/java/sca/itest/jaxws/src/test/java/stock/StockQuote.java +++ /dev/null @@ -1,45 +0,0 @@ -package stock; -/* - * 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. - */ - - - -import java.util.concurrent.Future; - -import javax.jws.WebService; -import javax.xml.ws.AsyncHandler; -import javax.xml.ws.Response; - -/** - * JAX-WS Async style Stock quote interface - * - * @version $Rev$ $Date$ - */ - -@WebService -public interface StockQuote { - - float getPrice(String ticker); - - Response<Float> getPriceAsync(String ticker); - - Future<?> getPriceAsync(String ticker, AsyncHandler<Float> callback); - - -} diff --git a/java/sca/itest/jaxws/src/test/java/stock/StockQuoteImpl.java b/java/sca/itest/jaxws/src/test/java/stock/StockQuoteImpl.java deleted file mode 100644 index 516c63d864..0000000000 --- a/java/sca/itest/jaxws/src/test/java/stock/StockQuoteImpl.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 stock; - -import java.util.concurrent.Future; - -import javax.xml.ws.AsyncHandler; -import javax.xml.ws.Response; - -/** - * Stock quote impl - * - * @version $Rev$ $Date$ - */ -public class StockQuoteImpl implements StockQuote { - - public float getPrice(String ticker) { - return 10; - } - - public Response<Float> getPriceAsync(String ticker) { - return null; - } - - public Future<?> getPriceAsync(String ticker, AsyncHandler<Float> callback) { - return null; - } - -} diff --git a/java/sca/itest/jaxws/src/test/resources/StockQuote.composite b/java/sca/itest/jaxws/src/test/resources/StockQuote.composite deleted file mode 100644 index b2c9bd8ddb..0000000000 --- a/java/sca/itest/jaxws/src/test/resources/StockQuote.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:foo="http://itest/jaxws" - targetNamespace="http://itest/jaxws" - name="jaxwsAsync"> - - <component name="StockQuote"> - <implementation.java class="stock.StockQuoteImpl" /> - <service name="StockQuote"> - <interface.java interface="stock.StockQuote"/> - </service> - </component> - -</composite>
\ No newline at end of file diff --git a/java/sca/itest/jms/DynamicReplyQ/pom.xml b/java/sca/itest/jms/DynamicReplyQ/pom.xml deleted file mode 100644 index 4a28617959..0000000000 --- a/java/sca/itest/jms/DynamicReplyQ/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-dynamic-replyq</artifactId>
- <name>Apache Tuscany SCA iTest JMS with dynamic replyq</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/java/sca/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java deleted file mode 100644 index 9aef6ba1a3..0000000000 --- a/java/sca/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldClientImpl implements HelloWorldService {
-
- private HelloWorldService serviceA;
-
- @Reference
- public void setServiceA(HelloWorldService service) {
- this.serviceA = service;
- }
-
- public String sayHello(String name) {
- return serviceA.sayHello(name);
- }
-
-}
diff --git a/java/sca/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/java/sca/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/java/sca/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface HelloWorldService {
- String sayHello(String name);
-}
diff --git a/java/sca/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/java/sca/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/java/sca/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.binding.jms;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public String sayHello(String name) {
- if ("bang".equals(name)) {
- throw new RuntimeException("blem wit");
- }
- return "jmsHello " + name;
- }
-
-}
diff --git a/java/sca/itest/jms/DynamicReplyQ/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/DynamicReplyQ/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index a9d43b5637..0000000000 --- a/java/sca/itest/jms/DynamicReplyQ/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:SimpleServiceComposite"/>
- <deployable composite="itest:DynamicComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/DynamicReplyQ/src/main/resources/dynamic/client.composite b/java/sca/itest/jms/DynamicReplyQ/src/main/resources/dynamic/client.composite deleted file mode 100644 index cbad991ac5..0000000000 --- a/java/sca/itest/jms/DynamicReplyQ/src/main/resources/dynamic/client.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="DynamicComposite">
-
- <component name="HelloWorldClient">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
- <reference name="serviceA">
- <binding.jms>
- <destination jndiName="DestQueueA"/>
- <!-- No response destination defined means a temporary queue will be used -->
- </binding.jms>
- </reference>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/DynamicReplyQ/src/main/resources/jndi.properties b/java/sca/itest/jms/DynamicReplyQ/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/DynamicReplyQ/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/DynamicReplyQ/src/main/resources/simple/service.composite b/java/sca/itest/jms/DynamicReplyQ/src/main/resources/simple/service.composite deleted file mode 100644 index 01553a968c..0000000000 --- a/java/sca/itest/jms/DynamicReplyQ/src/main/resources/simple/service.composite +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="SimpleServiceComposite">
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="DestQueueA" create="always">
- </destination>
- <response>
- <destination jndiName="RespQueueA" create="always"/>
- </response>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/DynamicReplyQ/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java b/java/sca/itest/jms/DynamicReplyQ/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java deleted file mode 100644 index 3bf4e0bc30..0000000000 --- a/java/sca/itest/jms/DynamicReplyQ/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java +++ /dev/null @@ -1,53 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class DynamicReplyQTestCase {
-
- private static Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient");
- assertEquals("jmsHello Beate", helloWorldService.sayHello("Beate"));
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/args/pom.xml b/java/sca/itest/jms/args/pom.xml deleted file mode 100644 index 405017ef33..0000000000 --- a/java/sca/itest/jms/args/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-args</artifactId>
- <name>Apache Tuscany SCA iTest JMS Args</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <!-- uses ActiveMQ 5.1 as 4.1 Session.createQueue does not work using
- a temporary queue name -->
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
-</project>
diff --git a/java/sca/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java b/java/sca/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java deleted file mode 100644 index 68506b857b..0000000000 --- a/java/sca/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the OneWay service.
- */
-@Service(MyService.class)
-public class ClientImpl implements MyService {
-
- private MyService serviceA;
-
- @Reference
- public void setServiceA(MyService service) {
- this.serviceA = service;
- }
-
- public void sayHello(String name, String n2) {
- serviceA.sayHello(name, n2);
- }
-
-}
diff --git a/java/sca/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java b/java/sca/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java deleted file mode 100644 index 5f19aa1fa5..0000000000 --- a/java/sca/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java +++ /dev/null @@ -1,29 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface MyService {
-
- @OneWay
- void sayHello(String name, String n2);
-}
diff --git a/java/sca/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java b/java/sca/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java deleted file mode 100644 index 18324d5d1d..0000000000 --- a/java/sca/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.binding.jms;
-
-
-public class ServiceImpl implements MyService {
-
- public static Object lock = new Object();
- public static String name;
- public static String n2;
-
- public void sayHello(String name, String n2) {
- System.out.println("SelectorServiceImpl1 " + name + n2);
- ServiceImpl.name = name;
- ServiceImpl.n2 = n2;
- synchronized (ServiceImpl.lock) {
- ServiceImpl.lock.notify();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/args/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/args/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 07caa57490..0000000000 --- a/java/sca/itest/jms/args/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:DefinitionsTests"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/args/src/main/resources/jndi.properties b/java/sca/itest/jms/args/src/main/resources/jndi.properties deleted file mode 100644 index bb431a592b..0000000000 --- a/java/sca/itest/jms/args/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory, ConnectionFactory2
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-topic.ServiceTopic = ServiceTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/args/src/main/resources/selectors/selectors.composite b/java/sca/itest/jms/args/src/main/resources/selectors/selectors.composite deleted file mode 100644 index 1a9075f6d4..0000000000 --- a/java/sca/itest/jms/args/src/main/resources/selectors/selectors.composite +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="DefinitionsTests">
-
- <component name="Client1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ClientImpl"/>
- <reference name="serviceA">
- <binding.jms uri="jms:MyService" />
- </reference>
- </component>
-
- <component name="Service1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ServiceImpl"/>
- <service name="MyService">
- <binding.jms />
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/args/src/test/java/org/apache/tuscany/sca/binding/jms/ArgsTestCase.java b/java/sca/itest/jms/args/src/test/java/org/apache/tuscany/sca/binding/jms/ArgsTestCase.java deleted file mode 100644 index 28e0b530c1..0000000000 --- a/java/sca/itest/jms/args/src/test/java/org/apache/tuscany/sca/binding/jms/ArgsTestCase.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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- */
-public class ArgsTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testSayHello() throws Exception {
- MyService client1 = node.getService(MyService.class, "Client1");
-
- client1.sayHello("petra", "beate");
-
- synchronized(ServiceImpl.lock) {
- if (ServiceImpl.name == null) {
- ServiceImpl.lock.wait(5000);
- }
- }
-
- assertEquals("petra", ServiceImpl.name);
- assertEquals("beate", ServiceImpl.n2);
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/callbacks/pom.xml b/java/sca/itest/jms/callbacks/pom.xml deleted file mode 100644 index 780724ce5e..0000000000 --- a/java/sca/itest/jms/callbacks/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-jms-callbacks</artifactId>
- <name>Apache Tuscany SCA iTest JMS Tests For Callbacks</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <!-- uses ActiveMQ 5.1 as 4.1 Session.createQueue does not work using
- a temporary queue name -->
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java b/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java deleted file mode 100644 index d4cd5df431..0000000000 --- a/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-
-/**
- * The client interface
- */
-public interface JMSClient {
-
- void aClientMethod();
-}
diff --git a/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClientImpl.java b/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClientImpl.java deleted file mode 100644 index a4d5190af3..0000000000 --- a/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClientImpl.java +++ /dev/null @@ -1,50 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * Remote Web service client with callback interface
- */
-@Service(JMSClient.class)
-public class JMSClientImpl implements JMSClient, JMSServiceCallback {
-
- @Reference protected JMSService myService;
-
- public static String result;
- public static Object lock = new Object();
-
- public void aClientMethod() {
- System.out.println("aClientMethod " + this + " on thread " + Thread.currentThread());
- myService.someMethod(" -> someMethod "); // calls the server
- System.out.println("aClientMethod return from someMethod on thread " + Thread.currentThread());
- }
-
- public void receiveResult(String result) {
- System.out.println("receiveResult " + this + " '" + result + "' on thread " + Thread.currentThread());
- JMSClientImpl.result = result;
-
- // wakeup the waiting testcase
- synchronized (lock) {
- lock.notifyAll();
- }
- }
-}
diff --git a/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSService.java b/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSService.java deleted file mode 100644 index b78feab413..0000000000 --- a/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSService.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Callback;
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * The remote service that will be invoked by the client
- */
-@Remotable
-@Callback(JMSServiceCallback.class)
-public interface JMSService {
-
- @OneWay
- void someMethod(String arg);
-}
diff --git a/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceCallback.java b/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceCallback.java deleted file mode 100644 index 20b74ccc1a..0000000000 --- a/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceCallback.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * The callback interface for {@link JMSService}.
- */
-@Remotable
-public interface JMSServiceCallback {
-
- @OneWay
- void receiveResult(String result);
-}
diff --git a/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceImpl.java b/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceImpl.java deleted file mode 100644 index e8357338ae..0000000000 --- a/java/sca/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceImpl.java +++ /dev/null @@ -1,47 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Callback;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements MyService and uses a callback.
- */
-@Service(JMSService.class)
-public class JMSServiceImpl implements JMSService {
-
- private JMSServiceCallback myServiceCallback;
-
- @Callback
- public void setMyServiceCallback(JMSServiceCallback myServiceCallback) {
- System.out.println("setMyServiceCallback on thread " + Thread.currentThread() + " cb: " + myServiceCallback);
- this.myServiceCallback = myServiceCallback;
- }
-
- public void someMethod(String arg) {
- System.out.println("someMethod '" + arg + "' on thread " + Thread.currentThread());
- try {
- myServiceCallback.receiveResult(arg + " -> receiveResult ");
- } catch(Exception e) {
- System.out.println("RuntimeException invoking receiveResult: " + e.toString());
- e.printStackTrace();
- }
- }
-}
diff --git a/java/sca/itest/jms/callbacks/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/callbacks/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 95c3a41c43..0000000000 --- a/java/sca/itest/jms/callbacks/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:CallbackClientComposite"/>
- <deployable composite="itest:CallbackTempQComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/callbacks/src/main/resources/jndi.properties b/java/sca/itest/jms/callbacks/src/main/resources/jndi.properties deleted file mode 100644 index dec266b133..0000000000 --- a/java/sca/itest/jms/callbacks/src/main/resources/jndi.properties +++ /dev/null @@ -1,40 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.ServiceQueue = ServiceQueue
-queue.ServiceQueue = TQServiceQueue
-queue.CallbackQueue = CallbackQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/callbacks/src/main/resources/simple/client.composite b/java/sca/itest/jms/callbacks/src/main/resources/simple/client.composite deleted file mode 100644 index 19124fc3e6..0000000000 --- a/java/sca/itest/jms/callbacks/src/main/resources/simple/client.composite +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="CallbackClientComposite">
-
- <component name="ClientComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.JMSClientImpl" />
- <reference name="myService">
- <binding.jms uri="jms:ServiceQueue"/>
- <callback>
- <binding.jms uri="jms:CallbackQueue"/>
- </callback>
- </reference>
- </component>
-
- <component name="ServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.JMSServiceImpl" />
- <service name="JMSService">
- <binding.jms uri="jms:ServiceQueue"/>
- <callback>
- <binding.jms uri="jms:CallbackQueue"/>
- </callback>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/callbacks/src/main/resources/simple/tempq.composite b/java/sca/itest/jms/callbacks/src/main/resources/simple/tempq.composite deleted file mode 100644 index 5ef7c981f0..0000000000 --- a/java/sca/itest/jms/callbacks/src/main/resources/simple/tempq.composite +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="CallbackTempQComposite">
-
-<!--
-
-The client component does not define the callback destination so a temporary queue should be used
-
--->
-
- <component name="TQClientComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.JMSClientImpl" />
- <reference name="myService">
- <binding.jms uri="jms:TQServiceQueue"/>
- <callback>
- <binding.jms />
- </callback>
- </reference>
- </component>
-
- <component name="TQServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.JMSServiceImpl" />
- <service name="JMSService">
- <binding.jms uri="jms:TQServiceQueue"/>
- <callback>
- <binding.jms />
- </callback>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/CallbackTestCase.java b/java/sca/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/CallbackTestCase.java deleted file mode 100644 index 18911ad8b6..0000000000 --- a/java/sca/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/CallbackTestCase.java +++ /dev/null @@ -1,61 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class CallbackTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- JMSClient client = node.getService(JMSClient.class, "ClientComponent");
-
- client.aClientMethod();
-
- // wait for up to 5 seconds but should wake up as soon as done
- synchronized(JMSClientImpl.lock) {
- JMSClientImpl.lock.wait(5000);
- }
-
- assertEquals(" -> someMethod -> receiveResult ", JMSClientImpl.result);
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/TempCallbackQTestCase.java b/java/sca/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/TempCallbackQTestCase.java deleted file mode 100644 index b335add358..0000000000 --- a/java/sca/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/TempCallbackQTestCase.java +++ /dev/null @@ -1,64 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import java.net.MalformedURLException;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class TempCallbackQTestCase {
-
- private Node node;
-
- @Before
- public void init() throws MalformedURLException {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- JMSClient client = node.getService(JMSClient.class, "ClientComponent");
-
- client.aClientMethod();
-
- // wait for up to 5 seconds but should wake up as soon as done
- synchronized (JMSClientImpl.lock) {
- JMSClientImpl.lock.wait(5000);
- }
-
- assertEquals(" -> someMethod -> receiveResult ", JMSClientImpl.result);
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/defaults/pom.xml b/java/sca/itest/jms/defaults/pom.xml deleted file mode 100644 index df8dc88819..0000000000 --- a/java/sca/itest/jms/defaults/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-defaults</artifactId>
- <name>Apache Tuscany SCA iTest JMS with Defaults</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/java/sca/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java deleted file mode 100644 index 9aef6ba1a3..0000000000 --- a/java/sca/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldClientImpl implements HelloWorldService {
-
- private HelloWorldService serviceA;
-
- @Reference
- public void setServiceA(HelloWorldService service) {
- this.serviceA = service;
- }
-
- public String sayHello(String name) {
- return serviceA.sayHello(name);
- }
-
-}
diff --git a/java/sca/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/java/sca/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/java/sca/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface HelloWorldService {
- String sayHello(String name);
-}
diff --git a/java/sca/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/java/sca/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/java/sca/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.binding.jms;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public String sayHello(String name) {
- if ("bang".equals(name)) {
- throw new RuntimeException("blem wit");
- }
- return "jmsHello " + name;
- }
-
-}
diff --git a/java/sca/itest/jms/defaults/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/defaults/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 2a74e465ea..0000000000 --- a/java/sca/itest/jms/defaults/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:DefaultServiceComposite"/>
- <deployable composite="itest:DefaultClientComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/defaults/src/main/resources/defaults/client.composite b/java/sca/itest/jms/defaults/src/main/resources/defaults/client.composite deleted file mode 100644 index c4d5215f86..0000000000 --- a/java/sca/itest/jms/defaults/src/main/resources/defaults/client.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="DefaultClientComposite">
-
- <component name="HelloWorldClient">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
- <reference name="serviceA">
- <binding.jms uri="jms:HelloWorldService" />
- </reference>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/defaults/src/main/resources/defaults/service.composite b/java/sca/itest/jms/defaults/src/main/resources/defaults/service.composite deleted file mode 100644 index a4de896f24..0000000000 --- a/java/sca/itest/jms/defaults/src/main/resources/defaults/service.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="DefaultServiceComposite">
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
- <service name="HelloWorldService">
- <binding.jms />
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/defaults/src/main/resources/jndi.properties b/java/sca/itest/jms/defaults/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/defaults/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/defaults/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java b/java/sca/itest/jms/defaults/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java deleted file mode 100644 index d2b1a5fe59..0000000000 --- a/java/sca/itest/jms/defaults/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java +++ /dev/null @@ -1,54 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class DefaultsTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient");
- assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra"));
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/definitions/pom.xml b/java/sca/itest/jms/definitions/pom.xml deleted file mode 100644 index 28e9dd74c5..0000000000 --- a/java/sca/itest/jms/definitions/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-definitions</artifactId>
- <name>Apache Tuscany SCA iTest JMS Tests For Properties</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <!-- uses ActiveMQ 5.1 as 4.1 Session.createQueue does not work using
- a temporary queue name -->
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java b/java/sca/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java deleted file mode 100644 index b572b1012a..0000000000 --- a/java/sca/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the OneWay service.
- */
-@Service(OneWayService.class)
-public class OneWayClientImpl implements OneWayService {
-
- private OneWayService serviceA;
-
- @Reference
- public void setServiceA(OneWayService service) {
- this.serviceA = service;
- }
-
- public void sayHello(String name) {
- serviceA.sayHello(name);
- }
-
-}
diff --git a/java/sca/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/java/sca/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java deleted file mode 100644 index 9cec2d9b3e..0000000000 --- a/java/sca/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java +++ /dev/null @@ -1,29 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface OneWayService {
-
- @OneWay
- void sayHello(String name);
-}
diff --git a/java/sca/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/java/sca/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java deleted file mode 100644 index 6b763874df..0000000000 --- a/java/sca/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.binding.jms;
-
-public class OneWayServiceImpl implements OneWayService {
-
- public static Object lock = new Object();
- public static String name;
-
- public void sayHello(String name) {
- OneWayServiceImpl.name = name;
- synchronized (OneWayServiceImpl.lock) {
- OneWayServiceImpl.lock.notify();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/definitions/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/definitions/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 07caa57490..0000000000 --- a/java/sca/itest/jms/definitions/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:DefinitionsTests"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/definitions/src/main/resources/definitions.xml b/java/sca/itest/jms/definitions/src/main/resources/definitions.xml deleted file mode 100644 index 07b9f4aaa8..0000000000 --- a/java/sca/itest/jms/definitions/src/main/resources/definitions.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://jms" >
-
- <binding.jms name="TestService" >
- <destination name="MyServiceQueue" create="never"/>
- <connectionFactory name="MyConnectionFactory"/>
- </binding.jms>
-
- </definitions>
diff --git a/java/sca/itest/jms/definitions/src/main/resources/definitions/definitions.composite b/java/sca/itest/jms/definitions/src/main/resources/definitions/definitions.composite deleted file mode 100644 index 67a62a7165..0000000000 --- a/java/sca/itest/jms/definitions/src/main/resources/definitions/definitions.composite +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest"
- targetNamespace="http://itest"
- name="DefinitionsTests">
-
- <component name="OneWayClient">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayClientImpl"/>
- <reference name="serviceA">
- <binding.jms requestConnection="itest:TestService" />
- </reference>
- </component>
-
- <component name="OneWayService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayServiceImpl"/>
- <service name="OneWayService">
- <binding.jms requestConnection="itest:TestService" />
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/definitions/src/main/resources/jndi.properties b/java/sca/itest/jms/definitions/src/main/resources/jndi.properties deleted file mode 100644 index f7555e0beb..0000000000 --- a/java/sca/itest/jms/definitions/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = MyConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.MyServiceQueue= MyServiceQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/definitions/src/test/java/org/apache/tuscany/sca/binding/jms/DefinitionsTestCase.java b/java/sca/itest/jms/definitions/src/test/java/org/apache/tuscany/sca/binding/jms/DefinitionsTestCase.java deleted file mode 100644 index 729ad072b7..0000000000 --- a/java/sca/itest/jms/definitions/src/test/java/org/apache/tuscany/sca/binding/jms/DefinitionsTestCase.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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- */
-public class DefinitionsTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testSayHello() throws Exception {
- OneWayService client = node.getService(OneWayService.class, "OneWayClient");
-
- client.sayHello("petra");
-
- // wait for up to 5 seconds but should wake up as soon as done
- synchronized(OneWayServiceImpl.lock) {
- if (OneWayServiceImpl.name == null) {
- OneWayServiceImpl.lock.wait(5000);
- }
- }
-
- assertEquals("petra", OneWayServiceImpl.name);
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/exceptions/pom.xml b/java/sca/itest/jms/exceptions/pom.xml deleted file mode 100644 index 4189bb096e..0000000000 --- a/java/sca/itest/jms/exceptions/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-nonscaclient-exceptions</artifactId>
- <name>Apache Tuscany SCA iTest JMS NonSCA Client Exceptions</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
- <version>1.2</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java b/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java deleted file mode 100644 index 469882f3b3..0000000000 --- a/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-public class CheckedExcpetion extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedExcpetion(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java b/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java deleted file mode 100644 index 19b584950a..0000000000 --- a/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-public class CheckedExcpetion2Args extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedExcpetion2Args(String s, Throwable e) {
- super(s, e);
- }
-}
diff --git a/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java b/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java deleted file mode 100644 index b12e3a562e..0000000000 --- a/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-public class CheckedExcpetionChained extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedExcpetionChained(Throwable e) {
- super(e);
- }
-}
diff --git a/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java b/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java deleted file mode 100644 index b23db73c01..0000000000 --- a/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-public class CheckedExcpetionNoArgs extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedExcpetionNoArgs() {
- super();
- }
-}
diff --git a/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java b/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java deleted file mode 100644 index 9e4c4c46d4..0000000000 --- a/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface ExceptionService {
-
- public void throwChecked() throws CheckedExcpetion;
- public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs;
- public void throwChecked2Args() throws CheckedExcpetion2Args;
- public void throwCheckedChained() throws CheckedExcpetionChained;
-
- public void throwUnChecked();
-}
diff --git a/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java b/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java deleted file mode 100644 index 866acf1ce1..0000000000 --- a/java/sca/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java +++ /dev/null @@ -1,44 +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 org.apache.tuscany.sca.binding.jms;
-
-public class ExceptionServiceImpl implements ExceptionService {
-
- public void throwChecked() throws CheckedExcpetion {
- throw new CheckedExcpetion("foo");
- }
-
- public void throwChecked2Args() throws CheckedExcpetion2Args {
- throw new CheckedExcpetion2Args("foo", new Exception("bla"));
- }
-
- public void throwCheckedChained() throws CheckedExcpetionChained {
- throw new CheckedExcpetionChained(new Exception("bla"));
- }
-
- public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs {
- throw new CheckedExcpetionNoArgs();
- }
-
- public void throwUnChecked() {
- throw new RuntimeException("bla");
- }
-
-}
diff --git a/java/sca/itest/jms/exceptions/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/exceptions/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c9945cc57d..0000000000 --- a/java/sca/itest/jms/exceptions/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:ExceptionServiceComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/exceptions/src/main/resources/exceptions/service.composite b/java/sca/itest/jms/exceptions/src/main/resources/exceptions/service.composite deleted file mode 100644 index 9eb8f2b27d..0000000000 --- a/java/sca/itest/jms/exceptions/src/main/resources/exceptions/service.composite +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- name="ExceptionServiceComposite">
-
- <component name="TextExceptionService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ExceptionServiceImpl"/>
- <service name="ExceptionService">
- <binding.jms>
- <destination jndiName="TextExceptionService"/>
- </binding.jms>
- </service>
- </component>
-
- <component name="ObjectExceptionService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ExceptionServiceImpl"/>
- <service name="ExceptionService">
- <binding.jms>
- <destination jndiName="ObjectExceptionService"/>
- <tuscany:wireFormat.jmsObject/>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/exceptions/src/main/resources/jndi.properties b/java/sca/itest/jms/exceptions/src/main/resources/jndi.properties deleted file mode 100644 index 72d5457faf..0000000000 --- a/java/sca/itest/jms/exceptions/src/main/resources/jndi.properties +++ /dev/null @@ -1,40 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.TextExceptionService = TextRequestQueue
-queue.ObjectExceptionService = ObjectRequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/exceptions/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java b/java/sca/itest/jms/exceptions/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java deleted file mode 100644 index a1a6c4aae0..0000000000 --- a/java/sca/itest/jms/exceptions/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java +++ /dev/null @@ -1,212 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.Properties;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.xml.sax.SAXException;
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class ExceptionsTestCase {
-
- private Node node;
- private Session session;
- private InitialContext context;
- private Connection connection;
-
- private static final String CHECKED_XML =
- "<ns2:CheckedExcpetion xmlns:ns2=\"http://jms.binding.sca.tuscany.apache.org/\"><message>foo</message></ns2:CheckedExcpetion>";
- private static final String CHECKED_NOARGS_XML = "<ns2:CheckedExcpetionNoArgs xmlns:ns2=\"http://jms.binding.sca.tuscany.apache.org/\" />";
- private static final String CHECKED_2ARGS_XML =
- "<ns2:CheckedExcpetion2Args xmlns:ns2=\"http://jms.binding.sca.tuscany.apache.org/\"><message>foo</message></ns2:CheckedExcpetion2Args>";
- private static final String CHECKED_CHAINED_XML =
- "<ns2:CheckedExcpetionChained xmlns:ns2=\"http://jms.binding.sca.tuscany.apache.org/\"><message>java.lang.Exception: bla</message></ns2:CheckedExcpetionChained>";
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testTextChecked() throws NamingException, JMSException, SAXException, IOException {
- sendJMSTextRequest("throwChecked");
- Message m = receiveJMSResponse();
- assertXMLEqual(CHECKED_XML, ((TextMessage)m).getText());
- }
-
- @Test
- public void testTextCheckedNoArgs() throws NamingException, JMSException, SAXException, IOException {
- sendJMSTextRequest("throwCheckedNoArgs");
- Message m = receiveJMSResponse();
- assertXMLEqual(CHECKED_NOARGS_XML, ((TextMessage)m).getText());
- }
-
- @Test
- public void testTextChecked2Args() throws NamingException, JMSException, SAXException, IOException {
- sendJMSTextRequest("throwChecked2Args");
- Message m = receiveJMSResponse();
- assertXMLEqual(CHECKED_2ARGS_XML, ((TextMessage)m).getText());
- }
-
- @Test
- public void testTextCheckedChained() throws NamingException, JMSException, SAXException, IOException {
- sendJMSTextRequest("throwCheckedChained");
- Message m = receiveJMSResponse();
- assertXMLEqual(CHECKED_CHAINED_XML, ((TextMessage)m).getText());
- }
-
- @Test
- public void testTextUnChecked() throws NamingException, JMSException, SAXException, IOException {
- sendJMSTextRequest("throwUnChecked");
- Message m = receiveJMSResponse();
-
- // FIXME: what should the response message be for unchecked exceptions with wireFormat.textXML???
- Object o = ((ObjectMessage)m).getObject();
- assertTrue(o instanceof RuntimeException);
- assertTrue("java.lang.RuntimeException".equals(o.getClass().getName()));
- assertEquals("bla", ((RuntimeException)o).getMessage());
- }
-
- @Test
- public void testObjectChecked() throws NamingException, JMSException {
- sendJMSObjectRequest("throwChecked");
- Message m = receiveJMSResponse();
- Object o = ((ObjectMessage)m).getObject();
- assertTrue(o instanceof CheckedExcpetion);
- assertEquals("foo", ((CheckedExcpetion)o).getMessage());
- }
-
- @Test
- public void testObjectCheckedNoArgs() throws NamingException, JMSException {
- sendJMSObjectRequest("throwCheckedNoArgs");
- Message m = receiveJMSResponse();
- Object o = ((ObjectMessage)m).getObject();
- assertTrue(o instanceof CheckedExcpetionNoArgs);
- }
-
- @Test
- public void testObjectChecked2Args() throws NamingException, JMSException {
- sendJMSObjectRequest("throwChecked2Args");
- Message m = receiveJMSResponse();
- Object o = ((ObjectMessage)m).getObject();
- assertTrue(o instanceof CheckedExcpetion2Args);
- assertEquals("foo", ((CheckedExcpetion2Args)o).getMessage());
- assertEquals("bla", ((CheckedExcpetion2Args)o).getCause().getMessage());
- }
-
- @Test
- public void testObjectCheckedChained() throws NamingException, JMSException {
- sendJMSObjectRequest("throwCheckedChained");
- Message m = receiveJMSResponse();
- Object o = ((ObjectMessage)m).getObject();
- assertTrue(o instanceof CheckedExcpetionChained);
- assertEquals("bla", ((CheckedExcpetionChained)o).getCause().getMessage());
- }
-
- @Test
- public void testObjectUnChecked() throws NamingException, JMSException {
- sendJMSObjectRequest("throwUnChecked");
- Message m = receiveJMSResponse();
- Object o = ((ObjectMessage)m).getObject();
- assertTrue(o instanceof RuntimeException);
- assertTrue("java.lang.RuntimeException".equals(o.getClass().getName()));
- assertEquals("bla", ((RuntimeException)o).getMessage());
- }
-
- @After
- public void end() throws JMSException {
- if (node != null) {
- node.stop();
- }
- if (connection != null) {
- connection.close();
- }
- }
-
- private void sendJMSTextRequest(String operationName) throws NamingException, JMSException {
- context = new InitialContext(new Properties());
- ConnectionFactory cf = (ConnectionFactory)context.lookup("ConnectionFactory");
- connection = cf.createConnection();
- connection.start();
-
- session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- Destination toDest = (Destination)context.lookup("TextExceptionService");
-
- TextMessage m = session.createTextMessage();
- m.setStringProperty("scaOperationName", operationName);
- m.setJMSReplyTo((Destination)context.lookup("ResponseQueue"));
- m.setText("<_ns_:" + operationName + " xmlns:_ns_=\"http://jms.binding.sca.tuscany.apache.org/\" />");
-
- MessageProducer producer = session.createProducer(toDest);
- producer.send(m);
- }
-
- private void sendJMSObjectRequest(String operationName) throws NamingException, JMSException {
- context = new InitialContext(new Properties());
- ConnectionFactory cf = (ConnectionFactory)context.lookup("ConnectionFactory");
- connection = cf.createConnection();
- connection.start();
-
- session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- Destination toDest = (Destination)context.lookup("ObjectExceptionService");
-
- ObjectMessage m = session.createObjectMessage();
- m.setStringProperty("scaOperationName", operationName);
- m.setJMSReplyTo((Destination)context.lookup("ResponseQueue"));
- m.setObject(new Object[0]);
-
- MessageProducer producer = session.createProducer(toDest);
- producer.send(m);
- }
-
- private Message receiveJMSResponse() throws NamingException, JMSException {
- Destination replyDest = (Destination)context.lookup("ResponseQueue");
- MessageConsumer consumer = session.createConsumer(replyDest);
- Message m = consumer.receive(5000);
- if (m == null) {
- throw new RuntimeException("No reply message received");
- }
- return m;
- }
-}
diff --git a/java/sca/itest/jms/exceptions1/pom.xml b/java/sca/itest/jms/exceptions1/pom.xml deleted file mode 100644 index 5c6dbaaaa2..0000000000 --- a/java/sca/itest/jms/exceptions1/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-exceptions1</artifactId>
- <name>Apache Tuscany SCA iTest JMS with Exceptions1</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java b/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java deleted file mode 100644 index 469882f3b3..0000000000 --- a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-public class CheckedExcpetion extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedExcpetion(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java b/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java deleted file mode 100644 index 19b584950a..0000000000 --- a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-public class CheckedExcpetion2Args extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedExcpetion2Args(String s, Throwable e) {
- super(s, e);
- }
-}
diff --git a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java b/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java deleted file mode 100644 index b12e3a562e..0000000000 --- a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-public class CheckedExcpetionChained extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedExcpetionChained(Throwable e) {
- super(e);
- }
-}
diff --git a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java b/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java deleted file mode 100644 index b23db73c01..0000000000 --- a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-public class CheckedExcpetionNoArgs extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedExcpetionNoArgs() {
- super();
- }
-}
diff --git a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java b/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java deleted file mode 100644 index 9e4c4c46d4..0000000000 --- a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface ExceptionService {
-
- public void throwChecked() throws CheckedExcpetion;
- public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs;
- public void throwChecked2Args() throws CheckedExcpetion2Args;
- public void throwCheckedChained() throws CheckedExcpetionChained;
-
- public void throwUnChecked();
-}
diff --git a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java b/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java deleted file mode 100644 index 02426936d2..0000000000 --- a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java +++ /dev/null @@ -1,57 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(ExceptionService.class)
-public class ExceptionServiceClient implements ExceptionService {
-
- private ExceptionService service;
-
- @Reference
- public void setService(ExceptionService service) {
- this.service = service;
- }
-
- public void throwChecked() throws CheckedExcpetion {
- service.throwChecked();
- }
-
- public void throwChecked2Args() throws CheckedExcpetion2Args {
- service.throwChecked2Args();
- }
-
- public void throwCheckedChained() throws CheckedExcpetionChained {
- service.throwCheckedChained();
- }
-
- public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs {
- service.throwCheckedNoArgs();
- }
-
- public void throwUnChecked() {
- service.throwUnChecked();
- }
-
-}
diff --git a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java b/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java deleted file mode 100644 index 866acf1ce1..0000000000 --- a/java/sca/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java +++ /dev/null @@ -1,44 +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 org.apache.tuscany.sca.binding.jms;
-
-public class ExceptionServiceImpl implements ExceptionService {
-
- public void throwChecked() throws CheckedExcpetion {
- throw new CheckedExcpetion("foo");
- }
-
- public void throwChecked2Args() throws CheckedExcpetion2Args {
- throw new CheckedExcpetion2Args("foo", new Exception("bla"));
- }
-
- public void throwCheckedChained() throws CheckedExcpetionChained {
- throw new CheckedExcpetionChained(new Exception("bla"));
- }
-
- public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs {
- throw new CheckedExcpetionNoArgs();
- }
-
- public void throwUnChecked() {
- throw new RuntimeException("bla");
- }
-
-}
diff --git a/java/sca/itest/jms/exceptions1/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/exceptions1/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c28c94da98..0000000000 --- a/java/sca/itest/jms/exceptions1/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:ExceptionServiceComposite"/>
- <deployable composite="itest:ExceptionClientComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/exceptions1/src/main/resources/exceptions/client.composite b/java/sca/itest/jms/exceptions1/src/main/resources/exceptions/client.composite deleted file mode 100644 index 5d1c57a1f3..0000000000 --- a/java/sca/itest/jms/exceptions1/src/main/resources/exceptions/client.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="ExceptionClientComposite">
-
- <component name="ExceptionServiceClient">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ExceptionServiceClient"/>
- <reference name="service">
- <binding.jms uri="jms:ExceptionService" />
- </reference>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/exceptions1/src/main/resources/exceptions/service.composite b/java/sca/itest/jms/exceptions1/src/main/resources/exceptions/service.composite deleted file mode 100644 index 6875772d56..0000000000 --- a/java/sca/itest/jms/exceptions1/src/main/resources/exceptions/service.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="ExceptionServiceComposite">
-
- <component name="ExceptionService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ExceptionServiceImpl"/>
- <service name="ExceptionService">
- <binding.jms />
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/exceptions1/src/main/resources/jndi.properties b/java/sca/itest/jms/exceptions1/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/exceptions1/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/exceptions1/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java b/java/sca/itest/jms/exceptions1/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java deleted file mode 100644 index 0d897d8703..0000000000 --- a/java/sca/itest/jms/exceptions1/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java +++ /dev/null @@ -1,110 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class ExceptionsTestCase {
-
- private static Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testChecked() {
- ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient");
- try {
- service.throwChecked();
- fail();
- } catch (CheckedExcpetion e) {
- assertEquals("foo", e.getMessage());
- } catch (Throwable e) {
- fail();
- }
- }
-
- @Test
- public void testCheckedNoArgs() {
- ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient");
- try {
- service.throwCheckedNoArgs();
- fail();
- } catch (CheckedExcpetionNoArgs e) {
- // ok
- }
- }
-
- @Test
- public void testChecked2Args() {
- ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient");
- try {
- service.throwChecked2Args();
- fail();
- } catch (CheckedExcpetion2Args e) {
- assertEquals("foo", e.getMessage());
-// FIXME: TUSCANY-2848: lost the cause!
-// assertNotNull(e.getCause());
-// assertEquals("bla", e.getCause().getMessage());
- }
- }
-
- @Test
- public void testCheckedChained() {
- ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient");
- try {
- service.throwCheckedChained();
- fail();
- } catch (CheckedExcpetionChained e) {
- // FIXME: TUSCANY-2848: lost the cause!
-// assertNotNull(e.getCause());
-// assertEquals("bla", e.getCause().getMessage());
- }
- }
-
- @Test
- public void testUnChecked() {
- ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient");
- try {
- service.throwUnChecked();
- fail();
- } catch (Exception e) {
- assertEquals("bla", e.getCause().getMessage());
- }
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/externalBroker/pom.xml b/java/sca/itest/jms/externalBroker/pom.xml deleted file mode 100644 index ac890aa687..0000000000 --- a/java/sca/itest/jms/externalBroker/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-external-broker</artifactId>
- <name>Apache Tuscany SCA iTest JMS with External JMS Broker</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/java/sca/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java deleted file mode 100644 index 9aef6ba1a3..0000000000 --- a/java/sca/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldClientImpl implements HelloWorldService {
-
- private HelloWorldService serviceA;
-
- @Reference
- public void setServiceA(HelloWorldService service) {
- this.serviceA = service;
- }
-
- public String sayHello(String name) {
- return serviceA.sayHello(name);
- }
-
-}
diff --git a/java/sca/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/java/sca/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/java/sca/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface HelloWorldService {
- String sayHello(String name);
-}
diff --git a/java/sca/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/java/sca/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/java/sca/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.binding.jms;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public String sayHello(String name) {
- if ("bang".equals(name)) {
- throw new RuntimeException("blem wit");
- }
- return "jmsHello " + name;
- }
-
-}
diff --git a/java/sca/itest/jms/externalBroker/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/externalBroker/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 60b132ca1b..0000000000 --- a/java/sca/itest/jms/externalBroker/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:ExternalServiceComposite"/>
- <deployable composite="itest:ExternalClientComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/externalBroker/src/main/resources/external/client.composite b/java/sca/itest/jms/externalBroker/src/main/resources/external/client.composite deleted file mode 100644 index cad76ef45f..0000000000 --- a/java/sca/itest/jms/externalBroker/src/main/resources/external/client.composite +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="ExternalClientComposite">
-
- <component name="HelloWorldClient">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
- <reference name="serviceA">
- <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61616">
- <destination jndiName="DestQueueA"/>
- <response>
- <destination jndiName="RespQueueA"/>
- </response>
- </binding.jms>
- </reference>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/externalBroker/src/main/resources/external/service.composite b/java/sca/itest/jms/externalBroker/src/main/resources/external/service.composite deleted file mode 100644 index 8a76d8cd29..0000000000 --- a/java/sca/itest/jms/externalBroker/src/main/resources/external/service.composite +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="ExternalServiceComposite">
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
- <service name="HelloWorldService">
- <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61616">
- <destination jndiName="DestQueueA" create="always"/>
- <response>
- <destination jndiName="RespQueueA" create="always"/>
- </response>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/externalBroker/src/main/resources/jndi.properties b/java/sca/itest/jms/externalBroker/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/externalBroker/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/externalBroker/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java b/java/sca/itest/jms/externalBroker/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java deleted file mode 100644 index b8cbde7b26..0000000000 --- a/java/sca/itest/jms/externalBroker/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java +++ /dev/null @@ -1,71 +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 org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.activemq.broker.BrokerService; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests using the JMS binding with an external JMS broker - */ -public class ExternalBrokerTestCase { - - private static Node node; - private BrokerService broker; - - @Before - public void init() throws Exception { - startBroker(); - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient"); - assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra")); - } - - @After - public void end() throws Exception { - if (node != null) { - node.stop(); - } - stopBroker(); - } - - protected void startBroker() throws Exception { - broker = new BrokerService(); - broker.setPersistent(false); - broker.setUseJmx(false); - broker.addConnector("tcp://localhost:61616"); - broker.start(); - } - protected void stopBroker() throws Exception { - if (broker != null) { - broker.stop(); - } - } - -} diff --git a/java/sca/itest/jms/format-jmsbytes/pom.xml b/java/sca/itest/jms/format-jmsbytes/pom.xml deleted file mode 100644 index fac0721715..0000000000 --- a/java/sca/itest/jms/format-jmsbytes/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-format-jmsbytes</artifactId>
- <name>Apache Tuscany SCA iTest JMS Message Format jmsbytes</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldServiceReference helloWorldService1;
-
- public String getGreetings(String name){
- byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
- String stringValue = new String(bytesValue);
-
- try {
- helloWorldService1.throwChecked(name.getBytes());
- } catch (Exception e) {
- // Test to see what happens if we talk to a service
- // that declares a checked exception through an
- // interface that doesn't
- stringValue += " " + e.getCause().getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(name.getBytes());
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) throws CheckedException;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg){
-
- String name = new String(msg);
- name = "Hello " + name;
-
- return name.getBytes();
- }
-
- public void throwChecked(byte[] msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(byte[] msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/java/sca/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldServiceReference {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) ;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytes/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/format-jmsbytes/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/java/sca/itest/jms/format-jmsbytes/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:helloworld" />
-</contribution>
diff --git a/java/sca/itest/jms/format-jmsbytes/src/main/resources/jmsbytes/helloworld.composite b/java/sca/itest/jms/format-jmsbytes/src/main/resources/jmsbytes/helloworld.composite deleted file mode 100644 index e5a904871c..0000000000 --- a/java/sca/itest/jms/format-jmsbytes/src/main/resources/jmsbytes/helloworld.composite +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:hw="http://helloworld"
- name="helloworld">
-
- <component name="HelloWorldReferenceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldReferenceImpl" />
- <reference name="helloWorldService1" >
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <tuscany:wireFormat.jmsBytes/>
- </binding.jms>
- </reference>
- </component>
-
- <component name="HelloWorldServiceComponent1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <tuscany:wireFormat.jmsBytes/>
- </binding.jms>
- </service>
- </component>
-</composite>
diff --git a/java/sca/itest/jms/format-jmsbytes/src/main/resources/jndi.properties b/java/sca/itest/jms/format-jmsbytes/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/format-jmsbytes/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/format-jmsbytes/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java b/java/sca/itest/jms/format-jmsbytes/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java deleted file mode 100644 index 49cb0a69ab..0000000000 --- a/java/sca/itest/jms/format-jmsbytes/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java +++ /dev/null @@ -1,69 +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 org.apache.tuscany.sca.binding.jms.format;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldReference;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class FormatJMSBytesTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
-
- System.out.println(helloWorldService.getGreetings("Fred Bloggs"));
-/* TUSCANY-2967 - disable this change while we decide what to do and
- * return faults as JMSObject messages to be consistent
- * again with other wire formats
- assertEquals("Hello Fred Bloggs " +
- "org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.CheckedException: foo " +
- "org.osoa.sca.ServiceRuntimeException: java.lang.RuntimeException: bla",
- helloWorldService.getGreetings("Fred Bloggs"));
-*/
- assertEquals("Hello Fred Bloggs " +
- "foo " +
- "remote service exception, see nested exception" ,
- helloWorldService.getGreetings("Fred Bloggs"));
-
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/format-jmsbytesxml/pom.xml b/java/sca/itest/jms/format-jmsbytesxml/pom.xml deleted file mode 100644 index 7705c82c55..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-format-jmsbytesxml</artifactId>
- <name>Apache Tuscany SCA iTest JMS Message Format jmsbytesxml</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java deleted file mode 100644 index 1684c19c50..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java deleted file mode 100644 index cc7b7b11e4..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3742bd6ac6..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.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 org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldService helloWorldService1;
-
- public String getGreetings(String name){
- byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
- String stringValue = new String(bytesValue);
-
- try {
- helloWorldService1.throwChecked(name.getBytes());
- } catch (CheckedException e) {
- stringValue += " " + e.getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(name.getBytes());
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java deleted file mode 100644 index eae95b4201..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) throws CheckedException;
- public void throwUnChecked(byte[] msg);
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index a37a03d994..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,39 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg){
-
- String name = new String(msg);
- name = "Hello " + name;
-
- return name.getBytes();
- }
-
- public void throwChecked(byte[] msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(byte[] msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/format-jmsbytesxml/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:helloworld" />
-</contribution>
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/main/resources/jmsbytesxml/helloworld.composite b/java/sca/itest/jms/format-jmsbytesxml/src/main/resources/jmsbytesxml/helloworld.composite deleted file mode 100644 index a28e6e5f6d..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/main/resources/jmsbytesxml/helloworld.composite +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:hw="http://helloworld"
- name="helloworld">
-
- <component name="HelloWorldReferenceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld.HelloWorldReferenceImpl" />
- <reference name="helloWorldService1" >
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <tuscany:wireFormat.jmsBytesXML/>
- </binding.jms>
- </reference>
- </component>
-
- <component name="HelloWorldServiceComponent1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <tuscany:wireFormat.jmsBytesXML/>
- </binding.jms>
- </service>
- </component>
-</composite>
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/main/resources/jndi.properties b/java/sca/itest/jms/format-jmsbytesxml/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesXMLTestCase.java b/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesXMLTestCase.java deleted file mode 100644 index 53498ce44d..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesXMLTestCase.java +++ /dev/null @@ -1,58 +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 org.apache.tuscany.sca.binding.jms.format;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldReference;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class FormatJMSBytesXMLTestCase {
-
- private static Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
-
- System.out.println(helloWorldService.getGreetings("Fred Bloggs"));
- assertEquals("Hello Fred Bloggs foo remote service exception, see nested exception", helloWorldService.getGreetings("Fred Bloggs"));
-
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldServiceReference helloWorldService1;
-
- public String getGreetings(String name){
- byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
- String stringValue = new String(bytesValue);
-
- try {
- helloWorldService1.throwChecked(name.getBytes());
- } catch (Exception e) {
- // Test to see what happens if we talk to a service
- // that declares a checked exception through an
- // interface that doesn't
- stringValue += " " + e.getCause().getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(name.getBytes());
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) throws CheckedException;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg){
-
- String name = new String(msg);
- name = "Hello " + name;
-
- return name.getBytes();
- }
-
- public void throwChecked(byte[] msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(byte[] msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/java/sca/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldServiceReference {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) ;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsdefault/pom.xml b/java/sca/itest/jms/format-jmsdefault/pom.xml deleted file mode 100644 index 85cd35ec82..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-format-jmsdefault</artifactId>
- <name>Apache Tuscany SCA iTest JMS Message Format jmsdefault</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldServiceReference helloWorldService1;
-
- public String getGreetings(String name){
- byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
- String stringValue = new String(bytesValue);
-
- try {
- helloWorldService1.throwChecked(name.getBytes());
- } catch (Exception e) {
- // Test to see what happens if we talk to a service
- // that declares a checked exception through an
- // interface that doesn't
- stringValue += " " + e.getCause().getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(name.getBytes());
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) throws CheckedException;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg){
-
- String name = new String(msg);
- name = "Hello " + name;
-
- return name.getBytes();
- }
-
- public void throwChecked(byte[] msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(byte[] msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldServiceReference {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) ;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java deleted file mode 100644 index 530eac3d00..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java deleted file mode 100644 index 1768816247..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,36 +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 org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String name);
-
- public String getPersonGreetings(Person person);
-
- public void nullInVoidOut();
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index d0a5faaef7..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,85 +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 org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldService helloWorldService1;
-
- @Reference
- protected HelloWorldService helloWorldService2;
-
- @Reference
- protected HelloWorldService helloWorldService3;
-
- @Reference
- protected HelloWorldService helloWorldService4;
-
- public String getGreetings(String name){
- String stringValue = helloWorldService1.getGreetings(name) + " " +
- helloWorldService2.getGreetings(name) + " " +
- helloWorldService3.getGreetings(name) + " " +
- helloWorldService4.getGreetings(name);
-
- try {
- helloWorldService3.throwChecked(name);
- } catch (CheckedException e) {
- stringValue += " " + e.getMessage();
- }
-
- try {
- helloWorldService3.throwUnChecked(name);
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
-
- try {
- helloWorldService4.throwChecked(name);
- } catch (CheckedException e) {
- stringValue += " " + e.getMessage();
- }
-
- try {
- helloWorldService4.throwUnChecked(name);
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
-
- return stringValue;
- }
-
- public String getPersonGreetings(Person person){
- return helloWorldService1.getPersonGreetings(person) + " " +
- helloWorldService2.getPersonGreetings(person) + " " +
- helloWorldService3.getPersonGreetings(person) + " " +
- helloWorldService4.getPersonGreetings(person);
- }
-
- public void nullInVoidOut() {
- helloWorldService1.nullInVoidOut();
- helloWorldService2.nullInVoidOut();
- helloWorldService3.nullInVoidOut();
- helloWorldService4.nullInVoidOut();
-
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java deleted file mode 100644 index 204863423d..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getGreetings(String name);
-
- public String getPersonGreetings(Person person);
-
- public void nullInVoidOut();
-
- public void throwChecked(String msg) throws CheckedException;
- public void throwUnChecked(String msg);
-}
-
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b143079fe3..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,51 +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 org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public static int nullInVoidOutCalled = 0;
-
- public String getGreetings(String name){
- String response = "Hello " + name;
- System.out.println("getGreetings: " + response);
- return response;
- }
-
- public String getPersonGreetings(Person person){
- String response = "Hello " + person.getFirstName() + " " + person.getLastName();
- System.out.println("getPersonGreetings: " + response);
- return response;
- }
-
- public void nullInVoidOut() {
- System.out.println("nullInVoidOut");
- nullInVoidOutCalled++;
- }
-
- public void throwChecked(String msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(String msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java b/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java deleted file mode 100644 index b62d1b1f1d..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java +++ /dev/null @@ -1,42 +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 org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
-
-public class Person {
- String firstName;
- String lastName;
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/format-jmsdefault/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:helloworld" />
-</contribution>
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.composite b/java/sca/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.composite deleted file mode 100644 index a6d6e04ac8..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.composite +++ /dev/null @@ -1,94 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:hw="http://helloworld"
- name="helloworld">
-
- <component name="HelloWorldReferenceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldReferenceImpl" />
- <reference name="helloWorldService1" >
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- </binding.jms>
- </reference>
- <reference name="helloWorldService2" >
- <binding.jms>
- <destination jndiName="HelloWorldService2"/>
- <tuscany:wireFormat.jmsdefault/>
- </binding.jms>
- </reference>
- <reference name="helloWorldService3" >
- <binding.jms>
- <destination jndiName="HelloWorldService3"/>
- <tuscany:wireFormat.jmsdefault/>
- </binding.jms>
- </reference>
- <reference name="helloWorldService4" >
- <binding.jms>
- <destination jndiName="HelloWorldService4"/>
- <tuscany:wireFormat.jmsdefault sendFormat="text"/>
- </binding.jms>
- </reference>
- </component>
-
- <component name="HelloWorldServiceComponent1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- </binding.jms>
- </service>
- </component>
-
- <component name="HelloWorldServiceComponent2">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <interface.java interface="org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldService" />
- <binding.jms>
- <destination jndiName="HelloWorldService2"/>
- </binding.jms>
- </service>
- </component>
-
- <component name="HelloWorldServiceComponent3">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <!--interface.wsdl interface="http://helloworld/textxml#wsdl.interface(HelloWorld)" /-->
- <binding.jms>
- <destination jndiName="HelloWorldService3"/>
- <tuscany:wireFormat.jmsdefault />
- </binding.jms>
- </service>
- </component>
-
- <component name="HelloWorldServiceComponent4">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <!--interface.wsdl interface="http://helloworld/textxml#wsdl.interface(HelloWorld)" /-->
- <binding.jms>
- <destination jndiName="HelloWorldService4"/>
- <tuscany:wireFormat.jmsdefault />
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.wsdl b/java/sca/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.wsdl deleted file mode 100644 index 935a2e73c5..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.wsdl +++ /dev/null @@ -1,139 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<wsdl:definitions targetNamespace="http://helloworld/textxml" xmlns:tns="http://helloworld/textxml" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="helloworld">
-
- <wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
-
- <element name="getGreetings">
- <complexType>
- <sequence>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getGreetingsResponse">
- <complexType>
- <sequence>
- <element name="getGreetingsReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- </schema>
- <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="PersonType">
- <xsd:sequence>
- <xsd:element name="firstName" type="xsd:string"/>
- <xsd:element name="lastName" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <element name="getPersonGreetings">
- <complexType>
- <sequence>
- <element name="person" type="PersonType"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getPersonGreetingsResponse">
- <complexType>
- <sequence>
- <element name="getPersonGreetingsReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- </schema>
-
- </wsdl:types>
-
- <wsdl:message name="getGreetingsRequest">
- <wsdl:part element="tns:getGreetings" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getGreetingsResponse">
- <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getPersonGreetingsRequest">
- <wsdl:part element="tns:getPersonGreetings" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getPersonGreetingsResponse">
- <wsdl:part element="tns:getPersonGreetingsResponse" name="parameters"/>
- </wsdl:message>
-
- <wsdl:portType name="HelloWorld">
- <wsdl:operation name="getGreetings">
- <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
- <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
- </wsdl:operation>
- <wsdl:operation name="getPersonGreetings">
- <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
- <wsdl:output message="tns:getPersonGreetingsResponse" name="getPersonGreetingsResponse"/>
- </wsdl:operation>
- </wsdl:portType>
-
- <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="getGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getPersonGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getPersonGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getPersonGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
-
- <!-- wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms"/>
- <wsdl:operation name="getGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding-->
-
- <wsdl:service name="HelloWorldService">
- <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
- <wsdlsoap:address location="http://localhost:8085/HelloWorldService"/>
- </wsdl:port>
- </wsdl:service>
-
-</wsdl:definitions>
diff --git a/java/sca/itest/jms/format-jmsdefault/src/main/resources/jndi.properties b/java/sca/itest/jms/format-jmsdefault/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/format-jmsdefault/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDefaultTestCase.java b/java/sca/itest/jms/format-jmsdefault/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDefaultTestCase.java deleted file mode 100644 index 78c0239f0d..0000000000 --- a/java/sca/itest/jms/format-jmsdefault/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDefaultTestCase.java +++ /dev/null @@ -1,68 +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 org.apache.tuscany.sca.binding.jms.format;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldReference;
-import org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldServiceImpl;
-import org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.Person;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class FormatJMSDefaultTestCase {
-
- private static Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
-
- assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs foo remote service exception, see nested exception foo remote service exception, see nested exception", helloWorldService.getGreetings("Fred Bloggs"));
-
- Person person = new Person();
- person.setFirstName("Fred");
- person.setLastName("Bloggs");
- assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs", helloWorldService.getPersonGreetings(person));
-
- // this just makes sure that there are no exceptions thrown for this case
- helloWorldService.nullInVoidOut();
- Assert.assertEquals(4, HelloWorldServiceImpl.nullInVoidOutCalled);
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/format-jmsmessage/pom.xml b/java/sca/itest/jms/format-jmsmessage/pom.xml deleted file mode 100644 index 312dea14fa..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-format-jmsmessage</artifactId>
- <name>Apache Tuscany SCA iTest JMS Message Format jmsmessage</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldServiceReference helloWorldService1;
-
- public String getGreetings(String name){
- byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
- String stringValue = new String(bytesValue);
-
- try {
- helloWorldService1.throwChecked(name.getBytes());
- } catch (Exception e) {
- // Test to see what happens if we talk to a service
- // that declares a checked exception through an
- // interface that doesn't
- stringValue += " " + e.getCause().getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(name.getBytes());
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) throws CheckedException;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg){
-
- String name = new String(msg);
- name = "Hello " + name;
-
- return name.getBytes();
- }
-
- public void throwChecked(byte[] msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(byte[] msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldServiceReference {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) ;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java deleted file mode 100644 index 490bd5d4a3..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 5aed6b12d7..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldServiceReferenceSide helloWorldService1;
-
- public String getGreetings(String name){
- helloWorldService1.getGreetings(name);
-
- try {
- Thread.sleep(2000);
- } catch (Exception ex) {
- // do nothing
- }
-
- return HelloWorldServiceImpl.getGreetings();
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java deleted file mode 100644 index efe2f1a4dc..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- @OneWay
- public void onMessage(javax.jms.Message message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index c1011ce6fb..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,51 +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 org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
-
-import javax.jms.TextMessage;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- private static String greetings = "not set";
-
- public void onMessage(javax.jms.Message message){
-
- String name = null;
-
- try {
- name = ((TextMessage)message).getText();
- } catch (Exception ex) {
- name = "EXCEPTION";
- }
- greetings = "Hello " + name;
- }
-
- public static String getGreetings(){
- return greetings;
- }
-
- // javax.jms.BytesMessage
- // javax.jms.MapMessage
- // javax.jms.ObjectMessage
- // javax.jms.StreamMessage
- // javax.jms.TextMessage
-
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java b/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java deleted file mode 100644 index d863b3a0a3..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java +++ /dev/null @@ -1,37 +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 org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
-
-import javax.jws.soap.SOAPBinding;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldServiceReferenceSide {
-
- @OneWay
- @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
- public void getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README b/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README deleted file mode 100644 index 0f7a730b91..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README +++ /dev/null @@ -1,3 +0,0 @@ -This test uses an SCA composite to fake a scenario where the reference is an SCA reference but the
-service is a non-SCA JMS endpoint. This gives us the opportunity to play about with the interface
-configuration at the reference to see how the contents of the JMS message can be controlled.
\ No newline at end of file diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/format-jmsmessage/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:helloworld" />
-</contribution>
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.composite b/java/sca/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.composite deleted file mode 100644 index c624a11233..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.composite +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- xmlns:hw="http://helloworld"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- name="helloworld">
-
- <component name="HelloWorldReferenceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldReferenceImpl" />
- <reference name="helloWorldService1" >
- <!--interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)"/-->
- <interface.java interface="org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldServiceReferenceSide"/>
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <tuscany:wireFormat.jmsText/>
- </binding.jms>
- </reference>
- </component>
-
- <component name="HelloWorldServiceComponent1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- </binding.jms>
- </service>
- </component>
-</composite>
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.wsdl b/java/sca/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.wsdl deleted file mode 100644 index f72ce434fa..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.wsdl +++ /dev/null @@ -1,129 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="helloworld">
-
- <wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="PersonType">
- <xsd:sequence>
- <xsd:element name="firstName" type="xsd:string"/>
- <xsd:element name="lastName" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <element name="getPersonGreetings">
- <complexType>
- <sequence>
- <element name="person" type="PersonType"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getPersonGreetingsResponse">
- <complexType>
- <sequence>
- <element name="getPersonGreetingsReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getGreetings">
- <complexType>
- <sequence>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getGreetingsResponse">
- <complexType>
- <sequence>
- <element name="getGreetingsReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- </schema>
- </wsdl:types>
-
- <wsdl:message name="getGreetingsRequest">
- <!-- wsdl:part element="tns:getGreetings" name="parameters"/-->
- <wsdl:part type="xsd:string" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getGreetingsResponse">
- <!-- wsdl:part element="tns:getGreetingsResponse" name="parameters"/-->
- <wsdl:part type="xsd:string" name="parameters"/>
- </wsdl:message>
-
- <!-- wsdl:message name="getPersonGreetingsRequest">
- <wsdl:part element="tns:getPersonGreetings" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getPersonGreetingsResponse">
- <wsdl:part element="tns:getPersonGreetingsResponse" name="parameters"/>
- </wsdl:message-->
-
- <wsdl:portType name="HelloWorld">
- <wsdl:operation name="getGreetings">
- <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
- <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
- </wsdl:operation>
- <!-- wsdl:operation name="getPersonGreetings">
- <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
- <wsdl:output message="tns:getPersonGreetingsResponse" name="getPersonGreetingsResponse"/>
- </wsdl:operation-->
- </wsdl:portType>
-
- <!-- wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="getGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding-->
-
- <!-- wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld">
- <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/jms"/>
- <wsdl:operation name="getGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding-->
-
- <!-- wsdl:service name="HelloWorldService">
- <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
- <wsdlsoap:address location="http://localhost:8085/HelloWorldService"/>
- </wsdl:port>
- </wsdl:service-->
-
-</wsdl:definitions>
diff --git a/java/sca/itest/jms/format-jmsmessage/src/main/resources/jndi.properties b/java/sca/itest/jms/format-jmsmessage/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/format-jmsmessage/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java b/java/sca/itest/jms/format-jmsmessage/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java deleted file mode 100644 index f47031da10..0000000000 --- a/java/sca/itest/jms/format-jmsmessage/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java +++ /dev/null @@ -1,58 +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 org.apache.tuscany.sca.binding.jms.format;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldReference;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class FormatJMSMessageTestCase {
-
- private static Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
-
- System.out.println(helloWorldService.getGreetings("Fred Bloggs"));
- assertEquals("Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs"));
-
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/format-jmsobject/pom.xml b/java/sca/itest/jms/format-jmsobject/pom.xml deleted file mode 100644 index 9e784d5f4f..0000000000 --- a/java/sca/itest/jms/format-jmsobject/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-format-jmsobject</artifactId>
- <name>Apache Tuscany SCA iTest JMS Message Format jmsobject</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldServiceReference helloWorldService1;
-
- public String getGreetings(String name){
- byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
- String stringValue = new String(bytesValue);
-
- try {
- helloWorldService1.throwChecked(name.getBytes());
- } catch (Exception e) {
- // Test to see what happens if we talk to a service
- // that declares a checked exception through an
- // interface that doesn't
- stringValue += " " + e.getCause().getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(name.getBytes());
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) throws CheckedException;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg){
-
- String name = new String(msg);
- name = "Hello " + name;
-
- return name.getBytes();
- }
-
- public void throwChecked(byte[] msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(byte[] msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldServiceReference {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) ;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java deleted file mode 100644 index a1c38f7295..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java deleted file mode 100644 index 3b34dbae85..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetingsWrapSingle(String firstName, String lastName);
- public String getGreetingsDontWrapSingle(String firstName, String lastName);
-}
-
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 443d2aa746..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,112 +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 org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldService helloWorldServiceWrapSingle;
-
- @Reference
- protected HelloWorldService helloWorldServiceDontWrapSingle;
-
- public String getGreetingsWrapSingle(String firstName, String lastName){
- Person person = new Person();
- person.setFirstName(firstName);
- person.setLastName(lastName);
-
- String returnString = "";
-
- Person returnPerson = helloWorldServiceWrapSingle.getPersonGreetings(person);
- returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName();
-
- Person returnNullPerson = helloWorldServiceWrapSingle.getNullReturnGreetings(person);
-
- if (returnNullPerson == null){
- returnString += " Hello2 null";
- }
-
- String returnGreeting = helloWorldServiceWrapSingle.getArrayGreeting(new String[]{firstName, lastName});
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName});
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceWrapSingle.getMultiGreetings(firstName, lastName);
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceWrapSingle.getObjectGreeting(person);
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceWrapSingle.getObjectArrayGreeting(new Object[]{person});
- returnString += " " + returnGreeting;
-
- return returnString;
- }
-
- public String getGreetingsDontWrapSingle(String firstName, String lastName){
- Person person = new Person();
- person.setFirstName(firstName);
- person.setLastName(lastName);
-
- String returnString = "";
-
- Person returnPerson = helloWorldServiceDontWrapSingle.getPersonGreetings(person);
- returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName();
-
- Person returnNullPerson = helloWorldServiceDontWrapSingle.getNullReturnGreetings(person);
-
- if (returnNullPerson == null){
- returnString += " Hello2 null";
- }
-
- String returnGreeting = helloWorldServiceDontWrapSingle.getArrayGreeting(new String[]{firstName, lastName});
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceDontWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName});
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceDontWrapSingle.getMultiGreetings(firstName, lastName);
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceDontWrapSingle.getObjectGreeting(person);
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceDontWrapSingle.getObjectArrayGreeting(new Object[]{person});
- returnString += " " + returnGreeting;
-
- try {
- helloWorldServiceDontWrapSingle.throwChecked(person);
- } catch (CheckedException e) {
- returnString += " " + e.getMessage();
- }
-
- try {
- helloWorldServiceDontWrapSingle.throwUnChecked(person);
- } catch (Exception e) {
- returnString += " " + e.getCause().getMessage();
- }
-
- return returnString;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java deleted file mode 100644 index b179a86f52..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public Person getPersonGreetings(Person person);
- public Person getNullReturnGreetings(Person person);
- public String getArrayGreeting(String[] names);
- public String getMultiArrayGreetings(String[] firstName, String[] lastName);
- public String getMultiGreetings(String firstName, String lastName);
- public String getObjectGreeting(Object person);
- public String getObjectArrayGreeting(Object[] pearson);
-
- public void throwChecked(Person person) throws CheckedException;
- public void throwUnChecked(Person person);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index fa9e9eb1cb..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,63 +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 org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public Person getPersonGreetings(Person person){
-
- person.setFirstName("Hello1 " + person.getFirstName());
- person.setLastName("Hello1 " + person.getLastName());
-
- return person;
- }
-
- public Person getNullReturnGreetings(Person person){
- return null;
- }
-
- public String getArrayGreeting(String[] names) {
- return "Hello3 " + names[0];
- }
-
- public String getMultiArrayGreetings(String[] firstName, String[] lastName) {
- return "Hello4 " + firstName[0] + " " + lastName[0];
- }
-
- public String getMultiGreetings(String firstName, String lastName) {
- return "Hello5 " + firstName + " " + lastName;
- }
-
- public String getObjectGreeting(Object person) {
- return "Hello6 " + ((Person)person).getFirstName() + " " + ((Person)person).getLastName();
- }
-
- public String getObjectArrayGreeting(Object[] person) {
- return "Hello7 " + ((Person)person[0]).getFirstName() + " " + ((Person)person[0]).getLastName();
- }
-
- public void throwChecked(Person person) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(Person person) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java b/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java deleted file mode 100644 index 29233d74a9..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java +++ /dev/null @@ -1,47 +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 org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
-
-import java.io.Serializable;
-
-public class Person implements Serializable {
-
- private static final long serialVersionUID = -6842761353978551779L;
-
- String firstName;
- String lastName;
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
-}
-
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:helloworld" />
-</contribution>
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite b/java/sca/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite deleted file mode 100644 index e037aa74d9..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- xmlns:hw="http://helloworld"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- name="helloworld">
-
- <component name="HelloWorldReferenceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld.HelloWorldReferenceImpl" />
- <reference name="helloWorldServiceWrapSingle" >
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <tuscany:wireFormat.jmsObject wrapSingle="true"/>
- </binding.jms>
- </reference>
- <reference name="helloWorldServiceDontWrapSingle" >
- <binding.jms>
- <destination jndiName="HelloWorldService2"/>
- <tuscany:wireFormat.jmsObject wrapSingle="false" />
- </binding.jms>
- </reference>
- </component>
-
- <component name="HelloWorldServiceComponent1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <interface.wsdl interface="http://helloworld.jmsobject.format.jms.binding.sca.tuscany.apache.org/#wsdl.interface(HelloWorldService)"/>
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <tuscany:wireFormat.jmsObject wrapSingle="true"/>
- </binding.jms>
- </service>
- </component>
-
- <component name="HelloWorldServiceComponent2">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="HelloWorldService2"/>
- <tuscany:wireFormat.jmsObject /> <!-- test that wrapSingle default works -->
- </binding.jms>
- </service>
- </component>
-</composite>
diff --git a/java/sca/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.wsdl b/java/sca/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.wsdl deleted file mode 100644 index 4625f46578..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.wsdl +++ /dev/null @@ -1,368 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
- <!--
- * 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.
- -->
-<wsdl:definitions name="HelloWorldServiceService"
- targetNamespace="http://helloworld.jmsobject.format.jms.binding.sca.tuscany.apache.org/"
- xmlns:tns="http://helloworld.jmsobject.format.jms.binding.sca.tuscany.apache.org/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/">
- <wsdl:types>
- <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:complexType name="person">
- <xs:sequence>
- <xs:element minOccurs="0" name="firstName"
- type="xs:string" />
- <xs:element minOccurs="0" name="lastName"
- type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- <xs:schema targetNamespace="http://jaxb.dev.java.net/array"
- version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:complexType final="#all" name="stringArray">
- <xs:sequence>
- <xs:element maxOccurs="unbounded"
- minOccurs="0" name="item" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- <xs:complexType final="#all" name="anyTypeArray">
- <xs:sequence>
- <xs:element maxOccurs="unbounded"
- minOccurs="0" name="item" nillable="true" type="xs:anyType" />
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- <xs:schema attributeFormDefault="qualified"
- elementFormDefault="unqualified"
- targetNamespace="http://helloworld.jmsobject.format.jms.binding.sca.tuscany.apache.org/"
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:import />
- <xs:import />
- <xs:import />
- <xs:import />
- <xs:element name="getObjectGreetingResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return"
- nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getNullReturnGreetingsResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return"
- nillable="true" type="person" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getPersonGreetings">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="arg0"
- nillable="true" type="person" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getPersonGreetingsResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return"
- nillable="true" type="person" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getMultiGreetingsResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return"
- nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getObjectArrayGreeting">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded"
- minOccurs="0" name="arg0" nillable="true"
- type="xs:anyType" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getArrayGreeting">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded"
- minOccurs="0" name="arg0" nillable="true"
- type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getObjectArrayGreetingResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return"
- nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getMultiArrayGreetingsResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return"
- nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getObjectGreeting">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="arg0"
- nillable="true" type="xs:anyType" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getNullReturnGreetings">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="arg0"
- nillable="true" type="person" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getMultiArrayGreetings">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded"
- minOccurs="0" name="arg0" nillable="true"
- type="xs:string" />
- <xs:element maxOccurs="unbounded"
- minOccurs="0" name="arg1" nillable="true"
- type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getMultiGreetings">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="arg0"
- nillable="true" type="xs:string" />
- <xs:element minOccurs="0" name="arg1"
- nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getArrayGreetingResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return"
- nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="CheckedException" type="xs:string" />
-
- </xs:schema>
- </wsdl:types>
- <wsdl:message name="getObjectGreetingResponse">
- <wsdl:part name="getObjectGreetingResponse" element="tns:getObjectGreetingResponse">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getNullReturnGreetingsResponse">
- <wsdl:part name="getNullReturnGreetingsResponse"
- element="tns:getNullReturnGreetingsResponse">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getPersonGreetings">
- <wsdl:part name="getPersonGreetings" element="tns:getPersonGreetings">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getPersonGreetingsResponse">
- <wsdl:part name="getPersonGreetingsResponse" element="tns:getPersonGreetingsResponse">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getMultiGreetingsResponse">
- <wsdl:part name="getMultiGreetingsResponse" element="tns:getMultiGreetingsResponse">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getObjectArrayGreeting">
- <wsdl:part name="getObjectArrayGreeting" element="tns:getObjectArrayGreeting">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getArrayGreeting">
- <wsdl:part name="getArrayGreeting" element="tns:getArrayGreeting">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getObjectArrayGreetingResponse">
- <wsdl:part name="getObjectArrayGreetingResponse"
- element="tns:getObjectArrayGreetingResponse">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getMultiArrayGreetingsResponse">
- <wsdl:part name="getMultiArrayGreetingsResponse"
- element="tns:getMultiArrayGreetingsResponse">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getObjectGreeting">
- <wsdl:part name="getObjectGreeting" element="tns:getObjectGreeting">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getNullReturnGreetings">
- <wsdl:part name="getNullReturnGreetings" element="tns:getNullReturnGreetings">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getMultiArrayGreetings">
- <wsdl:part name="getMultiArrayGreetings" element="tns:getMultiArrayGreetings">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getMultiGreetings">
- <wsdl:part name="getMultiGreetings" element="tns:getMultiGreetings">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getArrayGreetingResponse">
- <wsdl:part name="getArrayGreetingResponse" element="tns:getArrayGreetingResponse">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="CheckedException">
- <wsdl:part element="tns:CheckedException" name="fault" />
- </wsdl:message>
- <wsdl:portType name="HelloWorldService">
- <wsdl:operation name="getPersonGreetings">
- <wsdl:input message="tns:getPersonGreetings">
- </wsdl:input>
- <wsdl:output message="tns:getPersonGreetingsResponse">
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getNullReturnGreetings">
- <wsdl:input message="tns:getNullReturnGreetings">
- </wsdl:input>
- <wsdl:output message="tns:getNullReturnGreetingsResponse">
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getArrayGreeting">
- <wsdl:input message="tns:getArrayGreeting">
- </wsdl:input>
- <wsdl:output message="tns:getArrayGreetingResponse">
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getMultiArrayGreetings">
- <wsdl:input message="tns:getMultiArrayGreetings">
- </wsdl:input>
- <wsdl:output message="tns:getMultiArrayGreetingsResponse">
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getMultiGreetings">
- <wsdl:input message="tns:getMultiGreetings">
- </wsdl:input>
- <wsdl:output message="tns:getMultiGreetingsResponse">
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getObjectGreeting">
- <wsdl:input message="tns:getObjectGreeting">
- </wsdl:input>
- <wsdl:output message="tns:getObjectGreetingResponse">
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getObjectArrayGreeting">
- <wsdl:input message="tns:getObjectArrayGreeting">
- </wsdl:input>
- <wsdl:output message="tns:getObjectArrayGreetingResponse">
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="throwChecked">
- <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
- <wsdl:fault message="tns:CheckedException" name="CheckedException"/>
- </wsdl:operation>
- <wsdl:operation name="throwUnChecked">
- <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="HelloWorldServiceBinding" type="tns:HelloWorldService">
- <SOAP:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="getPersonGreetings">
- <SOAP:operation />
- <wsdl:input>
- <SOAP:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <SOAP:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getNullReturnGreetings">
- <SOAP:operation />
- <wsdl:input>
- <SOAP:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <SOAP:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getArrayGreeting">
- <SOAP:operation />
- <wsdl:input>
- <SOAP:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <SOAP:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getMultiArrayGreetings">
- <SOAP:operation />
- <wsdl:input>
- <SOAP:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <SOAP:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getMultiGreetings">
- <SOAP:operation />
- <wsdl:input>
- <SOAP:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <SOAP:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getObjectGreeting">
- <SOAP:operation />
- <wsdl:input>
- <SOAP:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <SOAP:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getObjectArrayGreeting">
- <SOAP:operation />
- <wsdl:input>
- <SOAP:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <SOAP:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="HelloWorldServiceService">
- <wsdl:port name="HelloWorldServicePort" binding="tns:HelloWorldServiceBinding">
- <SOAP:address location="/HelloWorldServiceComponent1" />
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
\ No newline at end of file diff --git a/java/sca/itest/jms/format-jmsobject/src/main/resources/jndi.properties b/java/sca/itest/jms/format-jmsobject/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java b/java/sca/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java deleted file mode 100644 index a2bfc0ca8a..0000000000 --- a/java/sca/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java +++ /dev/null @@ -1,73 +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 org.apache.tuscany.sca.binding.jms.format;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld.HelloWorldReference;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class FormatJMSObjectTestCase {
-
- private static Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
-
- assertEquals("Hello1 Fred Hello1 Bloggs Hello2 null Hello3 Fred Hello4 Fred Bloggs Hello5 Fred Bloggs Hello6 Fred Bloggs Hello7 Fred Bloggs",
- helloWorldService.getGreetingsWrapSingle("Fred", "Bloggs"));
-
- assertEquals("Hello1 Fred Hello1 Bloggs Hello2 null Hello3 Fred Hello4 Fred Bloggs Hello5 Fred Bloggs Hello6 Fred Bloggs Hello7 Fred Bloggs foo bla",
- helloWorldService.getGreetingsDontWrapSingle("Fred", "Bloggs"));
-
- }
-
- @Ignore
- @Test
- public void testWaitForInput() {
- System.out.println("Press a key to end");
- try {
- System.in.read();
- } catch (Exception ex) {
- }
- System.out.println("Shutting down");
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/format-jmstext/pom.xml b/java/sca/itest/jms/format-jmstext/pom.xml deleted file mode 100644 index a416b7ae72..0000000000 --- a/java/sca/itest/jms/format-jmstext/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-format-jmstext</artifactId>
- <name>Apache Tuscany SCA iTest JMS Message Format jmstext</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldServiceReference helloWorldService1;
-
- public String getGreetings(String name){
- byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
- String stringValue = new String(bytesValue);
-
- try {
- helloWorldService1.throwChecked(name.getBytes());
- } catch (Exception e) {
- // Test to see what happens if we talk to a service
- // that declares a checked exception through an
- // interface that doesn't
- stringValue += " " + e.getCause().getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(name.getBytes());
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) throws CheckedException;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg){
-
- String name = new String(msg);
- name = "Hello " + name;
-
- return name.getBytes();
- }
-
- public void throwChecked(byte[] msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(byte[] msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldServiceReference {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) ;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java deleted file mode 100644 index 57ad23e064..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java deleted file mode 100644 index ea8d5ffd28..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index afcd391009..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.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 org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldService helloWorldService1;
-
- public String getGreetings(String name){
- String stringValue = helloWorldService1.getStringGreetings(name);
-
- try {
- helloWorldService1.throwChecked(name);
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(name);
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java deleted file mode 100644 index 8af585c13c..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getStringGreetings(String msg);
-
- public void throwChecked(String msg) throws CheckedException;
- public void throwUnChecked(String msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index 4f0a6fe4c5..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public String getStringGreetings(String msg){
-
- msg = "Hello " + msg;
- return msg;
- }
-
- public void throwChecked(String msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(String msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java b/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index a8dd686725..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldServiceReference {
-
- public String getStringGreetings(String msg);
-
- public void throwChecked(String msg) ;
- public void throwUnChecked(String msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstext/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/format-jmstext/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:helloworld" />
-</contribution>
diff --git a/java/sca/itest/jms/format-jmstext/src/main/resources/jmstext/helloworld.composite b/java/sca/itest/jms/format-jmstext/src/main/resources/jmstext/helloworld.composite deleted file mode 100644 index d700a92f20..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/resources/jmstext/helloworld.composite +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:hw="http://helloworld"
- name="helloworld">
-
- <component name="HelloWorldReferenceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld.HelloWorldReferenceImpl" />
- <reference name="helloWorldService1" >
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <tuscany:wireFormat.jmsText/>
- </binding.jms>
- </reference>
- </component>
-
- <component name="HelloWorldServiceComponent1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <tuscany:wireFormat.jmsText/>
- </binding.jms>
- </service>
- </component>
-</composite>
diff --git a/java/sca/itest/jms/format-jmstext/src/main/resources/jndi.properties b/java/sca/itest/jms/format-jmstext/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/format-jmstext/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextTestCase.java b/java/sca/itest/jms/format-jmstext/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextTestCase.java deleted file mode 100644 index b887aa18fd..0000000000 --- a/java/sca/itest/jms/format-jmstext/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextTestCase.java +++ /dev/null @@ -1,60 +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 org.apache.tuscany.sca.binding.jms.format;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldReference;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class FormatJMSTextTestCase {
-
- private static Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
-
- System.out.println(helloWorldService.getGreetings("Fred Bloggs"));
- assertEquals("Hello Fred Bloggs " +
- "foo remote service exception, see nested exception",
- helloWorldService.getGreetings("Fred Bloggs"));
-
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/format-jmstextxml/pom.xml b/java/sca/itest/jms/format-jmstextxml/pom.xml deleted file mode 100644 index 9235ad3f93..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-format-jmstextxml</artifactId>
- <name>Apache Tuscany SCA iTest JMS Message Format jmstextxml</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldServiceReference helloWorldService1;
-
- public String getGreetings(String name){
- byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
- String stringValue = new String(bytesValue);
-
- try {
- helloWorldService1.throwChecked(name.getBytes());
- } catch (Exception e) {
- // Test to see what happens if we talk to a service
- // that declares a checked exception through an
- // interface that doesn't
- stringValue += " " + e.getCause().getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(name.getBytes());
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) throws CheckedException;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg){
-
- String name = new String(msg);
- name = "Hello " + name;
-
- return name.getBytes();
- }
-
- public void throwChecked(byte[] msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(byte[] msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldServiceReference {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) ;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java deleted file mode 100644 index 5e9a7a316e..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java deleted file mode 100644 index 768b293380..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.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 org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String name);
- public String getPersonGreetings(Person person);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 2bac5db5ab..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.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 org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldService helloWorldService1;
-
- @Reference
- protected HelloWorldService helloWorldService2;
-
- @Reference
- protected HelloWorldService helloWorldService3;
-
- public String getGreetings(String name){
- String stringValue = helloWorldService1.getGreetings(name) + " " +
- helloWorldService2.getGreetings(name) + " " +
- helloWorldService3.getGreetings(name);
-
- return stringValue;
- }
-
- public String getPersonGreetings(Person person){
- String stringValue = helloWorldService1.getPersonGreetings(person) + " " +
- helloWorldService2.getPersonGreetings(person) + " " +
- helloWorldService3.getPersonGreetings(person);
-
- try {
- helloWorldService1.throwChecked(person.getLastName());
- } catch (CheckedException e) {
- stringValue += " " + e.getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(person.getLastName());
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
-
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java deleted file mode 100644 index be2af78958..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getGreetings(String name);
- public String getPersonGreetings(Person person);
-
- public void throwChecked(String msg) throws CheckedException;
- public void throwUnChecked(String msg);
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index e85d4ca5a4..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,44 +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 org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public String getGreetings(String name){
- String response = "Hello " + name;
- System.out.println("getGreetings: " + response);
- return response;
- }
-
- public String getPersonGreetings(Person person){
- String response = "Hello " + person.getFirstName() + " " + person.getLastName();
- System.out.println("getPersonGreetings: " + response);
- return response;
- }
-
- public void throwChecked(String msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(String msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java b/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java deleted file mode 100644 index 175b482c81..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java +++ /dev/null @@ -1,42 +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 org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
-
-public class Person {
- String firstName;
- String lastName;
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/format-jmstextxml/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:helloworld" />
-</contribution>
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.composite b/java/sca/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.composite deleted file mode 100644 index 72e7646704..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.composite +++ /dev/null @@ -1,80 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:hw="http://helloworld"
- name="helloworld">
-
- <component name="HelloWorldReferenceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldReferenceImpl" />
- <reference name="helloWorldService1" >
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <tuscany:wireFormat.jmsTextXML/>
- </binding.jms>
- </reference>
- <reference name="helloWorldService2" >
- <binding.jms>
- <destination jndiName="HelloWorldService2"/>
- <tuscany:wireFormat.jmsTextXML/>
- </binding.jms>
- </reference>
- <reference name="helloWorldService3" >
- <binding.jms>
- <destination jndiName="HelloWorldService3"/>
- <tuscany:wireFormat.jmsTextXML/>
- </binding.jms>
- </reference>
- </component>
-
- <component name="HelloWorldServiceComponent1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <tuscany:wireFormat.jmsTextXML/>
- </binding.jms>
- </service>
- </component>
-
- <component name="HelloWorldServiceComponent2">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <interface.java interface="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldService" />
- <binding.jms>
- <destination jndiName="HelloWorldService2"/>
- <tuscany:wireFormat.jmsTextXML/>
- </binding.jms>
- </service>
- </component>
-
- <component name="HelloWorldServiceComponent3">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <interface.wsdl interface="http://helloworld/textxml#wsdl.interface(HelloWorld)" />
- <binding.jms>
- <destination jndiName="HelloWorldService3"/>
- <tuscany:wireFormat.jmsTextXML/>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.wsdl b/java/sca/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.wsdl deleted file mode 100644 index 53db66ea7e..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.wsdl +++ /dev/null @@ -1,153 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<wsdl:definitions targetNamespace="http://helloworld/textxml" xmlns:tns="http://helloworld/textxml" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="helloworld">
-
- <wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
-
- <element name="getGreetings">
- <complexType>
- <sequence>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getGreetingsResponse">
- <complexType>
- <sequence>
- <element name="getGreetingsReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- </schema>
- <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="PersonType">
- <xsd:sequence>
- <xsd:element name="firstName" type="xsd:string"/>
- <xsd:element name="lastName" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <element name="getPersonGreetings">
- <complexType>
- <sequence>
- <element name="person" type="PersonType"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getPersonGreetingsResponse">
- <complexType>
- <sequence>
- <element name="getPersonGreetingsReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="CheckedException" type="xsd:string" />
-
- </schema>
-
- </wsdl:types>
-
- <wsdl:message name="getGreetingsRequest">
- <wsdl:part element="tns:getGreetings" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getGreetingsResponse">
- <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getPersonGreetingsRequest">
- <wsdl:part element="tns:getPersonGreetings" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getPersonGreetingsResponse">
- <wsdl:part element="tns:getPersonGreetingsResponse" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="CheckedException">
- <wsdl:part element="tns:CheckedException" name="fault" />
- </wsdl:message>
-
- <wsdl:portType name="HelloWorld">
- <wsdl:operation name="getGreetings">
- <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
- <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
- </wsdl:operation>
- <wsdl:operation name="getPersonGreetings">
- <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
- <wsdl:output message="tns:getPersonGreetingsResponse" name="getPersonGreetingsResponse"/>
- </wsdl:operation>
- <wsdl:operation name="throwChecked">
- <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
- <wsdl:fault message="tns:CheckedException" name="CheckedException"/>
- </wsdl:operation>
- <wsdl:operation name="throwUnChecked">
- <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
- </wsdl:operation>
- </wsdl:portType>
-
- <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="getGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getPersonGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getPersonGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getPersonGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
-
- <!-- wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms"/>
- <wsdl:operation name="getGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding-->
-
- <wsdl:service name="HelloWorldService">
- <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
- <wsdlsoap:address location="http://localhost:8085/HelloWorldService"/>
- </wsdl:port>
- </wsdl:service>
-
-</wsdl:definitions>
diff --git a/java/sca/itest/jms/format-jmstextxml/src/main/resources/jndi.properties b/java/sca/itest/jms/format-jmstextxml/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/format-jmstextxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java b/java/sca/itest/jms/format-jmstextxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java deleted file mode 100644 index 6054050a5d..0000000000 --- a/java/sca/itest/jms/format-jmstextxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.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 org.apache.tuscany.sca.binding.jms.format;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldReference;
-import org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.Person;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class FormatJMSTextXMLTestCase {
-
- private static Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
-
- assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs"));
-
- Person person = new Person();
- person.setFirstName("Fred");
- person.setLastName("Bloggs");
- assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs foo remote service exception, see nested exception", helloWorldService.getPersonGreetings(person));
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml deleted file mode 100644 index 28da31fbde..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-format-jmstextxmlinjmsobjectout</artifactId>
- <name>Apache Tuscany SCA iTest JMS Message Format jmstextxmlinjmsobjectout</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldServiceReference helloWorldService1;
-
- public String getGreetings(String name){
- byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
- String stringValue = new String(bytesValue);
-
- try {
- helloWorldService1.throwChecked(name.getBytes());
- } catch (Exception e) {
- // Test to see what happens if we talk to a service
- // that declares a checked exception through an
- // interface that doesn't
- stringValue += " " + e.getCause().getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(name.getBytes());
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) throws CheckedException;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg){
-
- String name = new String(msg);
- name = "Hello " + name;
-
- return name.getBytes();
- }
-
- public void throwChecked(byte[] msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(byte[] msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldServiceReference {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) ;
- public void throwUnChecked(byte[] msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java deleted file mode 100644 index 1684c19c50..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java deleted file mode 100644 index cc7b7b11e4..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3742bd6ac6..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.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 org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldService helloWorldService1;
-
- public String getGreetings(String name){
- byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
- String stringValue = new String(bytesValue);
-
- try {
- helloWorldService1.throwChecked(name.getBytes());
- } catch (CheckedException e) {
- stringValue += " " + e.getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(name.getBytes());
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java deleted file mode 100644 index eae95b4201..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg);
-
- public void throwChecked(byte[] msg) throws CheckedException;
- public void throwUnChecked(byte[] msg);
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index a37a03d994..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,39 +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 org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public byte[] getByteArrayGreetings(byte[] msg){
-
- String name = new String(msg);
- name = "Hello " + name;
-
- return name.getBytes();
- }
-
- public void throwChecked(byte[] msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(byte[] msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java deleted file mode 100644 index 530eac3d00..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java deleted file mode 100644 index 1768816247..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,36 +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 org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String name);
-
- public String getPersonGreetings(Person person);
-
- public void nullInVoidOut();
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index d0a5faaef7..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,85 +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 org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldService helloWorldService1;
-
- @Reference
- protected HelloWorldService helloWorldService2;
-
- @Reference
- protected HelloWorldService helloWorldService3;
-
- @Reference
- protected HelloWorldService helloWorldService4;
-
- public String getGreetings(String name){
- String stringValue = helloWorldService1.getGreetings(name) + " " +
- helloWorldService2.getGreetings(name) + " " +
- helloWorldService3.getGreetings(name) + " " +
- helloWorldService4.getGreetings(name);
-
- try {
- helloWorldService3.throwChecked(name);
- } catch (CheckedException e) {
- stringValue += " " + e.getMessage();
- }
-
- try {
- helloWorldService3.throwUnChecked(name);
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
-
- try {
- helloWorldService4.throwChecked(name);
- } catch (CheckedException e) {
- stringValue += " " + e.getMessage();
- }
-
- try {
- helloWorldService4.throwUnChecked(name);
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
-
- return stringValue;
- }
-
- public String getPersonGreetings(Person person){
- return helloWorldService1.getPersonGreetings(person) + " " +
- helloWorldService2.getPersonGreetings(person) + " " +
- helloWorldService3.getPersonGreetings(person) + " " +
- helloWorldService4.getPersonGreetings(person);
- }
-
- public void nullInVoidOut() {
- helloWorldService1.nullInVoidOut();
- helloWorldService2.nullInVoidOut();
- helloWorldService3.nullInVoidOut();
- helloWorldService4.nullInVoidOut();
-
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java deleted file mode 100644 index 204863423d..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getGreetings(String name);
-
- public String getPersonGreetings(Person person);
-
- public void nullInVoidOut();
-
- public void throwChecked(String msg) throws CheckedException;
- public void throwUnChecked(String msg);
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b143079fe3..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,51 +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 org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public static int nullInVoidOutCalled = 0;
-
- public String getGreetings(String name){
- String response = "Hello " + name;
- System.out.println("getGreetings: " + response);
- return response;
- }
-
- public String getPersonGreetings(Person person){
- String response = "Hello " + person.getFirstName() + " " + person.getLastName();
- System.out.println("getPersonGreetings: " + response);
- return response;
- }
-
- public void nullInVoidOut() {
- System.out.println("nullInVoidOut");
- nullInVoidOutCalled++;
- }
-
- public void throwChecked(String msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(String msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java deleted file mode 100644 index b62d1b1f1d..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java +++ /dev/null @@ -1,42 +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 org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
-
-public class Person {
- String firstName;
- String lastName;
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java deleted file mode 100644 index 490bd5d4a3..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 5aed6b12d7..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldServiceReferenceSide helloWorldService1;
-
- public String getGreetings(String name){
- helloWorldService1.getGreetings(name);
-
- try {
- Thread.sleep(2000);
- } catch (Exception ex) {
- // do nothing
- }
-
- return HelloWorldServiceImpl.getGreetings();
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java deleted file mode 100644 index efe2f1a4dc..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- @OneWay
- public void onMessage(javax.jms.Message message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index c1011ce6fb..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,51 +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 org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
-
-import javax.jms.TextMessage;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- private static String greetings = "not set";
-
- public void onMessage(javax.jms.Message message){
-
- String name = null;
-
- try {
- name = ((TextMessage)message).getText();
- } catch (Exception ex) {
- name = "EXCEPTION";
- }
- greetings = "Hello " + name;
- }
-
- public static String getGreetings(){
- return greetings;
- }
-
- // javax.jms.BytesMessage
- // javax.jms.MapMessage
- // javax.jms.ObjectMessage
- // javax.jms.StreamMessage
- // javax.jms.TextMessage
-
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java deleted file mode 100644 index d863b3a0a3..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java +++ /dev/null @@ -1,37 +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 org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
-
-import javax.jws.soap.SOAPBinding;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldServiceReferenceSide {
-
- @OneWay
- @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
- public void getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README deleted file mode 100644 index 0f7a730b91..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README +++ /dev/null @@ -1,3 +0,0 @@ -This test uses an SCA composite to fake a scenario where the reference is an SCA reference but the
-service is a non-SCA JMS endpoint. This gives us the opportunity to play about with the interface
-configuration at the reference to see how the contents of the JMS message can be controlled.
\ No newline at end of file diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java deleted file mode 100644 index a1c38f7295..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java deleted file mode 100644 index 3b34dbae85..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetingsWrapSingle(String firstName, String lastName);
- public String getGreetingsDontWrapSingle(String firstName, String lastName);
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 443d2aa746..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,112 +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 org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldService helloWorldServiceWrapSingle;
-
- @Reference
- protected HelloWorldService helloWorldServiceDontWrapSingle;
-
- public String getGreetingsWrapSingle(String firstName, String lastName){
- Person person = new Person();
- person.setFirstName(firstName);
- person.setLastName(lastName);
-
- String returnString = "";
-
- Person returnPerson = helloWorldServiceWrapSingle.getPersonGreetings(person);
- returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName();
-
- Person returnNullPerson = helloWorldServiceWrapSingle.getNullReturnGreetings(person);
-
- if (returnNullPerson == null){
- returnString += " Hello2 null";
- }
-
- String returnGreeting = helloWorldServiceWrapSingle.getArrayGreeting(new String[]{firstName, lastName});
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName});
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceWrapSingle.getMultiGreetings(firstName, lastName);
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceWrapSingle.getObjectGreeting(person);
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceWrapSingle.getObjectArrayGreeting(new Object[]{person});
- returnString += " " + returnGreeting;
-
- return returnString;
- }
-
- public String getGreetingsDontWrapSingle(String firstName, String lastName){
- Person person = new Person();
- person.setFirstName(firstName);
- person.setLastName(lastName);
-
- String returnString = "";
-
- Person returnPerson = helloWorldServiceDontWrapSingle.getPersonGreetings(person);
- returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName();
-
- Person returnNullPerson = helloWorldServiceDontWrapSingle.getNullReturnGreetings(person);
-
- if (returnNullPerson == null){
- returnString += " Hello2 null";
- }
-
- String returnGreeting = helloWorldServiceDontWrapSingle.getArrayGreeting(new String[]{firstName, lastName});
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceDontWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName});
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceDontWrapSingle.getMultiGreetings(firstName, lastName);
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceDontWrapSingle.getObjectGreeting(person);
- returnString += " " + returnGreeting;
-
- returnGreeting = helloWorldServiceDontWrapSingle.getObjectArrayGreeting(new Object[]{person});
- returnString += " " + returnGreeting;
-
- try {
- helloWorldServiceDontWrapSingle.throwChecked(person);
- } catch (CheckedException e) {
- returnString += " " + e.getMessage();
- }
-
- try {
- helloWorldServiceDontWrapSingle.throwUnChecked(person);
- } catch (Exception e) {
- returnString += " " + e.getCause().getMessage();
- }
-
- return returnString;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java deleted file mode 100644 index b179a86f52..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public Person getPersonGreetings(Person person);
- public Person getNullReturnGreetings(Person person);
- public String getArrayGreeting(String[] names);
- public String getMultiArrayGreetings(String[] firstName, String[] lastName);
- public String getMultiGreetings(String firstName, String lastName);
- public String getObjectGreeting(Object person);
- public String getObjectArrayGreeting(Object[] pearson);
-
- public void throwChecked(Person person) throws CheckedException;
- public void throwUnChecked(Person person);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index fa9e9eb1cb..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,63 +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 org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public Person getPersonGreetings(Person person){
-
- person.setFirstName("Hello1 " + person.getFirstName());
- person.setLastName("Hello1 " + person.getLastName());
-
- return person;
- }
-
- public Person getNullReturnGreetings(Person person){
- return null;
- }
-
- public String getArrayGreeting(String[] names) {
- return "Hello3 " + names[0];
- }
-
- public String getMultiArrayGreetings(String[] firstName, String[] lastName) {
- return "Hello4 " + firstName[0] + " " + lastName[0];
- }
-
- public String getMultiGreetings(String firstName, String lastName) {
- return "Hello5 " + firstName + " " + lastName;
- }
-
- public String getObjectGreeting(Object person) {
- return "Hello6 " + ((Person)person).getFirstName() + " " + ((Person)person).getLastName();
- }
-
- public String getObjectArrayGreeting(Object[] person) {
- return "Hello7 " + ((Person)person[0]).getFirstName() + " " + ((Person)person[0]).getLastName();
- }
-
- public void throwChecked(Person person) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(Person person) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java deleted file mode 100644 index 29233d74a9..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java +++ /dev/null @@ -1,47 +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 org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
-
-import java.io.Serializable;
-
-public class Person implements Serializable {
-
- private static final long serialVersionUID = -6842761353978551779L;
-
- String firstName;
- String lastName;
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java deleted file mode 100644 index 57ad23e064..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java deleted file mode 100644 index ea8d5ffd28..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String message);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index afcd391009..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.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 org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldService helloWorldService1;
-
- public String getGreetings(String name){
- String stringValue = helloWorldService1.getStringGreetings(name);
-
- try {
- helloWorldService1.throwChecked(name);
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(name);
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java deleted file mode 100644 index 8af585c13c..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getStringGreetings(String msg);
-
- public void throwChecked(String msg) throws CheckedException;
- public void throwUnChecked(String msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index 4f0a6fe4c5..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public String getStringGreetings(String msg){
-
- msg = "Hello " + msg;
- return msg;
- }
-
- public void throwChecked(String msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(String msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index a8dd686725..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldServiceReference {
-
- public String getStringGreetings(String msg);
-
- public void throwChecked(String msg) ;
- public void throwUnChecked(String msg);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java deleted file mode 100644 index 5e9a7a316e..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
-
-public class CheckedException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public CheckedException(String s) {
- super(s);
- }
-}
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java deleted file mode 100644 index 768b293380..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.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 org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldReference {
-
- public String getGreetings(String name);
- public String getPersonGreetings(Person person);
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 2bac5db5ab..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.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 org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-public class HelloWorldReferenceImpl implements HelloWorldReference {
-
- @Reference
- protected HelloWorldService helloWorldService1;
-
- @Reference
- protected HelloWorldService helloWorldService2;
-
- @Reference
- protected HelloWorldService helloWorldService3;
-
- public String getGreetings(String name){
- String stringValue = helloWorldService1.getGreetings(name) + " " +
- helloWorldService2.getGreetings(name) + " " +
- helloWorldService3.getGreetings(name);
-
- return stringValue;
- }
-
- public String getPersonGreetings(Person person){
- String stringValue = helloWorldService1.getPersonGreetings(person) + " " +
- helloWorldService2.getPersonGreetings(person) + " " +
- helloWorldService3.getPersonGreetings(person);
-
- try {
- helloWorldService1.throwChecked(person.getLastName());
- } catch (CheckedException e) {
- stringValue += " " + e.getMessage();
- }
-
- try {
- helloWorldService1.throwUnChecked(person.getLastName());
- } catch (Exception e) {
- stringValue += " " + e.getMessage();
- }
-
- return stringValue;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java deleted file mode 100644 index be2af78958..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getGreetings(String name);
- public String getPersonGreetings(Person person);
-
- public void throwChecked(String msg) throws CheckedException;
- public void throwUnChecked(String msg);
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index e85d4ca5a4..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,44 +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 org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
-
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public String getGreetings(String name){
- String response = "Hello " + name;
- System.out.println("getGreetings: " + response);
- return response;
- }
-
- public String getPersonGreetings(Person person){
- String response = "Hello " + person.getFirstName() + " " + person.getLastName();
- System.out.println("getPersonGreetings: " + response);
- return response;
- }
-
- public void throwChecked(String msg) throws CheckedException {
- throw new CheckedException("foo");
- }
-
- public void throwUnChecked(String msg) {
- throw new RuntimeException("bla");
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java deleted file mode 100644 index 175b482c81..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java +++ /dev/null @@ -1,42 +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 org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
-
-public class Person {
- String firstName;
- String lastName;
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 7bb33ae270..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-
-public class HelloWorldReferenceImpl implements HelloWorldService {
-
- @Reference
- protected HelloWorldService helloWorldService1;
-
- public String getGreetings(String name){
- return helloWorldService1.getGreetings(name).toString();
- }
-
- public String getPersonGreetings(Person person){
- return helloWorldService1.getPersonGreetings(person).toString();
- }
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldService.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldService.java deleted file mode 100644 index 9f955c278a..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldService.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 org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getGreetings(String name);
-
- public String getPersonGreetings(Person person);
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index 7c1cce6087..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public String getGreetings(String name){
- String response = "Hello " + name;
- System.out.println("getGreetings: " + response);
- return response;
- }
-
- public String getPersonGreetings(Person person){
- String response = "Hello " + person.getFirstName() + " " + person.getLastName();
- System.out.println("getPersonGreetings: " + response);
- return response;
- }
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/Person.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/Person.java deleted file mode 100644 index 3d41f656f9..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/Person.java +++ /dev/null @@ -1,42 +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 org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld;
-
-public class Person {
- String firstName;
- String lastName;
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
-}
-
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:helloworld" />
-</contribution>
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.composite b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.composite deleted file mode 100644 index b8bc67d5e3..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.composite +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:hw="http://helloworld"
- name="helloworld">
-
- <component name="HelloWorldReferenceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld.HelloWorldReferenceImpl" />
- <reference name="helloWorldService1" >
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <response>
- <tuscany:wireFormat.jmsObject/>
- </response>
- <tuscany:wireFormat.jmsTextXML/>
- </binding.jms>
- </reference>
- </component>
-
- <component name="HelloWorldServiceComponent1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="HelloWorldService1"/>
- <response>
- <tuscany:wireFormat.jmsObject/>
- </response>
- <tuscany:wireFormat.jmsTextXML/>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.wsdl b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.wsdl deleted file mode 100644 index 935a2e73c5..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.wsdl +++ /dev/null @@ -1,139 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<wsdl:definitions targetNamespace="http://helloworld/textxml" xmlns:tns="http://helloworld/textxml" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="helloworld">
-
- <wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
-
- <element name="getGreetings">
- <complexType>
- <sequence>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getGreetingsResponse">
- <complexType>
- <sequence>
- <element name="getGreetingsReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- </schema>
- <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="PersonType">
- <xsd:sequence>
- <xsd:element name="firstName" type="xsd:string"/>
- <xsd:element name="lastName" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <element name="getPersonGreetings">
- <complexType>
- <sequence>
- <element name="person" type="PersonType"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getPersonGreetingsResponse">
- <complexType>
- <sequence>
- <element name="getPersonGreetingsReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- </schema>
-
- </wsdl:types>
-
- <wsdl:message name="getGreetingsRequest">
- <wsdl:part element="tns:getGreetings" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getGreetingsResponse">
- <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getPersonGreetingsRequest">
- <wsdl:part element="tns:getPersonGreetings" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getPersonGreetingsResponse">
- <wsdl:part element="tns:getPersonGreetingsResponse" name="parameters"/>
- </wsdl:message>
-
- <wsdl:portType name="HelloWorld">
- <wsdl:operation name="getGreetings">
- <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
- <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
- </wsdl:operation>
- <wsdl:operation name="getPersonGreetings">
- <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
- <wsdl:output message="tns:getPersonGreetingsResponse" name="getPersonGreetingsResponse"/>
- </wsdl:operation>
- </wsdl:portType>
-
- <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="getGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getPersonGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getPersonGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getPersonGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
-
- <!-- wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms"/>
- <wsdl:operation name="getGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getGreetingsRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="getGreetingsResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding-->
-
- <wsdl:service name="HelloWorldService">
- <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
- <wsdlsoap:address location="http://localhost:8085/HelloWorldService"/>
- </wsdl:port>
- </wsdl:service>
-
-</wsdl:definitions>
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jndi.properties b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLInJMSObjectOutTestCase.java b/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLInJMSObjectOutTestCase.java deleted file mode 100644 index 8fc3d77cb3..0000000000 --- a/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLInJMSObjectOutTestCase.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 org.apache.tuscany.sca.binding.jms.format;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld.HelloWorldService;
-import org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld.Person;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class FormatJMSTextXMLInJMSObjectOutTestCase {
-
- private static Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldReferenceComponent");
-
- assertEquals("Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs"));
-
- Person person = new Person();
- person.setFirstName("Fred");
- person.setLastName("Bloggs");
- assertEquals("Hello Fred Bloggs", helloWorldService.getPersonGreetings(person));
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/non-sca-client/pom.xml b/java/sca/itest/jms/non-sca-client/pom.xml deleted file mode 100644 index 84331d04cc..0000000000 --- a/java/sca/itest/jms/non-sca-client/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-non-sca-client-broker</artifactId>
- <name>Apache Tuscany SCA iTest JMS with Non SCA Client</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java b/java/sca/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java deleted file mode 100644 index 9083ba1d9c..0000000000 --- a/java/sca/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java +++ /dev/null @@ -1,29 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface OneWayObjectService {
-
- @OneWay
- void sayHello(Object name);
-}
diff --git a/java/sca/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java b/java/sca/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java deleted file mode 100644 index 3149f99a25..0000000000 --- a/java/sca/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.binding.jms;
-
-public class OneWayObjectServiceImpl implements OneWayObjectService {
-
- public static Object mutex = new Object();
- public static Object name;
-
- public void sayHello(Object name) {
- OneWayObjectServiceImpl.name = name;
- synchronized (OneWayObjectServiceImpl.mutex) {
- OneWayObjectServiceImpl.mutex.notify();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/java/sca/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java deleted file mode 100644 index 9cec2d9b3e..0000000000 --- a/java/sca/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java +++ /dev/null @@ -1,29 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface OneWayService {
-
- @OneWay
- void sayHello(String name);
-}
diff --git a/java/sca/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/java/sca/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java deleted file mode 100644 index 0036391696..0000000000 --- a/java/sca/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.binding.jms;
-
-public class OneWayServiceImpl implements OneWayService {
-
- public static Object mutex = new Object();
- public static String name;
-
- public void sayHello(String name) {
- OneWayServiceImpl.name = name;
- synchronized (OneWayServiceImpl.mutex) {
- OneWayServiceImpl.mutex.notify();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/non-sca-client/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/non-sca-client/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 90106d2cbf..0000000000 --- a/java/sca/itest/jms/non-sca-client/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:ServiceComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/non-sca-client/src/main/resources/jndi.properties b/java/sca/itest/jms/non-sca-client/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/non-sca-client/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/non-sca-client/src/main/resources/nonSCAclient/service.composite b/java/sca/itest/jms/non-sca-client/src/main/resources/nonSCAclient/service.composite deleted file mode 100644 index 967754b6e4..0000000000 --- a/java/sca/itest/jms/non-sca-client/src/main/resources/nonSCAclient/service.composite +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://itest"
- name="ServiceComposite">
-
- <component name="DefaultService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayServiceImpl"/>
- <service name="OneWayService">
- <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61623">
- <tuscany:wireFormat.jmsTextXML/>
- </binding.jms>
- </service>
- </component>
-
- <component name="TextService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayServiceImpl"/>
- <service name="OneWayService">
- <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61623"
- uri="jms:TextDest">
- <tuscany:wireFormat.jmsText/>
- </binding.jms>
- </service>
- </component>
-
- <component name="ObjectService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayObjectServiceImpl"/>
- <service name="OneWayObjectService">
- <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61623"
- uri="jms:ObjectDest">
- <tuscany:wireFormat.jmsObject /> <!-- test that wrapSingle default works -->
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/non-sca-client/src/test/java/org/apache/tuscany/sca/binding/jms/NonSCAClientTestCase.java b/java/sca/itest/jms/non-sca-client/src/test/java/org/apache/tuscany/sca/binding/jms/NonSCAClientTestCase.java deleted file mode 100644 index 54cfdeb273..0000000000 --- a/java/sca/itest/jms/non-sca-client/src/test/java/org/apache/tuscany/sca/binding/jms/NonSCAClientTestCase.java +++ /dev/null @@ -1,144 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.naming.NamingException;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
-import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactoryImpl;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class NonSCAClientTestCase {
-
- private static Node node;
-
- @Before
- public void init() throws Exception {
- startBroker();
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @After
- public void end() throws Exception {
- if (node != null) {
- node.stop();
- }
- stopBroker();
- }
-
-
- @Test
- public void testXMLText() throws Exception {
-
- synchronized (OneWayServiceImpl.mutex) {
-
- sendTextMessage("dynamicQueues/OneWayService", "<ns2:sayHello xmlns:ns2=\"http://jms.binding.sca.tuscany.apache.org/\"><arg0>Petra</arg0></ns2:sayHello>");
-
- // wait up to 10 seconds but it will likely be a lot less
- // as the service invocation will wake this up earlier
- if (OneWayServiceImpl.name == null) {
- OneWayServiceImpl.mutex.wait(10000);
- }
- }
- assertEquals("Petra", OneWayServiceImpl.name);
- }
-
- @Test
- public void testText() throws Exception {
-
- synchronized (OneWayServiceImpl.mutex) {
-
- sendTextMessage("dynamicQueues/TextDest", "Petra");
-
- // wait up to 10 seconds but it will likely be a lot less
- // as the service invocation will wake this up earlier
- OneWayServiceImpl.mutex.wait(10000);
- }
- assertEquals("Petra", OneWayServiceImpl.name);
- }
-
- @Test
- public void testObject() throws Exception {
-
- Set<Integer> arg = new HashSet<Integer>();
- arg.add(new Integer(3));
-
- synchronized (OneWayObjectServiceImpl.mutex) {
-
- sendObjectMessage("dynamicQueues/ObjectDest", arg);
-
- // wait up to 10 seconds but it will likely be a lot less
- // as the service invocation will wake this up earlier
- OneWayObjectServiceImpl.mutex.wait(10000);
- }
- assertEquals(arg, OneWayObjectServiceImpl.name);
- }
-
- private static BrokerService broker;
- protected static void startBroker() throws Exception {
- broker = new BrokerService();
- broker.setPersistent(false);
- broker.setUseJmx(false);
- broker.addConnector("tcp://localhost:61623");
- broker.start();
- }
-
- protected static void stopBroker() throws Exception {
- if (broker != null) {
- broker.stop();
- }
- }
-
- protected static void sendTextMessage(String destName, String payload) throws JMSException, NamingException {
- JMSResourceFactory rf = new JMSResourceFactoryImpl(null, null, null, "tcp://localhost:61623");
- Session session = rf.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer p = session.createProducer(rf.lookupDestination(destName));
- rf.getConnection().start();
- session.run();
- p.send(session.createTextMessage(payload));
- rf.closeConnection();
- }
-
- protected static void sendObjectMessage(String destName, Object payload) throws JMSException, NamingException {
- JMSResourceFactory rf = new JMSResourceFactoryImpl(null, null, null, "tcp://localhost:61623");
- Session session = rf.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer p = session.createProducer(rf.lookupDestination(destName));
- rf.getConnection().start();
- session.run();
- p.send(session.createObjectMessage((Serializable)payload));
- rf.closeConnection();
- }
-}
diff --git a/java/sca/itest/jms/noreplyto/pom.xml b/java/sca/itest/jms/noreplyto/pom.xml deleted file mode 100644 index 79cbc59ed5..0000000000 --- a/java/sca/itest/jms/noreplyto/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-noreplyto</artifactId>
- <name>Apache Tuscany SCA iTest JMS No replyTo</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/java/sca/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/java/sca/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface HelloWorldService {
- String sayHello(String name);
-}
diff --git a/java/sca/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/java/sca/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/java/sca/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.binding.jms;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public String sayHello(String name) {
- if ("bang".equals(name)) {
- throw new RuntimeException("blem wit");
- }
- return "jmsHello " + name;
- }
-
-}
diff --git a/java/sca/itest/jms/noreplyto/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/noreplyto/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 58ceeded7e..0000000000 --- a/java/sca/itest/jms/noreplyto/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:SimpleServiceComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/noreplyto/src/main/resources/jndi.properties b/java/sca/itest/jms/noreplyto/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/noreplyto/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/noreplyto/src/main/resources/service.composite b/java/sca/itest/jms/noreplyto/src/main/resources/service.composite deleted file mode 100644 index 86bb60c147..0000000000 --- a/java/sca/itest/jms/noreplyto/src/main/resources/service.composite +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- name="SimpleServiceComposite">
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="RequestQueue"/>
- <response>
- <destination jndiName="ResponseQueue"/>
- </response>
- <tuscany:wireFormat.jmsObject/>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/noreplyto/src/test/java/org/apache/tuscany/sca/binding/jms/NoReplyToTestCase.java b/java/sca/itest/jms/noreplyto/src/test/java/org/apache/tuscany/sca/binding/jms/NoReplyToTestCase.java deleted file mode 100644 index 848e340181..0000000000 --- a/java/sca/itest/jms/noreplyto/src/test/java/org/apache/tuscany/sca/binding/jms/NoReplyToTestCase.java +++ /dev/null @@ -1,100 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.Properties;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Uses a non-Tuscany JMS client to send/receive a JMS request to a Tuscany/SCA JMS service
- */
-public class NoReplyToTestCase {
-
- private Node node;
- private Session session;
- private InitialContext context;
- private Connection connection;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- sendJMSRequest();
- String response = receiveJMSResponse();
- assertEquals("jmsHello Petra", response);
- }
-
- private void sendJMSRequest() throws NamingException, JMSException {
- context = new InitialContext(new Properties());
- ConnectionFactory cf = (ConnectionFactory)context.lookup("ConnectionFactory");
- connection = cf.createConnection();
- connection.start();
-
- session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- Destination toDest = (Destination)context.lookup("RequestQueue");
-
- ObjectMessage m = session.createObjectMessage();
- m.setObject("Petra");
-
- MessageProducer producer = session.createProducer(toDest);
- producer.send(m);
- }
-
- private String receiveJMSResponse() throws NamingException, JMSException {
- Destination replyDest = (Destination)context.lookup("ResponseQueue");
- MessageConsumer consumer = session.createConsumer(replyDest);
- Message m = consumer.receive(5000);
- if (m == null) {
- throw new RuntimeException("No reply message received");
- }
- return ((ObjectMessage)m).getObject().toString();
- }
-
- @After
- public void end() throws JMSException {
- if (node != null) {
- node.stop();
- }
- if (connection != null) {
- connection.close();
- }
- }
-}
diff --git a/java/sca/itest/jms/nulls/pom.xml b/java/sca/itest/jms/nulls/pom.xml deleted file mode 100644 index cdf628fe76..0000000000 --- a/java/sca/itest/jms/nulls/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-nulls</artifactId>
- <name>Apache Tuscany SCA iTest JMS Nulls</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java b/java/sca/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java deleted file mode 100644 index 7fed36fa77..0000000000 --- a/java/sca/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the OneWay service.
- */
-@Service(MyService.class)
-public class ClientImpl implements MyService {
-
- private MyService serviceA;
-
- @Reference
- public void setServiceA(MyService service) {
- this.serviceA = service;
- }
-
- public void sayHello() {
- serviceA.sayHello();
- }
-
-}
diff --git a/java/sca/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java b/java/sca/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java deleted file mode 100644 index 7ab6019fd5..0000000000 --- a/java/sca/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface MyService {
-
- void sayHello();
-
-}
diff --git a/java/sca/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java b/java/sca/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java deleted file mode 100644 index 89758becff..0000000000 --- a/java/sca/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-
-public class ServiceImpl implements MyService {
-
- public void sayHello() {
- }
-
-}
diff --git a/java/sca/itest/jms/nulls/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/nulls/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index eee9c86565..0000000000 --- a/java/sca/itest/jms/nulls/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:Nulls"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/nulls/src/main/resources/jndi.properties b/java/sca/itest/jms/nulls/src/main/resources/jndi.properties deleted file mode 100644 index bb431a592b..0000000000 --- a/java/sca/itest/jms/nulls/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory, ConnectionFactory2
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-topic.ServiceTopic = ServiceTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/nulls/src/main/resources/nulls.composite b/java/sca/itest/jms/nulls/src/main/resources/nulls.composite deleted file mode 100644 index e190cf92c9..0000000000 --- a/java/sca/itest/jms/nulls/src/main/resources/nulls.composite +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://itest"
- name="Nulls">
-
- <component name="Client1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ClientImpl"/>
- <reference name="serviceA">
- <binding.jms uri="jms:MyService" />
- </reference>
- </component>
-
- <component name="Service1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ServiceImpl"/>
- <service name="MyService">
- <binding.jms />
- </service>
- </component>
-
- <component name="Client2">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ClientImpl"/>
- <reference name="serviceA">
- <binding.jms uri="jms:MyService2">
- <tuscany:wireFormat.jmsObject/>
- </binding.jms>
- </reference>
- </component>
-
- <component name="Service2">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ServiceImpl"/>
- <service name="MyService">
- <binding.jms uri="jms:MyService2">
- <tuscany:wireFormat.jmsObject/>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/nulls/src/test/java/org/apache/tuscany/sca/binding/jms/NullsTestCase.java b/java/sca/itest/jms/nulls/src/test/java/org/apache/tuscany/sca/binding/jms/NullsTestCase.java deleted file mode 100644 index ac872f46a6..0000000000 --- a/java/sca/itest/jms/nulls/src/test/java/org/apache/tuscany/sca/binding/jms/NullsTestCase.java +++ /dev/null @@ -1,60 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- */
-public class NullsTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testSayHello() throws Exception {
- MyService client1 = node.getService(MyService.class, "Client1");
-
- client1.sayHello();
-
- }
-
- @Test
- public void testSayHelloObjectFormat() throws Exception {
- MyService client1 = node.getService(MyService.class, "Client2");
-
- client1.sayHello();
-
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/oneway-nocf/pom.xml b/java/sca/itest/jms/oneway-nocf/pom.xml deleted file mode 100644 index 97365205e6..0000000000 --- a/java/sca/itest/jms/oneway-nocf/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-jms-oneway-nocf</artifactId>
- <name>Apache Tuscany SCA iTest JMS for a oneway service</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java b/java/sca/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java deleted file mode 100644 index b572b1012a..0000000000 --- a/java/sca/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the OneWay service.
- */
-@Service(OneWayService.class)
-public class OneWayClientImpl implements OneWayService {
-
- private OneWayService serviceA;
-
- @Reference
- public void setServiceA(OneWayService service) {
- this.serviceA = service;
- }
-
- public void sayHello(String name) {
- serviceA.sayHello(name);
- }
-
-}
diff --git a/java/sca/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/java/sca/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java deleted file mode 100644 index 9cec2d9b3e..0000000000 --- a/java/sca/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java +++ /dev/null @@ -1,29 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface OneWayService {
-
- @OneWay
- void sayHello(String name);
-}
diff --git a/java/sca/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/java/sca/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java deleted file mode 100644 index 0036391696..0000000000 --- a/java/sca/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.binding.jms;
-
-public class OneWayServiceImpl implements OneWayService {
-
- public static Object mutex = new Object();
- public static String name;
-
- public void sayHello(String name) {
- OneWayServiceImpl.name = name;
- synchronized (OneWayServiceImpl.mutex) {
- OneWayServiceImpl.mutex.notify();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/oneway-nocf/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/oneway-nocf/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 360b365d1b..0000000000 --- a/java/sca/itest/jms/oneway-nocf/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:OneWayServiceComposite"/>
- <deployable composite="itest:OneWayClientComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/oneway-nocf/src/main/resources/jndi.properties b/java/sca/itest/jms/oneway-nocf/src/main/resources/jndi.properties deleted file mode 100644 index 8934614a8a..0000000000 --- a/java/sca/itest/jms/oneway-nocf/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = SomeConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.SomeQueue = RequestQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayClient.composite b/java/sca/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayClient.composite deleted file mode 100644 index 70a106bf06..0000000000 --- a/java/sca/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayClient.composite +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="OneWayClientComposite">
-
- <component name="OneWayClient">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayClientImpl"/>
- <reference name="serviceA">
- <interface.java interface="org.apache.tuscany.sca.binding.jms.OneWayService" />
- <binding.jms>
- <destination jndiName="SomeQueue"/>
- <connectionFactory jndiName="SomeConnectionFactory"/>
- </binding.jms>
- </reference>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayService.composite b/java/sca/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayService.composite deleted file mode 100644 index 5412a1d6e0..0000000000 --- a/java/sca/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayService.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="OneWayServiceComposite">
-
- <component name="OneWayService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayServiceImpl"/>
- <service name="OneWayService">
- <binding.jms>
- <destination jndiName="SomeQueue"/>
- <connectionFactory jndiName="SomeConnectionFactory"/>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/oneway-nocf/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java b/java/sca/itest/jms/oneway-nocf/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java deleted file mode 100644 index 5d1f764382..0000000000 --- a/java/sca/itest/jms/oneway-nocf/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java +++ /dev/null @@ -1,59 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class OneWayTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testOneWayInvoked() throws Exception {
- OneWayService oneWayService = node.getService(OneWayService.class, "OneWayClient");
- oneWayService.sayHello("Petra");
- synchronized (OneWayServiceImpl.mutex) {
- // wait up to 10 seconds but it will likely be a lot less
- // as the service invocation will wake this up earlier
- OneWayServiceImpl.mutex.wait(10000);
- }
- assertEquals("Petra", OneWayServiceImpl.name);
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/oneway/pom.xml b/java/sca/itest/jms/oneway/pom.xml deleted file mode 100644 index f201e5e0d3..0000000000 --- a/java/sca/itest/jms/oneway/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-oneway</artifactId>
- <name>Apache Tuscany SCA iTest JMS with Oneway</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java b/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java deleted file mode 100644 index b572b1012a..0000000000 --- a/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the OneWay service.
- */
-@Service(OneWayService.class)
-public class OneWayClientImpl implements OneWayService {
-
- private OneWayService serviceA;
-
- @Reference
- public void setServiceA(OneWayService service) {
- this.serviceA = service;
- }
-
- public void sayHello(String name) {
- serviceA.sayHello(name);
- }
-
-}
diff --git a/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java b/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java deleted file mode 100644 index 9083ba1d9c..0000000000 --- a/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java +++ /dev/null @@ -1,29 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface OneWayObjectService {
-
- @OneWay
- void sayHello(Object name);
-}
diff --git a/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java b/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java deleted file mode 100644 index 3149f99a25..0000000000 --- a/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.binding.jms;
-
-public class OneWayObjectServiceImpl implements OneWayObjectService {
-
- public static Object mutex = new Object();
- public static Object name;
-
- public void sayHello(Object name) {
- OneWayObjectServiceImpl.name = name;
- synchronized (OneWayObjectServiceImpl.mutex) {
- OneWayObjectServiceImpl.mutex.notify();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java deleted file mode 100644 index 9cec2d9b3e..0000000000 --- a/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java +++ /dev/null @@ -1,29 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface OneWayService {
-
- @OneWay
- void sayHello(String name);
-}
diff --git a/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java deleted file mode 100644 index 0036391696..0000000000 --- a/java/sca/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.binding.jms;
-
-public class OneWayServiceImpl implements OneWayService {
-
- public static Object mutex = new Object();
- public static String name;
-
- public void sayHello(String name) {
- OneWayServiceImpl.name = name;
- synchronized (OneWayServiceImpl.mutex) {
- OneWayServiceImpl.mutex.notify();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/oneway/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/oneway/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 360b365d1b..0000000000 --- a/java/sca/itest/jms/oneway/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:OneWayServiceComposite"/>
- <deployable composite="itest:OneWayClientComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/oneway/src/main/resources/jndi.properties b/java/sca/itest/jms/oneway/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/oneway/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/oneway/src/main/resources/oneway/OneWayClient.composite b/java/sca/itest/jms/oneway/src/main/resources/oneway/OneWayClient.composite deleted file mode 100644 index eeeb3b90d0..0000000000 --- a/java/sca/itest/jms/oneway/src/main/resources/oneway/OneWayClient.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="OneWayClientComposite">
-
- <component name="OneWayClient">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayClientImpl"/>
- <reference name="serviceA">
- <binding.jms>
- <destination jndiName="DestQueueA"/>
- </binding.jms>
- </reference>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/oneway/src/main/resources/oneway/OneWayService.composite b/java/sca/itest/jms/oneway/src/main/resources/oneway/OneWayService.composite deleted file mode 100644 index e41e226994..0000000000 --- a/java/sca/itest/jms/oneway/src/main/resources/oneway/OneWayService.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="OneWayServiceComposite">
-
- <component name="OneWayService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayServiceImpl"/>
- <service name="OneWayService">
- <binding.jms>
- <destination jndiName="DestQueueA" create="always"/>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/oneway/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java b/java/sca/itest/jms/oneway/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java deleted file mode 100644 index 14bbf238e1..0000000000 --- a/java/sca/itest/jms/oneway/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java +++ /dev/null @@ -1,60 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class OneWayTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testOneWayInvoked() throws Exception {
- OneWayService oneWayService = node.getService(OneWayService.class, "OneWayClient");
- oneWayService.sayHello("Petra");
- synchronized (OneWayServiceImpl.mutex) {
- // wait up to 10 seconds but it will likely be a lot less
- // as the service invocation will wake this up earlier
- OneWayServiceImpl.mutex.wait(10000);
- }
- assertEquals("Petra", OneWayServiceImpl.name);
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/policy-headers/pom.xml b/java/sca/itest/jms/policy-headers/pom.xml deleted file mode 100644 index 42596b8d0e..0000000000 --- a/java/sca/itest/jms/policy-headers/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-policy-headers</artifactId>
- <name>Apache Tuscany SCA iTest JMS with Policy Headers</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java b/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java deleted file mode 100644 index d4cd5df431..0000000000 --- a/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-
-/**
- * The client interface
- */
-public interface JMSClient {
-
- void aClientMethod();
-}
diff --git a/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java b/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java deleted file mode 100644 index 464072b42d..0000000000 --- a/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java +++ /dev/null @@ -1,29 +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 org.apache.tuscany.sca.binding.jms;
-
-
-/**
- * The client interface
- */
-public interface MsgClient {
-
- void aClientMethod();
- void op2();
-}
diff --git a/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java b/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java deleted file mode 100644 index 4140fa0b89..0000000000 --- a/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-@Service(MsgClient.class)
-public class MsgClientImpl implements MsgClient {
-
- @Reference protected MsgClientService myService;
-
- public void aClientMethod() {
- myService.aClientMethod();
- }
-
- public void op2() {
- myService.op2();
- }
-
-}
diff --git a/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java b/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java deleted file mode 100644 index 2be4f2ad3e..0000000000 --- a/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-
-/**
- * The client interface
- */
-@Remotable
-public interface MsgClientService {
-
- void aClientMethod();
-
- void op2();
-}
diff --git a/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java b/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java deleted file mode 100644 index d5684ca56c..0000000000 --- a/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.AllowsPassByReference;
-import org.oasisopen.sca.annotation.Remotable;
-
-
-@Remotable
-@AllowsPassByReference
-public interface MsgService {
-
- void onMessage(javax.jms.Message msg);
-
-}
diff --git a/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java b/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java deleted file mode 100644 index e18de0456c..0000000000 --- a/java/sca/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java +++ /dev/null @@ -1,39 +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 org.apache.tuscany.sca.binding.jms;
-
-import javax.jms.Message;
-
-import org.oasisopen.sca.annotation.Service;
-
-@Service(MsgService.class)
-public class MsgServiceImpl implements MsgService {
-
- public static Object lock = new Object();
- public static Message msg;
-
- public void onMessage(Message msg) {
- MsgServiceImpl.msg = msg;
- synchronized(lock) {
- lock.notifyAll();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/policy-headers/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/policy-headers/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index a930b9e9a7..0000000000 --- a/java/sca/itest/jms/policy-headers/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:PropertiesClientComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/policy-headers/src/main/resources/jndi.properties b/java/sca/itest/jms/policy-headers/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/policy-headers/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/policy-headers/src/main/resources/policyHeaders/definitions.xml b/java/sca/itest/jms/policy-headers/src/main/resources/policyHeaders/definitions.xml deleted file mode 100644 index 8c608adec9..0000000000 --- a/java/sca/itest/jms/policy-headers/src/main/resources/policyHeaders/definitions.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0">
-
- <policySet name="JMSPolicySet1"
- provides="priority"
- appliesTo="sca:binding.jms">
- <intentMap provides="priority" default="medium">
- <qualifier name="high">
- <tuscany:jmsHeader JMSPriority="9"/>
- </qualifier>
- <qualifier name="medium">
- <tuscany:jmsHeader JMSPriority="4"/>
- </qualifier>
- <qualifier name="low">
- <tuscany:jmsHeader JMSPriority="0"/>
- </qualifier>
- </intentMap>
- </policySet>
-
- <policySet name="JMSPolicySet2"
- provides="deliveryMode"
- appliesTo="sca:binding.jms">
- <intentMap provides="deliveryMode" default="nonPersistent">
- <qualifier name="persistent">
- <tuscany:jmsHeader JMSDeliveryMode="PERSISTENT"/>
- </qualifier>
- <qualifier name="nonPersistent">
- <tuscany:jmsHeader JMSDeliveryMode="NON_PERSISTENT"/>
- </qualifier>
- </intentMap>
- </policySet>
-
-</definitions>
\ No newline at end of file diff --git a/java/sca/itest/jms/policy-headers/src/main/resources/policyHeaders/policyHeaders.composite b/java/sca/itest/jms/policy-headers/src/main/resources/policyHeaders/policyHeaders.composite deleted file mode 100644 index f2761f0b78..0000000000 --- a/java/sca/itest/jms/policy-headers/src/main/resources/policyHeaders/policyHeaders.composite +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="PropertiesClientComposite">
-
- <component name="ClientComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.MsgClientImpl" />
- <reference name="myService" requires="priority.medium">
- <binding.jms uri="jms:ServiceQueue">
- <headers type="myType"
- deliveryMode="persistent"
- timeToLive="4321"
- priority="7">
- <property name="headP1">myHeadP1</property>
- </headers>
- </binding.jms>
- </reference>
- </component>
-
- <component name="ServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.MsgServiceImpl" />
- <service name="MsgService">
- <binding.jms uri="jms:ServiceQueue"/>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/policy-headers/src/test/java/org/apache/tuscany/sca/binding/jms/PolicyHeadersTestCase.java b/java/sca/itest/jms/policy-headers/src/test/java/org/apache/tuscany/sca/binding/jms/PolicyHeadersTestCase.java deleted file mode 100644 index ebffbc4bc4..0000000000 --- a/java/sca/itest/jms/policy-headers/src/test/java/org/apache/tuscany/sca/binding/jms/PolicyHeadersTestCase.java +++ /dev/null @@ -1,94 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import javax.jms.DeliveryMode;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- */
-public class PolicyHeadersTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testProps1() throws Exception {
- JMSClient client = node.getService(JMSClient.class, "ClientComponent");
-
- client.aClientMethod();
-
- // wait for up to 5 seconds but should wake up as soon as done
- synchronized(MsgServiceImpl.lock) {
- if (MsgServiceImpl.msg == null) {
- MsgServiceImpl.lock.wait(5000); // For debugging set higher.
- }
- }
- assertNotNull(MsgServiceImpl.msg);
-
- assertEquals("myType", MsgServiceImpl.msg.getJMSType());
- assertEquals(DeliveryMode.PERSISTENT, MsgServiceImpl.msg.getJMSDeliveryMode());
- assertEquals(7, MsgServiceImpl.msg.getJMSPriority());
- assertEquals("myHeadP1", MsgServiceImpl.msg.getStringProperty("headP1"));
- }
-
- @Test
- @Ignore
- public void testOp2() throws Exception {
- MsgClient client = node.getService(MsgClient.class, "ClientComponent");
-
- client.op2();
-
- // wait for up to 5 seconds but should wake up as soon as done
- synchronized(MsgServiceImpl.lock) {
- if (MsgServiceImpl.msg == null) {
- MsgServiceImpl.lock.wait(5000);
- }
- }
- assertNotNull(MsgServiceImpl.msg);
-
- assertEquals("op2Type", MsgServiceImpl.msg.getJMSType());
- assertEquals(DeliveryMode.NON_PERSISTENT, MsgServiceImpl.msg.getJMSDeliveryMode());
- assertEquals(3, MsgServiceImpl.msg.getJMSPriority());
- assertEquals("myHeadP1", MsgServiceImpl.msg.getStringProperty("headP1"));
- assertEquals("foo", MsgServiceImpl.msg.getStringProperty("op2P2"));
- assertEquals("nativeOp2", MsgServiceImpl.msg.getStringProperty("scaOperationName"));
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/pom.xml b/java/sca/itest/jms/pom.xml deleted file mode 100644 index ad92cd5eec..0000000000 --- a/java/sca/itest/jms/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <packaging>pom</packaging>
- <artifactId>itest-jms</artifactId>
- <name>Apache Tuscany SCA iTest JMS</name>
-
- <modules>
- <module>args</module>
- <module>defaults</module>
- <module>DynamicReplyQ</module>
- <module>exceptions</module>
- <module>exceptions1</module>
- <module>externalBroker</module>
- <module>format-jmsbytes</module>
- <module>format-jmsbytesxml</module>
- <module>format-jmsdefault</module>
- <module>format-jmsmessage</module>
- <module>format-jmsobject</module>
- <module>format-jmstext</module>
- <module>format-jmstextxml</module>
- <module>format-jmstextxmlinjmsobjectout</module>
- <module>non-sca-client</module>
- <module>noreplyto</module>
- <module>nulls</module>
- <module>oneway</module>
- <module>oneway-nocf</module>
- <module>policy-headers</module>
- <module>properties</module>
- <module>responsecf</module>
- <module>rpc</module>
- <module>selectors</module>
- <module>topics</module>
- <module>ttl</module>
- <module>uri-rpc</module>
-
-<!-- still to bring up in 2.x
- <module>callbacks</module>
- <module>definitions</module>
--->
-
- </modules>
-
-</project>
diff --git a/java/sca/itest/jms/properties/pom.xml b/java/sca/itest/jms/properties/pom.xml deleted file mode 100644 index 72d1041f44..0000000000 --- a/java/sca/itest/jms/properties/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-properties</artifactId>
- <name>Apache Tuscany SCA iTest JMS with Properties</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java b/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java deleted file mode 100644 index d4cd5df431..0000000000 --- a/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.binding.jms;
-
-
-/**
- * The client interface
- */
-public interface JMSClient {
-
- void aClientMethod();
-}
diff --git a/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java b/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java deleted file mode 100644 index 464072b42d..0000000000 --- a/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java +++ /dev/null @@ -1,29 +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 org.apache.tuscany.sca.binding.jms;
-
-
-/**
- * The client interface
- */
-public interface MsgClient {
-
- void aClientMethod();
- void op2();
-}
diff --git a/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java b/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java deleted file mode 100644 index 4140fa0b89..0000000000 --- a/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-@Service(MsgClient.class)
-public class MsgClientImpl implements MsgClient {
-
- @Reference protected MsgClientService myService;
-
- public void aClientMethod() {
- myService.aClientMethod();
- }
-
- public void op2() {
- myService.op2();
- }
-
-}
diff --git a/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java b/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java deleted file mode 100644 index 2be4f2ad3e..0000000000 --- a/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-
-/**
- * The client interface
- */
-@Remotable
-public interface MsgClientService {
-
- void aClientMethod();
-
- void op2();
-}
diff --git a/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java b/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java deleted file mode 100644 index d5684ca56c..0000000000 --- a/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.AllowsPassByReference;
-import org.oasisopen.sca.annotation.Remotable;
-
-
-@Remotable
-@AllowsPassByReference
-public interface MsgService {
-
- void onMessage(javax.jms.Message msg);
-
-}
diff --git a/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java b/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java deleted file mode 100644 index e18de0456c..0000000000 --- a/java/sca/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java +++ /dev/null @@ -1,39 +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 org.apache.tuscany.sca.binding.jms;
-
-import javax.jms.Message;
-
-import org.oasisopen.sca.annotation.Service;
-
-@Service(MsgService.class)
-public class MsgServiceImpl implements MsgService {
-
- public static Object lock = new Object();
- public static Message msg;
-
- public void onMessage(Message msg) {
- MsgServiceImpl.msg = msg;
- synchronized(lock) {
- lock.notifyAll();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/properties/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/properties/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index a930b9e9a7..0000000000 --- a/java/sca/itest/jms/properties/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:PropertiesClientComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/properties/src/main/resources/jndi.properties b/java/sca/itest/jms/properties/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/properties/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/properties/src/main/resources/properties/properties.composite b/java/sca/itest/jms/properties/src/main/resources/properties/properties.composite deleted file mode 100644 index 73f2a8eadc..0000000000 --- a/java/sca/itest/jms/properties/src/main/resources/properties/properties.composite +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="PropertiesClientComposite">
-
- <component name="ClientComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.MsgClientImpl" />
- <reference name="myService">
- <binding.jms uri="jms:ServiceQueue">
- <headers type="myType"
- deliveryMode="persistent"
- timeToLive="4321"
- priority="7">
- <property name="headP1">myHeadP1</property>
- </headers>
- <operationProperties name="op2" nativeOperation="nativeOp2">
- <headers type="op2Type"
- deliveryMode="nonpersistent"
- timeToLive="6"
- priority="8">
- <property name="op2P2">foo</property>
- </headers>
- </operationProperties>
- </binding.jms>
- </reference>
- </component>
-
- <component name="ServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.MsgServiceImpl" />
- <service name="MsgService">
- <binding.jms uri="jms:ServiceQueue"/>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/properties/src/test/java/org/apache/tuscany/sca/binding/jms/PropertiesTestCase.java b/java/sca/itest/jms/properties/src/test/java/org/apache/tuscany/sca/binding/jms/PropertiesTestCase.java deleted file mode 100644 index e8d748bb19..0000000000 --- a/java/sca/itest/jms/properties/src/test/java/org/apache/tuscany/sca/binding/jms/PropertiesTestCase.java +++ /dev/null @@ -1,93 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-
-import javax.jms.DeliveryMode;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- */
-public class PropertiesTestCase {
-
- private static Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testProps1() throws Exception {
- JMSClient client = node.getService(JMSClient.class, "ClientComponent");
-
- client.aClientMethod();
-
- // wait for up to 5 seconds but should wake up as soon as done
- synchronized(MsgServiceImpl.lock) {
- if (MsgServiceImpl.msg == null) {
- MsgServiceImpl.lock.wait(5000);
- }
- }
- assertNotNull(MsgServiceImpl.msg);
-
- assertEquals("myType", MsgServiceImpl.msg.getJMSType());
- assertEquals(DeliveryMode.PERSISTENT, MsgServiceImpl.msg.getJMSDeliveryMode());
- // assertEquals(3, MsgServiceImpl.msg.getJMSPriority()); // Doesn't seem to work with ActiveMQ
- assertEquals("myHeadP1", MsgServiceImpl.msg.getStringProperty("headP1"));
- }
-
- @Test
- public void testOp2() throws Exception {
- MsgClient client = node.getService(MsgClient.class, "ClientComponent");
-
- client.op2();
-
- // wait for up to 5 seconds but should wake up as soon as done
- synchronized(MsgServiceImpl.lock) {
- if (MsgServiceImpl.msg == null) {
- MsgServiceImpl.lock.wait(15000);
- }
- }
- assertNotNull(MsgServiceImpl.msg);
-
- assertEquals("op2Type", MsgServiceImpl.msg.getJMSType());
- // assertEquals(DeliveryMode.NON_PERSISTENT, MsgServiceImpl.msg.getJMSDeliveryMode()); // Doesn't seem to work with ActiveMQ
- // assertEquals(3, MsgServiceImpl.msg.getJMSPriority()); // Doesn't seem to work with ActiveMQ
- assertEquals("myHeadP1", MsgServiceImpl.msg.getStringProperty("headP1"));
- assertEquals("foo", MsgServiceImpl.msg.getStringProperty("op2P2"));
- //operation properties are a service side thing
- //assertEquals("nativeOp2", MsgServiceImpl.msg.getStringProperty("scaOperationName"));
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/responsecf/pom.xml b/java/sca/itest/jms/responsecf/pom.xml deleted file mode 100644 index fb7edf2918..0000000000 --- a/java/sca/itest/jms/responsecf/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-responsecf</artifactId>
- <name>Apache Tuscany SCA iTest JMS Response ConnectionFactory</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/java/sca/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java deleted file mode 100644 index 9aef6ba1a3..0000000000 --- a/java/sca/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldClientImpl implements HelloWorldService {
-
- private HelloWorldService serviceA;
-
- @Reference
- public void setServiceA(HelloWorldService service) {
- this.serviceA = service;
- }
-
- public String sayHello(String name) {
- return serviceA.sayHello(name);
- }
-
-}
diff --git a/java/sca/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/java/sca/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/java/sca/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface HelloWorldService {
- String sayHello(String name);
-}
diff --git a/java/sca/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/java/sca/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/java/sca/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.binding.jms;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public String sayHello(String name) {
- if ("bang".equals(name)) {
- throw new RuntimeException("blem wit");
- }
- return "jmsHello " + name;
- }
-
-}
diff --git a/java/sca/itest/jms/responsecf/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/responsecf/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c062ef9ec0..0000000000 --- a/java/sca/itest/jms/responsecf/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:SimpleServiceComposite"/>
- <deployable composite="itest:SimpleClientComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/responsecf/src/main/resources/cf/client.composite b/java/sca/itest/jms/responsecf/src/main/resources/cf/client.composite deleted file mode 100644 index 3a03f9b675..0000000000 --- a/java/sca/itest/jms/responsecf/src/main/resources/cf/client.composite +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="SimpleClientComposite">
-
- <component name="HelloWorldClient">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
- <reference name="serviceA">
- <binding.jms>
- <destination jndiName="DestQueueA"/>
- <response>
- <destination jndiName="RespQueueA"/>
- </response>
- </binding.jms>
- </reference>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/responsecf/src/main/resources/cf/service.composite b/java/sca/itest/jms/responsecf/src/main/resources/cf/service.composite deleted file mode 100644 index d7ba8f2838..0000000000 --- a/java/sca/itest/jms/responsecf/src/main/resources/cf/service.composite +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="SimpleServiceComposite">
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="DestQueueA"/>
- <response>
- <connectionFactory jndiName="ResponseCF"/>
- </response>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/responsecf/src/main/resources/jndi.properties b/java/sca/itest/jms/responsecf/src/main/resources/jndi.properties deleted file mode 100644 index a41e42950e..0000000000 --- a/java/sca/itest/jms/responsecf/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory, ResponseCF
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.DestQueueA = RequestQueue
-queue.RespQueueA = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/responsecf/src/test/java/org/apache/tuscany/sca/binding/jms/ResponseCFTestCase.java b/java/sca/itest/jms/responsecf/src/test/java/org/apache/tuscany/sca/binding/jms/ResponseCFTestCase.java deleted file mode 100644 index 03b834ce7d..0000000000 --- a/java/sca/itest/jms/responsecf/src/test/java/org/apache/tuscany/sca/binding/jms/ResponseCFTestCase.java +++ /dev/null @@ -1,53 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This shows how to test the JMS binding using a response ConnectionFactory
- */
-public class ResponseCFTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient");
- assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra"));
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/rpc/pom.xml b/java/sca/itest/jms/rpc/pom.xml deleted file mode 100644 index b436479c3c..0000000000 --- a/java/sca/itest/jms/rpc/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-rpc</artifactId>
- <name>Apache Tuscany SCA iTest JMS with RPC</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/java/sca/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java deleted file mode 100644 index 9aef6ba1a3..0000000000 --- a/java/sca/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldClientImpl implements HelloWorldService {
-
- private HelloWorldService serviceA;
-
- @Reference
- public void setServiceA(HelloWorldService service) {
- this.serviceA = service;
- }
-
- public String sayHello(String name) {
- return serviceA.sayHello(name);
- }
-
-}
diff --git a/java/sca/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/java/sca/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/java/sca/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface HelloWorldService {
- String sayHello(String name);
-}
diff --git a/java/sca/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/java/sca/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/java/sca/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.binding.jms;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public String sayHello(String name) {
- if ("bang".equals(name)) {
- throw new RuntimeException("blem wit");
- }
- return "jmsHello " + name;
- }
-
-}
diff --git a/java/sca/itest/jms/rpc/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/rpc/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c062ef9ec0..0000000000 --- a/java/sca/itest/jms/rpc/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:SimpleServiceComposite"/>
- <deployable composite="itest:SimpleClientComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/rpc/src/main/resources/jndi.properties b/java/sca/itest/jms/rpc/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/rpc/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/rpc/src/main/resources/simple/client.composite b/java/sca/itest/jms/rpc/src/main/resources/simple/client.composite deleted file mode 100644 index bed860e2cd..0000000000 --- a/java/sca/itest/jms/rpc/src/main/resources/simple/client.composite +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="SimpleClientComposite">
-
- <component name="HelloWorldClient">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
- <reference name="serviceA">
- <binding.jms>
- <destination jndiName="DestQueueA">
- </destination>
- <response>
- <destination jndiName="RespQueueA"/>
- </response>
- </binding.jms>
- </reference>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/rpc/src/main/resources/simple/service.composite b/java/sca/itest/jms/rpc/src/main/resources/simple/service.composite deleted file mode 100644 index 01553a968c..0000000000 --- a/java/sca/itest/jms/rpc/src/main/resources/simple/service.composite +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="SimpleServiceComposite">
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="DestQueueA" create="always">
- </destination>
- <response>
- <destination jndiName="RespQueueA" create="always"/>
- </response>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/rpc/src/test/java/org/apache/tuscany/sca/binding/jms/RPCTestCase.java b/java/sca/itest/jms/rpc/src/test/java/org/apache/tuscany/sca/binding/jms/RPCTestCase.java deleted file mode 100644 index 3c0eb0791b..0000000000 --- a/java/sca/itest/jms/rpc/src/test/java/org/apache/tuscany/sca/binding/jms/RPCTestCase.java +++ /dev/null @@ -1,53 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class RPCTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient");
- assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra"));
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/selectors/pom.xml b/java/sca/itest/jms/selectors/pom.xml deleted file mode 100644 index c3dd5edee8..0000000000 --- a/java/sca/itest/jms/selectors/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-selectors</artifactId>
- <name>Apache Tuscany SCA iTest JMS Tests For Selectors</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java deleted file mode 100644 index b589d5e8bc..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the OneWay service.
- */
-@Service(SelectorService.class)
-public class ClientImpl implements SelectorService {
-
- private SelectorService serviceA;
-
- @Reference
- public void setServiceA(SelectorService service) {
- this.serviceA = service;
- }
-
- public void sayHello(String name) {
- serviceA.sayHello(name);
- }
-
-}
diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorService.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorService.java deleted file mode 100644 index 1aff0d454e..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorService.java +++ /dev/null @@ -1,29 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface SelectorService {
-
- @OneWay
- void sayHello(String name);
-}
diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl1.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl1.java deleted file mode 100644 index fb53c877e6..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl1.java +++ /dev/null @@ -1,40 +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 org.apache.tuscany.sca.binding.jms;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class SelectorServiceImpl1 implements SelectorService {
-
- public static Object lock = new Object();
- public static List<String> names = new ArrayList<String>();
-
- public void sayHello(String name) {
- System.out.println("SelectorServiceImpl1 " + name);
- SelectorServiceImpl1.names.add(name);
- if (names.size() == 2) {
- synchronized (SelectorServiceImpl1.lock) {
- SelectorServiceImpl1.lock.notify();
- }
- }
- }
-
-}
diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl2.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl2.java deleted file mode 100644 index 1bbaf5d6f4..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl2.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.binding.jms;
-
-public class SelectorServiceImpl2 implements SelectorService {
-
- public static Object lock = new Object();
- public static String name;
-
- public void sayHello(String name) {
- if (SelectorServiceImpl2.name != null) {
- throw new IllegalStateException("name already set");
- }
- System.out.println("SelectorServiceImpl2 " + name);
- SelectorServiceImpl2.name = name;
- synchronized (SelectorServiceImpl2.lock) {
- SelectorServiceImpl2.lock.notify();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl3.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl3.java deleted file mode 100644 index 4bdc4edcb5..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl3.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.binding.jms;
-
-public class SelectorServiceImpl3 implements SelectorService {
-
- public static Object lock = new Object();
- public static String name;
-
- public void sayHello(String name) {
- if (SelectorServiceImpl3.name != null) {
- throw new IllegalStateException("name already set");
- }
- System.out.println("SelectorServiceImpl3 " + name);
- SelectorServiceImpl3.name = name;
- synchronized (SelectorServiceImpl3.lock) {
- SelectorServiceImpl3.lock.notify();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReference.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReference.java deleted file mode 100644 index 0592194b21..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String name); - -} - diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReferenceImpl.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReferenceImpl.java deleted file mode 100644 index 2d4ff0192b..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,39 +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 org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldService1; - - @Reference - protected HelloWorldService helloWorldService2; - - public String getGreetings(String name){ - return helloWorldService1.getGreetingsOne(name) + " " + - helloWorldService1.getGreetingsTwo(name) + " " + - helloWorldService2.getGreetingsOne(name) + " " + - helloWorldService1.getGreetingsThree(name); - } -} - diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldService.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldService.java deleted file mode 100644 index b632b3f60f..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldService.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetingsOne(String name); - - public String getGreetingsTwo(String name); - - public String getGreetingsThree(String name); - - public String getGreetingsFour(String name); - -} - diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldServiceImpl.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldServiceImpl.java deleted file mode 100644 index b2df9137c8..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldServiceImpl.java +++ /dev/null @@ -1,47 +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 org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String getGreetingsOne(String name){ - String response = "Hello One " + name; - System.out.println("getGreetingsOne: " + response); - return response; - } - - public String getGreetingsTwo(String name){ - String response = "Hello Two " + name; - System.out.println("getGreetingsTwo: " + response); - return response; - } - - public String getGreetingsThree(String name){ - String response = "Hello Three " + name; - System.out.println("getGreetingsThree: " + response); - return response; - } - - public String getGreetingsFour(String name){ - String response = "Hello Four " + name; - System.out.println("getGreetingsFour: " + response); - return response; - } -} - diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReference.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReference.java deleted file mode 100644 index 0b24678543..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReference.java +++ /dev/null @@ -1,32 +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 org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String name); - -} - diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReferenceImpl.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReferenceImpl.java deleted file mode 100644 index 0ce66005fc..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,36 +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 org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldService1; - - - public String getGreetings(String name){ - return helloWorldService1.getGreetingsOne(name) + " " + - helloWorldService1.getGreetingsTwo(name) + " " + - helloWorldService1.getGreetingsThree(name); - } -} - diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldService.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldService.java deleted file mode 100644 index 7e42113da4..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldService.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetingsOne(String name); - - public String getGreetingsTwo(String name); - - public String getGreetingsThree(String name); - - public String getGreetingsFour(String name); - -} - diff --git a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldServiceImpl.java b/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldServiceImpl.java deleted file mode 100644 index 724de6ff7c..0000000000 --- a/java/sca/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldServiceImpl.java +++ /dev/null @@ -1,47 +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 org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String getGreetingsOne(String name){ - String response = "Hello One " + name; - System.out.println("getGreetingsOne: " + response); - return response; - } - - public String getGreetingsTwo(String name){ - String response = "Hello Two " + name; - System.out.println("getGreetingsTwo: " + response); - return response; - } - - public String getGreetingsThree(String name){ - String response = "Hello Three " + name; - System.out.println("getGreetingsThree: " + response); - return response; - } - - public String getGreetingsFour(String name){ - String response = "Hello Four " + name; - System.out.println("getGreetingsFour: " + response); - return response; - } -} - diff --git a/java/sca/itest/jms/selectors/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/selectors/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 59cf4aee9d..0000000000 --- a/java/sca/itest/jms/selectors/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:helloworld"/>
- <deployable composite="itest:helloworldUP"/>
- <deployable composite="itest:Selectors"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/selectors/src/main/resources/jmsdefault/helloworld.composite b/java/sca/itest/jms/selectors/src/main/resources/jmsdefault/helloworld.composite deleted file mode 100644 index ab8e29ccdd..0000000000 --- a/java/sca/itest/jms/selectors/src/main/resources/jmsdefault/helloworld.composite +++ /dev/null @@ -1,69 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://itest" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:hw="http://helloworld" - name="helloworld"> - - <component name="HelloWorldReferenceComponent"> - <implementation.java class="org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.HelloWorldReferenceImpl" /> - <reference name="helloWorldService1" > - <binding.jms> - <destination jndiName="HelloWorldService1"/> - </binding.jms> - </reference> - <reference name="helloWorldService2" > - <binding.jms> - <destination jndiName="HelloWorldService2"/> - <operationProperties name="getGreetingsOne" > - <headers> - <property name="scaOperationName">getGreetingsThree</property> - </headers> - </operationProperties> - </binding.jms> - </reference> - </component> - - <component name="HelloWorldServiceComponent1"> - <implementation.java class="org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.HelloWorldServiceImpl" /> - <service name="HelloWorldService"> - <binding.jms> - <destination jndiName="HelloWorldService1"/> - <operationProperties name="getGreetingsThree" nativeOperation="getGreetingsFour"> - <headers> - <property name="blaNotUsed">getGreetingsThree</property> - </headers> - </operationProperties> - </binding.jms> - </service> - </component> - - <component name="HelloWorldServiceComponent2"> - <implementation.java class="org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.HelloWorldServiceImpl" /> - <service name="HelloWorldService"> - <binding.jms> - <destination jndiName="HelloWorldService2"/> - <tuscany:operationSelector.jmsdefault/> - </binding.jms> - </service> - </component> - -</composite> diff --git a/java/sca/itest/jms/selectors/src/main/resources/jmsuserprop/helloworld.composite b/java/sca/itest/jms/selectors/src/main/resources/jmsuserprop/helloworld.composite deleted file mode 100644 index af36b8af9b..0000000000 --- a/java/sca/itest/jms/selectors/src/main/resources/jmsuserprop/helloworld.composite +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://itest" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:hw="http://helloworld" - name="helloworldUP"> - - <component name="HelloWorldReferenceComponent1"> - <implementation.java class="org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop.HelloWorldReferenceImpl" /> - <reference name="helloWorldService1" > - <binding.jms> - <destination jndiName="HelloWorldService4"/> - <operationProperties name="getGreetingsOne" > - <headers> - <property name="myProperty">getGreetingsOne</property> - </headers> - </operationProperties> - <operationProperties name="getGreetingsTwo" > - <headers> - <property name="myProperty">getGreetingsThree</property> - </headers> - </operationProperties> - <operationProperties name="getGreetingsThree" > - <headers> - <property name="myProperty">getGreetingsTwo</property> - </headers> - </operationProperties> - </binding.jms> - </reference> - </component> - - <component name="HelloWorldServiceComponent3"> - <implementation.java class="org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop.HelloWorldServiceImpl" /> - <service name="HelloWorldService"> - <binding.jms> - <destination jndiName="HelloWorldService4"/> - <operationProperties name="getGreetingsThree" nativeOperation="getGreetingsFour"> - <headers> - <property name="blaNotUsed2">getGreetingsThree</property> - </headers> - </operationProperties> - <tuscany:operationSelector.jmsUserProp propertyName="myProperty"/> - </binding.jms> - </service> - </component> - -</composite> diff --git a/java/sca/itest/jms/selectors/src/main/resources/jndi.properties b/java/sca/itest/jms/selectors/src/main/resources/jndi.properties deleted file mode 100644 index bb431a592b..0000000000 --- a/java/sca/itest/jms/selectors/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory, ConnectionFactory2
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-topic.ServiceTopic = ServiceTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/selectors/src/main/resources/selectors/selectors.composite b/java/sca/itest/jms/selectors/src/main/resources/selectors/selectors.composite deleted file mode 100644 index bf10f20d38..0000000000 --- a/java/sca/itest/jms/selectors/src/main/resources/selectors/selectors.composite +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- xmlns:itest="http://jms"
- name="Selectors">
-
- <component name="Client1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ClientImpl"/>
- <reference name="serviceA">
- <binding.jms uri="jms:ServiceTopic" >
- <headers type="type1" />
- </binding.jms>
- </reference>
- </component>
-
- <component name="Client2">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ClientImpl"/>
- <reference name="serviceA">
- <binding.jms uri="jms:ServiceTopic" >
- <headers type="type2" />
- </binding.jms>
- </reference>
- </component>
-
- <component name="Service1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.SelectorServiceImpl1"/>
- <service name="SelectorService">
- <binding.jms uri="jms:ServiceTopic" />
- </service>
- </component>
-
- <component name="Service2">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.SelectorServiceImpl2"/>
- <service name="SelectorService">
- <binding.jms uri="jms:ServiceTopic" >
- <messageSelection selector="JMSType = 'type1'"/>
- </binding.jms>
- </service>
- </component>
-
- <component name="Service3">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.SelectorServiceImpl3"/>
- <service name="SelectorService">
- <binding.jms uri="jms:ServiceTopic" >
- <messageSelection selector="JMSType = 'type2'"/>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSDefaultTestCase.java b/java/sca/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSDefaultTestCase.java deleted file mode 100644 index bee0c549bd..0000000000 --- a/java/sca/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSDefaultTestCase.java +++ /dev/null @@ -1,57 +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 org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.HelloWorldReference; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class OperationselectorJMSDefaultTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldReference helloWorldReference = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent"); - - assertEquals("Hello One Fred Bloggs Hello Two Fred Bloggs Hello Three Fred Bloggs Hello Four Fred Bloggs", helloWorldReference.getGreetings("Fred Bloggs")); - - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/java/sca/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSUserPropTestCase.java b/java/sca/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSUserPropTestCase.java deleted file mode 100644 index 33e047ae18..0000000000 --- a/java/sca/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSUserPropTestCase.java +++ /dev/null @@ -1,57 +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 org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.HelloWorldReference; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class OperationselectorJMSUserPropTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldReference helloWorldReference = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent1"); - - assertEquals("Hello One Fred Bloggs Hello Four Fred Bloggs Hello Two Fred Bloggs", helloWorldReference.getGreetings("Fred Bloggs")); - - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/java/sca/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/SelectorsTestCase.java b/java/sca/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/SelectorsTestCase.java deleted file mode 100644 index e7254005be..0000000000 --- a/java/sca/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/SelectorsTestCase.java +++ /dev/null @@ -1,76 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- */
-public class SelectorsTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testSayHello() throws Exception {
- SelectorService client1 = node.getService(SelectorService.class, "Client1");
- SelectorService client2 = node.getService(SelectorService.class, "Client2");
-
- client1.sayHello("petra");
- client2.sayHello("beate");
-
- // wait for up to 5 seconds but should wake up as soon as done
- synchronized(SelectorServiceImpl2.lock) {
- if (SelectorServiceImpl2.name == null) {
- SelectorServiceImpl2.lock.wait(5000);
- }
- }
- synchronized(SelectorServiceImpl3.lock) {
- if (SelectorServiceImpl3.name == null) {
- SelectorServiceImpl3.lock.wait(5000);
- }
- }
- synchronized(SelectorServiceImpl1.lock) {
- if (SelectorServiceImpl1.names.size() != 2) {
- SelectorServiceImpl1.lock.wait(5000);
- }
- }
-
- assertEquals("petra", SelectorServiceImpl2.name);
- assertEquals("beate", SelectorServiceImpl3.name);
- assertEquals(2, SelectorServiceImpl1.names.size());
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/topics/pom.xml b/java/sca/itest/jms/topics/pom.xml deleted file mode 100644 index 71a6e0f473..0000000000 --- a/java/sca/itest/jms/topics/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-topics</artifactId>
- <name>Apache Tuscany SCA JMS Tests for topics</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java b/java/sca/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java deleted file mode 100644 index b572b1012a..0000000000 --- a/java/sca/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the OneWay service.
- */
-@Service(OneWayService.class)
-public class OneWayClientImpl implements OneWayService {
-
- private OneWayService serviceA;
-
- @Reference
- public void setServiceA(OneWayService service) {
- this.serviceA = service;
- }
-
- public void sayHello(String name) {
- serviceA.sayHello(name);
- }
-
-}
diff --git a/java/sca/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/java/sca/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java deleted file mode 100644 index 9cec2d9b3e..0000000000 --- a/java/sca/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java +++ /dev/null @@ -1,29 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface OneWayService {
-
- @OneWay
- void sayHello(String name);
-}
diff --git a/java/sca/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/java/sca/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java deleted file mode 100644 index 0036391696..0000000000 --- a/java/sca/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.binding.jms;
-
-public class OneWayServiceImpl implements OneWayService {
-
- public static Object mutex = new Object();
- public static String name;
-
- public void sayHello(String name) {
- OneWayServiceImpl.name = name;
- synchronized (OneWayServiceImpl.mutex) {
- OneWayServiceImpl.mutex.notify();
- }
- }
-
-}
diff --git a/java/sca/itest/jms/topics/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/topics/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 2690297524..0000000000 --- a/java/sca/itest/jms/topics/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:TopicsClientComposite"/>
- <deployable composite="itest:OneWayServiceComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/topics/src/main/resources/jndi.properties b/java/sca/itest/jms/topics/src/main/resources/jndi.properties deleted file mode 100644 index 9888d5843b..0000000000 --- a/java/sca/itest/jms/topics/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/topics/src/main/resources/topics/TopicsClient.composite b/java/sca/itest/jms/topics/src/main/resources/topics/TopicsClient.composite deleted file mode 100644 index b951484044..0000000000 --- a/java/sca/itest/jms/topics/src/main/resources/topics/TopicsClient.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="TopicsClientComposite">
-
- <component name="OneWayClient">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayClientImpl"/>
- <reference name="serviceA">
- <binding.jms>
- <destination jndiName="MyTopic" type="topic" create="never"/>
- </binding.jms>
- </reference>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/topics/src/main/resources/topics/TopicsService.composite b/java/sca/itest/jms/topics/src/main/resources/topics/TopicsService.composite deleted file mode 100644 index 80c653cc29..0000000000 --- a/java/sca/itest/jms/topics/src/main/resources/topics/TopicsService.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="OneWayServiceComposite">
-
- <component name="OneWayService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayServiceImpl"/>
- <service name="OneWayService">
- <binding.jms>
- <destination jndiName="MyTopic" type="topic" create="never"/>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/topics/src/test/java/org/apache/tuscany/sca/binding/jms/TopicsTestCase.java b/java/sca/itest/jms/topics/src/test/java/org/apache/tuscany/sca/binding/jms/TopicsTestCase.java deleted file mode 100644 index 35fe96b81a..0000000000 --- a/java/sca/itest/jms/topics/src/test/java/org/apache/tuscany/sca/binding/jms/TopicsTestCase.java +++ /dev/null @@ -1,59 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class TopicsTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testOneWayInvoked() throws Exception {
- OneWayService oneWayService = node.getService(OneWayService.class, "OneWayClient");
- oneWayService.sayHello("Petra");
- synchronized (OneWayServiceImpl.mutex) {
- // wait up to 10 seconds but it will likely be a lot less
- // as the service invocation will wake this up earlier
- OneWayServiceImpl.mutex.wait(10000);
- }
- assertEquals("Petra", OneWayServiceImpl.name);
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/ttl/pom.xml b/java/sca/itest/jms/ttl/pom.xml deleted file mode 100644 index c7462bc039..0000000000 --- a/java/sca/itest/jms/ttl/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-ttl</artifactId>
- <name>Apache Tuscany SCA iTest JMS Time To Live</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/ttl/src/main/java/itest/MockInitialContextFactory.java b/java/sca/itest/jms/ttl/src/main/java/itest/MockInitialContextFactory.java deleted file mode 100644 index 336fecf67b..0000000000 --- a/java/sca/itest/jms/ttl/src/main/java/itest/MockInitialContextFactory.java +++ /dev/null @@ -1,904 +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 itest;
-
-import java.io.Serializable;
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.ConnectionConsumer;
-import javax.jms.ConnectionFactory;
-import javax.jms.ConnectionMetaData;
-import javax.jms.Destination;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.ServerSessionPool;
-import javax.jms.Session;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-import javax.naming.Binding;
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NameClassPair;
-import javax.naming.NameParser;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-
-/**
- * Some classes that mock up various JMS interfaces with the end result
- * of having the Time-To-Live value set on the static timeToLive
- *
- * This class is referenced from the AMQ jndi.properties file
- */
-public class MockInitialContextFactory extends org.apache.activemq.jndi.ActiveMQInitialContextFactory{
-
- public static Object lock = new Object();
- public static Long timeToLive;
-
- public Context getInitialContext(Hashtable environment) throws NamingException {
- return new Context() {
-
- public Object addToEnvironment(String propName, Object propVal) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void bind(Name name, Object obj) throws NamingException {
- // TODO Auto-generated method stub
-
- }
-
- public void bind(String name, Object obj) throws NamingException {
- // TODO Auto-generated method stub
-
- }
-
- public void close() throws NamingException {
- // TODO Auto-generated method stub
-
- }
-
- public Name composeName(Name name, Name prefix) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String composeName(String name, String prefix) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Context createSubcontext(Name name) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Context createSubcontext(String name) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void destroySubcontext(Name name) throws NamingException {
- // TODO Auto-generated method stub
-
- }
-
- public void destroySubcontext(String name) throws NamingException {
- // TODO Auto-generated method stub
-
- }
-
- public Hashtable<?, ?> getEnvironment() throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getNameInNamespace() throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public NameParser getNameParser(Name name) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public NameParser getNameParser(String name) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public NamingEnumeration<NameClassPair> list(Name name) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public NamingEnumeration<NameClassPair> list(String name) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public NamingEnumeration<Binding> listBindings(Name name) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public NamingEnumeration<Binding> listBindings(String name) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Object lookup(Name name) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Object lookup(String name) throws NamingException {
- if (name.endsWith("ConnectionFactory")) {
- return new ConnectionFactory() {
- public Connection createConnection() throws JMSException {
- return new Connection(){
-
- public void close() throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public ConnectionConsumer createConnectionConsumer(Destination arg0,
- String arg1,
- ServerSessionPool arg2,
- int arg3) throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public ConnectionConsumer createDurableConnectionConsumer(Topic arg0,
- String arg1,
- String arg2,
- ServerSessionPool arg3,
- int arg4) throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Session createSession(boolean arg0, int arg1) throws JMSException {
- // TODO Auto-generated method stub
- return new Session() {
-
- public void close() throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void commit() throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public QueueBrowser createBrowser(Queue arg0) throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public QueueBrowser createBrowser(Queue arg0, String arg1) throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public BytesMessage createBytesMessage() throws JMSException {
- // TODO Auto-generated method stub
- return new BytesMessage() {
-
- public long getBodyLength() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public boolean readBoolean() throws JMSException {
- // TODO Auto-generated method stub
- return false;
- }
-
- public byte readByte() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public int readBytes(byte[] arg0) throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public int readBytes(byte[] arg0, int arg1) throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public char readChar() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public double readDouble() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public float readFloat() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public int readInt() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public long readLong() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public short readShort() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public String readUTF() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public int readUnsignedByte() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public int readUnsignedShort() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public void reset() throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void writeBoolean(boolean arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void writeByte(byte arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void writeBytes(byte[] arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void writeBytes(byte[] arg0, int arg1, int arg2)
- throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void writeChar(char arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void writeDouble(double arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void writeFloat(float arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void writeInt(int arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void writeLong(long arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void writeObject(Object arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void writeShort(short arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void writeUTF(String arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void acknowledge() throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void clearBody() throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void clearProperties() throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public boolean getBooleanProperty(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return false;
- }
-
- public byte getByteProperty(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public double getDoubleProperty(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public float getFloatProperty(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public int getIntProperty(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public String getJMSCorrelationID() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public byte[] getJMSCorrelationIDAsBytes() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public int getJMSDeliveryMode() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public Destination getJMSDestination() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public long getJMSExpiration() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public String getJMSMessageID() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public int getJMSPriority() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public boolean getJMSRedelivered() throws JMSException {
- // TODO Auto-generated method stub
- return false;
- }
-
- public Destination getJMSReplyTo() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public long getJMSTimestamp() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public String getJMSType() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public long getLongProperty(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public Object getObjectProperty(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Enumeration getPropertyNames() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public short getShortProperty(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public String getStringProperty(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean propertyExists(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void setBooleanProperty(String arg0, boolean arg1)
- throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setByteProperty(String arg0, byte arg1) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setDoubleProperty(String arg0, double arg1)
- throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setFloatProperty(String arg0, float arg1)
- throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setIntProperty(String arg0, int arg1) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setJMSCorrelationID(String arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setJMSCorrelationIDAsBytes(byte[] arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setJMSDeliveryMode(int arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setJMSDestination(Destination arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setJMSExpiration(long arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setJMSMessageID(String arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setJMSPriority(int arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setJMSRedelivered(boolean arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setJMSReplyTo(Destination arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setJMSTimestamp(long arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setJMSType(String arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setLongProperty(String arg0, long arg1) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setObjectProperty(String arg0, Object arg1)
- throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setShortProperty(String arg0, short arg1)
- throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setStringProperty(String arg0, String arg1)
- throws JMSException {
- // TODO Auto-generated method stub
-
- }};
- }
-
- public MessageConsumer createConsumer(Destination arg0) throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public MessageConsumer createConsumer(Destination arg0, String arg1)
- throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public MessageConsumer createConsumer(Destination arg0,
- String arg1,
- boolean arg2) throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public TopicSubscriber createDurableSubscriber(Topic arg0, String arg1)
- throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public TopicSubscriber createDurableSubscriber(Topic arg0,
- String arg1,
- String arg2,
- boolean arg3)
- throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public MapMessage createMapMessage() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Message createMessage() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public ObjectMessage createObjectMessage() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public ObjectMessage createObjectMessage(Serializable arg0) throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public MessageProducer createProducer(Destination arg0) throws JMSException {
- return new MessageProducer() {
-
- public void close() throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public int getDeliveryMode() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public Destination getDestination() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean getDisableMessageID() throws JMSException {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean getDisableMessageTimestamp() throws JMSException {
- // TODO Auto-generated method stub
- return false;
- }
-
- public int getPriority() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public long getTimeToLive() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public void send(Message arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void send(Destination arg0, Message arg1) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void send(Message arg0, int arg1, int arg2, long arg3)
- throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void send(Destination arg0,
- Message arg1,
- int arg2,
- int arg3,
- long arg4) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setDeliveryMode(int arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setDisableMessageID(boolean arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setDisableMessageTimestamp(boolean arg0)
- throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setPriority(int arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setTimeToLive(long arg0) throws JMSException {
- MockInitialContextFactory.timeToLive = Long.valueOf(arg0);
- synchronized(MockInitialContextFactory.lock) {
- MockInitialContextFactory.lock.notifyAll();
- }
- }};
- }
-
- public Queue createQueue(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public StreamMessage createStreamMessage() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public TemporaryQueue createTemporaryQueue() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public TemporaryTopic createTemporaryTopic() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public TextMessage createTextMessage() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public TextMessage createTextMessage(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Topic createTopic(String arg0) throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public int getAcknowledgeMode() throws JMSException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public MessageListener getMessageListener() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean getTransacted() throws JMSException {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void recover() throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void rollback() throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void run() {
- // TODO Auto-generated method stub
-
- }
-
- public void setMessageListener(MessageListener arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void unsubscribe(String arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }};
- }
-
- public String getClientID() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public ExceptionListener getExceptionListener() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public ConnectionMetaData getMetaData() throws JMSException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setClientID(String arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void setExceptionListener(ExceptionListener arg0) throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void start() throws JMSException {
- // TODO Auto-generated method stub
-
- }
-
- public void stop() throws JMSException {
- // TODO Auto-generated method stub
-
- }};
- }
- public Connection createConnection(String arg0, String arg1) throws JMSException {
- return null;
- }};
- } else {
- return new Queue(){
- public String getQueueName() throws JMSException {
- return null;
- }};
- }
- }
-
- public Object lookupLink(Name name) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Object lookupLink(String name) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void rebind(Name name, Object obj) throws NamingException {
- // TODO Auto-generated method stub
-
- }
-
- public void rebind(String name, Object obj) throws NamingException {
- // TODO Auto-generated method stub
-
- }
-
- public Object removeFromEnvironment(String propName) throws NamingException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void rename(Name oldName, Name newName) throws NamingException {
- // TODO Auto-generated method stub
-
- }
-
- public void rename(String oldName, String newName) throws NamingException {
- // TODO Auto-generated method stub
-
- }
-
- public void unbind(Name name) throws NamingException {
- // TODO Auto-generated method stub
-
- }
-
- public void unbind(String name) throws NamingException {
- // TODO Auto-generated method stub
-
- }};
- }
-
-}
diff --git a/java/sca/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientIface.java b/java/sca/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientIface.java deleted file mode 100644 index dc6577b7e1..0000000000 --- a/java/sca/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientIface.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface ClientIface {
-
- @OneWay
- void sayHello(String s);
-}
diff --git a/java/sca/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java b/java/sca/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java deleted file mode 100644 index 4f9908f062..0000000000 --- a/java/sca/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java +++ /dev/null @@ -1,39 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-
-/**
- * This class implements the OneWay service.
- */
-public class ClientImpl implements ClientIface {
-
- private ClientIface serviceA;
-
- @Reference
- public void setServiceA(ClientIface service) {
- this.serviceA = service;
- }
-
- public void sayHello(String name) {
- serviceA.sayHello(name);
- }
-
-}
diff --git a/java/sca/itest/jms/ttl/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/ttl/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index eeae8fcc59..0000000000 --- a/java/sca/itest/jms/ttl/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:TTLTests"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/ttl/src/main/resources/jndi.properties b/java/sca/itest/jms/ttl/src/main/resources/jndi.properties deleted file mode 100644 index 040ec282d7..0000000000 --- a/java/sca/itest/jms/ttl/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = itest.MockInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory, ConnectionFactory2
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-topic.ServiceTopic = ServiceTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/ttl/src/main/resources/ttl.composite b/java/sca/itest/jms/ttl/src/main/resources/ttl.composite deleted file mode 100644 index 91b64cf8dc..0000000000 --- a/java/sca/itest/jms/ttl/src/main/resources/ttl.composite +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="TTLTests">
-
- <component name="Client1">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.ClientImpl"/>
- <reference name="serviceA">
- <interface.java interface="org.apache.tuscany.sca.binding.jms.ClientIface" />
- <binding.jms >
- <destination jndiName="dynamic/MyService"/>
- <headers timeToLive="123" />
- </binding.jms>
- </reference>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/ttl/src/test/java/org/apache/tuscany/sca/binding/jms/TTLTestCase.java b/java/sca/itest/jms/ttl/src/test/java/org/apache/tuscany/sca/binding/jms/TTLTestCase.java deleted file mode 100644 index b5839f4c4f..0000000000 --- a/java/sca/itest/jms/ttl/src/test/java/org/apache/tuscany/sca/binding/jms/TTLTestCase.java +++ /dev/null @@ -1,64 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import itest.MockInitialContextFactory;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- */
-public class TTLTestCase {
-
- private Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @Test
- public void testSayHello() throws Exception {
- ClientIface client1 = node.getService(ClientIface.class, "Client1");
-
- client1.sayHello("petra");
-
- synchronized(MockInitialContextFactory.lock) {
- if (MockInitialContextFactory.timeToLive == null) {
- MockInitialContextFactory.lock.wait(10000);
- }
- }
-
- assertNotNull(MockInitialContextFactory.timeToLive);
- assertEquals(123, MockInitialContextFactory.timeToLive.longValue());
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/java/sca/itest/jms/uri-rpc/pom.xml b/java/sca/itest/jms/uri-rpc/pom.xml deleted file mode 100644 index 61c0602f03..0000000000 --- a/java/sca/itest/jms/uri-rpc/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-jms-uri-rpc</artifactId>
- <name>Apache Tuscany SCA iTest JMS with URI RPC</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/java/sca/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/java/sca/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java deleted file mode 100644 index 9aef6ba1a3..0000000000 --- a/java/sca/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java +++ /dev/null @@ -1,41 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldClientImpl implements HelloWorldService {
-
- private HelloWorldService serviceA;
-
- @Reference
- public void setServiceA(HelloWorldService service) {
- this.serviceA = service;
- }
-
- public String sayHello(String name) {
- return serviceA.sayHello(name);
- }
-
-}
diff --git a/java/sca/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/java/sca/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/java/sca/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +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 org.apache.tuscany.sca.binding.jms;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface HelloWorldService {
- String sayHello(String name);
-}
diff --git a/java/sca/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/java/sca/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/java/sca/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.binding.jms;
-
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- public String sayHello(String name) {
- if ("bang".equals(name)) {
- throw new RuntimeException("blem wit");
- }
- return "jmsHello " + name;
- }
-
-}
diff --git a/java/sca/itest/jms/uri-rpc/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/jms/uri-rpc/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 3349754e4a..0000000000 --- a/java/sca/itest/jms/uri-rpc/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:itest="http://itest">
- <deployable composite="itest:SimpleServiceComposite"/>
- <deployable composite="itest:URIClientComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/jms/uri-rpc/src/main/resources/jndi.properties b/java/sca/itest/jms/uri-rpc/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/java/sca/itest/jms/uri-rpc/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/java/sca/itest/jms/uri-rpc/src/main/resources/simple/service.composite b/java/sca/itest/jms/uri-rpc/src/main/resources/simple/service.composite deleted file mode 100644 index 01553a968c..0000000000 --- a/java/sca/itest/jms/uri-rpc/src/main/resources/simple/service.composite +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="SimpleServiceComposite">
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
- <service name="HelloWorldService">
- <binding.jms>
- <destination jndiName="DestQueueA" create="always">
- </destination>
- <response>
- <destination jndiName="RespQueueA" create="always"/>
- </response>
- </binding.jms>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/uri-rpc/src/main/resources/simple/uriclient.composite b/java/sca/itest/jms/uri-rpc/src/main/resources/simple/uriclient.composite deleted file mode 100644 index 9e7b119fad..0000000000 --- a/java/sca/itest/jms/uri-rpc/src/main/resources/simple/uriclient.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- name="URIClientComposite">
-
- <component name="HelloWorldClient">
- <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
- <reference name="serviceA">
- <binding.jms uri="jms:DestQueueA" />
- </reference>
- </component>
-
-</composite>
diff --git a/java/sca/itest/jms/uri-rpc/src/test/java/org/apache/tuscany/sca/binding/jms/URIRPCTestCase.java b/java/sca/itest/jms/uri-rpc/src/test/java/org/apache/tuscany/sca/binding/jms/URIRPCTestCase.java deleted file mode 100644 index 60b0f0a1a3..0000000000 --- a/java/sca/itest/jms/uri-rpc/src/test/java/org/apache/tuscany/sca/binding/jms/URIRPCTestCase.java +++ /dev/null @@ -1,54 +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 org.apache.tuscany.sca.binding.jms;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This shows how to test the JMS binding using a simple HelloWorld application.
- */
-public class URIRPCTestCase {
-
- private static Node node;
-
- @Before
- public void init() {
- node = NodeFactory.newInstance().createNode().start();
- }
-
- @After
- public void end() {
- if (node != null) {
- node.stop();
- }
- }
-
- @Test
- public void testHelloWorldCreate() throws Exception {
- HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient");
- assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra"));
- }
-
-}
diff --git a/java/sca/itest/nodes/helloworld-client/pom.xml b/java/sca/itest/nodes/helloworld-client/pom.xml deleted file mode 100644 index 8367550f5a..0000000000 --- a/java/sca/itest/nodes/helloworld-client/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-nodes-helloworld-client</artifactId> - <name>Apache Tuscany SCA iTest Nodes Helloworld Client</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-nodes-helloworld-iface</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>provided</scope> - </dependency> - </dependencies> -</project> diff --git a/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java b/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java deleted file mode 100644 index bf8a588928..0000000000 --- a/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java +++ /dev/null @@ -1,43 +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 itest.nodes; - -import org.oasisopen.sca.annotation.EagerInit; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; - -@EagerInit -@Scope("COMPOSITE") -public class HelloworldImpl implements Helloworld { - - @Reference - public Helloworld service; - - @Init - public void initialize(){ - System.out.println(">>>>>> " + sayHello("init")); - } - - public String sayHello(String name) { - return "Hi " + service.sayHello(name); - } - -} diff --git a/java/sca/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b4ba94220c..0000000000 --- a/java/sca/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:itest="http://itest"> - <deployable composite="itest:HelloworldClient"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite b/java/sca/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite deleted file mode 100644 index 9d5e9ae59a..0000000000 --- a/java/sca/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://itest" - name="HelloworldClient"> - - <component name="HelloworldClient"> - <implementation.java class="itest.nodes.HelloworldImpl"/> - <reference name="service" target="HelloworldService"/> - </component> - -</composite> diff --git a/java/sca/itest/nodes/helloworld-iface/pom.xml b/java/sca/itest/nodes/helloworld-iface/pom.xml deleted file mode 100644 index 87b6a4fc51..0000000000 --- a/java/sca/itest/nodes/helloworld-iface/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-nodes-helloworld-iface</artifactId> - <name>Apache Tuscany SCA iTest Nodes Helloworld IFaces</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>provided</scope> - </dependency> - </dependencies> -</project> diff --git a/java/sca/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java b/java/sca/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java deleted file mode 100644 index 76f8d4400d..0000000000 --- a/java/sca/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java +++ /dev/null @@ -1,29 +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 itest.nodes; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/java/sca/itest/nodes/helloworld-service/pom.xml b/java/sca/itest/nodes/helloworld-service/pom.xml deleted file mode 100644 index bae0db69bd..0000000000 --- a/java/sca/itest/nodes/helloworld-service/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-nodes-helloworld-service</artifactId> - <name>Apache Tuscany SCA iTest Nodes Helloworld Service</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-nodes-helloworld-iface</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - </dependencies> -</project> diff --git a/java/sca/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java b/java/sca/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java deleted file mode 100644 index 81f7e1747d..0000000000 --- a/java/sca/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java +++ /dev/null @@ -1,28 +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 itest.nodes; - -public class HelloworldImpl implements Helloworld { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/java/sca/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c65718909d..0000000000 --- a/java/sca/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:itest="http://itest"> - <deployable composite="itest:HelloworldService"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite b/java/sca/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite deleted file mode 100644 index 6b2d15b7a6..0000000000 --- a/java/sca/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://itest" - name="HelloworldService"> - - <component name="HelloworldService"> - <implementation.java class="itest.nodes.HelloworldImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/nodes/one-node-test/pom.xml b/java/sca/itest/nodes/one-node-test/pom.xml deleted file mode 100644 index d35761bc88..0000000000 --- a/java/sca/itest/nodes/one-node-test/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-nodes-one-node-test</artifactId> - <name>Apache Tuscany SCA iTest Nodes One Node Test</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-nodes-helloworld-iface</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - </dependencies> -</project> diff --git a/java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java b/java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java deleted file mode 100644 index 6d49b718ef..0000000000 --- a/java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java +++ /dev/null @@ -1,87 +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 itest; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.io.File; - -import itest.nodes.Helloworld; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This shows how to test the Calculator service component. - */ -public class OneNodeTestCase{ - - private static Node node; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", "false"); - NodeFactory factory = NodeFactory.newInstance(); - node = factory.createNode( - new Contribution("service", getJar("../helloworld-service/target")), - new Contribution("client", getJar("../helloworld-client/target"))); - node.start(); - } - - /** - * Get the jar in the target folder without being dependent on the version name to - * make tuscany releases easier - */ - private static String getJar(String targetDirectory) { - File f = new File(targetDirectory); - for (File file : f.listFiles()) { - if (file.getName().endsWith(".jar")) { - return file.toURI().toString(); - } - } - throw new IllegalStateException("Can't find jar in: " + targetDirectory); - } - - @Test - public void testCalculator() throws Exception { - - // Ideally this would use the SCAClient API but leaving that tillwe have the basics working - - Helloworld service = node.getService(Helloworld.class, "HelloworldService"); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - - Helloworld client = node.getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node != null) { - node.stop(); - } - } -} diff --git a/java/sca/itest/nodes/pom.xml b/java/sca/itest/nodes/pom.xml deleted file mode 100644 index 5a3e4fe7e3..0000000000 --- a/java/sca/itest/nodes/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <packaging>pom</packaging> - <artifactId>itest-nodes</artifactId> - <name>Apache Tuscany SCA iTest Nodes</name> - - <build> - <defaultGoal>install</defaultGoal> - </build> - - <modules> - <module>helloworld-iface</module> - <module>helloworld-service</module> - <module>helloworld-client</module> - <module>one-node-test</module> - <module>two-nodes-test</module> - <module>two-nodes-two-vms-test</module> - </modules> - -</project> diff --git a/java/sca/itest/nodes/two-nodes-test/pom.xml b/java/sca/itest/nodes/two-nodes-test/pom.xml deleted file mode 100644 index a01b682803..0000000000 --- a/java/sca/itest/nodes/two-nodes-test/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-nodes-two-nodes-test</artifactId> - <name>Apache Tuscany SCA iTest Nodes Two Nodes Test</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-nodes-helloworld-iface</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-client-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - </dependencies> -</project> diff --git a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java deleted file mode 100644 index 5f9453a5d6..0000000000 --- a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java +++ /dev/null @@ -1,92 +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 itest; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import itest.nodes.Helloworld; - -import java.io.File; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.node.configuration.NodeConfiguration; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.oasisopen.sca.client.SCAClient; - -/** - * This shows how to test the Calculator service component. - */ -public class ClientNode { - private final static String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200903"; - private static Node clientNode; - private static TestCaseRunner runner; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - runner = new TestCaseRunner(ServiceNode.class); - runner.beforeClass(); - System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", - "false"); - NodeFactory factory = NodeFactory.newInstance(); - NodeConfiguration conf = - factory.createNodeConfiguration().setURI("clientNode"). - addBinding(new QName(SCA11_NS, "binding.sca"), "http://localhost:8085/sca https://localhost:9085/sca") - .addBinding(new QName(SCA11_NS, "binding.ws"), "http://localhost:8086/ws") - .addContribution("client", new File("../helloworld-client/target/classes").toURI().toString()); - clientNode = factory.createNode(conf).start(); - Thread.sleep(1000); - } - - @Test - public void testCalculator() throws Exception { - - Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - } - - @Test - @Ignore("SCAClient needs to leverage the EndpointRegistry to invoke services that are not hosted on the local node") - public void testCalculatorClientAPI() throws Exception { - Helloworld service = SCAClient.getService(Helloworld.class, "HelloworldService"); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - - Helloworld client = SCAClient.getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (clientNode != null) { - clientNode.stop(); - } - if (runner != null) { - runner.afterClass(); - } - } -} diff --git a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java deleted file mode 100644 index b413825106..0000000000 --- a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java +++ /dev/null @@ -1,58 +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 itest; - -import java.io.File; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.node.configuration.NodeConfiguration; -import org.junit.AfterClass; -import org.junit.BeforeClass; - -/** - * This shows how to test the Calculator service component. - */ -public class ServiceNode { - private final static String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200903"; - private static Node serviceNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", - "false"); - NodeFactory factory = NodeFactory.newInstance(); - NodeConfiguration conf = - factory.createNodeConfiguration().setURI("serviceNode") - .addBinding(new QName(SCA11_NS, "binding.sca"), "http://localhost:8087/sca") - .addBinding(new QName(SCA11_NS, "binding.ws"), "http://localhost:8088/ws") - .addContribution("service", new File("../helloworld-service/target/classes").toURI().toString()); - serviceNode = factory.createNode(conf).start(); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (serviceNode != null) { - serviceNode.stop(); - } - } -} diff --git a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java deleted file mode 100644 index 4a41ae8133..0000000000 --- a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java +++ /dev/null @@ -1,102 +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 itest;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-import itest.nodes.Helloworld;
-
-import java.io.File;
-
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.AfterClass;
-import org.junit.Test;
-
-/**
- * Tests using two nodes and stopping and restarting a service node.
- */
-public class StopStartNodesTestCase {
-
- private static Node serviceNode;
- private static Node clientNode;
-
- @Test
- public void testCalculator() throws Exception {
- NodeFactory factory = NodeFactory.newInstance();
- serviceNode = factory.createNode(new Contribution("service", getJar("../helloworld-service/target")));
- serviceNode.start();
- clientNode = factory.createNode(new Contribution("client", getJar("../helloworld-client/target")));
- clientNode.start();
-
- Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
- assertNotNull(service);
- assertEquals("Hello Petra", service.sayHello("Petra"));
-
- Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
- assertNotNull(client);
- assertEquals("Hi Hello Petra", client.sayHello("Petra"));
-
- serviceNode.stop();
-
- client = clientNode.getService(Helloworld.class, "HelloworldClient");
- assertNotNull(client);
- try {
- client.sayHello("Petra");
- fail();
- } catch (Exception e) {
- // expected
- // TODO: better exception than NPE
- }
-
- serviceNode = factory.createNode(new Contribution("service", getJar("../helloworld-service/target")));
- serviceNode.start();
-
- client = clientNode.getService(Helloworld.class, "HelloworldClient");
- assertNotNull(client);
- assertEquals("Hi Hello Petra", client.sayHello("Petra"));
- }
-
- /**
- * Get the jar in the target folder without being dependent on the version name to
- * make tuscany releases easier
- */
- private static String getJar(String targetDirectory) {
- File f = new File(targetDirectory);
- for (File file : f.listFiles()) {
- if (file.getName().endsWith(".jar")) {
- return file.toURI().toString();
- }
- }
- throw new IllegalStateException("Can't find jar in: " + targetDirectory);
- }
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {
- if (serviceNode != null) {
- serviceNode.stop();
- }
- if (clientNode != null) {
- clientNode.stop();
- }
- }
-}
diff --git a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java deleted file mode 100644 index 7dfa6e66cc..0000000000 --- a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java +++ /dev/null @@ -1,292 +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 itest; - -import java.lang.annotation.Annotation; -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; -import java.net.URL; -import java.net.URLClassLoader; -import java.security.AccessController; -import java.security.PrivilegedAction; - -/** - * A helper class that can be used to run an SCA JUnit test case. The test case will run in an isolated class loader. - * - * @version $Rev$ $Date$ - */ -public class TestCaseRunner { - - private ClassLoader classLoader; - private Class<?> testSuiteClass; - private Object testSuite; - private Class<?> testResultClass; - private Class<?> testCaseClass; - private Object testCase; - - private Class<?> beforeAnnotation; - private Class<?> beforeClassAnnotation; - private Class<?> afterAnnotation; - private Class<?> afterClassAnnotation; - private Class<?> junit4AdapterClass; - private Class<?> junit3TestCaseClass; - - /** - * Constructs a new TestCase runner. - * - * @param testClass - */ - public TestCaseRunner(Class<?> testClass) { - try { - ClassLoader tccl = Thread.currentThread().getContextClassLoader(); - classLoader = testClass.getClassLoader(); - if (classLoader instanceof URLClassLoader) { - URL[] urls = ((URLClassLoader)classLoader).getURLs(); - classLoader = new URLClassLoader(urls, classLoader.getParent()); - } else if (classLoader == tccl || classLoader.getParent() == tccl) { - classLoader = new URLClassLoader(new URL[0], classLoader); - } else { - classLoader = tccl; - } - - try { - // Thread.currentThread().setContextClassLoader(classLoader); - // Allow privileged access to set class loader. Requires RuntimePermission - // setContextClassLoader in security policy. - final ClassLoader finalClassLoader = classLoader; - AccessController.doPrivileged(new PrivilegedAction<Object>() { - public Object run() { - Thread.currentThread().setContextClassLoader(finalClassLoader); - return null; - } - }); - - testCaseClass = Class.forName(testClass.getName(), true, classLoader); - testCase = testCaseClass.newInstance(); - ClassLoader testClassLoader = testCaseClass.getClassLoader(); - - junit3TestCaseClass = Class.forName("junit.framework.TestCase", true, testClassLoader); - - testSuiteClass = Class.forName("junit.framework.TestSuite", true, testClassLoader); - Constructor<?> testSuiteConstructor = testSuiteClass.getConstructor(Class.class); - testSuite = testSuiteConstructor.newInstance(testCaseClass); - - testResultClass = Class.forName("junit.framework.TestResult", true, testClassLoader); - - try { - beforeAnnotation = Class.forName("org.junit.Before", true, testClassLoader); - afterAnnotation = Class.forName("org.junit.After", true, testClassLoader); - beforeClassAnnotation = Class.forName("org.junit.BeforeClass", true, testClassLoader); - afterClassAnnotation = Class.forName("org.junit.AfterClass", true, testClassLoader); - junit4AdapterClass = Class.forName("junit.framework.JUnit4TestAdapter", true, testClassLoader); - } catch (Exception e) { - // Unexpected - throw new AssertionError(e); - } - } catch (Throwable e) { - e.printStackTrace(); - } finally { - // Thread.currentThread().setContextClassLoader(tccl); - // Allow privileged access to set class loader. Requires RuntimePermission - // setContextClassLoader in security policy. - final ClassLoader finaltccl = tccl; - AccessController.doPrivileged(new PrivilegedAction<Object>() { - public Object run() { - Thread.currentThread().setContextClassLoader(finaltccl); - return null; - } - }); - } - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - /** - * Run the test case - */ - public void run() { - ClassLoader tccl = Thread.currentThread().getContextClassLoader(); - try { - // Thread.currentThread().setContextClassLoader(classLoader); - // Allow privileged access to set class loader. Requires RuntimePermission - // setContextClassLoader in security policy. - final ClassLoader finalClassLoader = classLoader; - AccessController.doPrivileged(new PrivilegedAction<Object>() { - public Object run() { - Thread.currentThread().setContextClassLoader(finalClassLoader); - return null; - } - }); - - if (junit3TestCaseClass.isAssignableFrom(testCaseClass)) { - Object testResult = testResultClass.newInstance(); - Method runMethod = testSuiteClass.getMethod("run", testResultClass); - runMethod.invoke(testSuite, testResult); - } else { - Object junit4Adapter = junit4AdapterClass.getConstructor(Class.class).newInstance(testCaseClass); - Object testResult = testResultClass.newInstance(); - Method runMethod = junit4AdapterClass.getMethod("run", testResultClass); - runMethod.invoke(junit4Adapter, testResult); - } - } catch (Exception e) { - throw new RuntimeException(e); - } finally { - // Thread.currentThread().setContextClassLoader(tccl); - // Allow privileged access to set class loader. Requires RuntimePermission - // setContextClassLoader in security policy. - final ClassLoader finaltccl = tccl; - AccessController.doPrivileged(new PrivilegedAction<Object>() { - public Object run() { - Thread.currentThread().setContextClassLoader(finaltccl); - return null; - } - }); - } - } - - /** - * Invoke the setUp method - */ - public void setUp() { - execute("setUp"); - } - - /** - * Invoke the before methods - */ - public void before() { - execute(beforeAnnotation); - } - - /** - * Invoke the beforeClass methods - */ - public void beforeClass() { - execute(beforeClassAnnotation); - } - - /** - * Invoke the tearDown method - */ - public void tearDown() { - execute("tearDown"); - } - - /** - * Invoke the after methods - */ - public void after() { - execute(afterAnnotation); - } - - /** - * Invoke the afterClass methods - */ - public void afterClass() { - execute(afterClassAnnotation); - } - - /** - * Invoke the specified test method. - */ - public void run(String methodName) { - execute(methodName); - } - - /** - * Invoke the methods annotated with the specified annotation. - */ - private void execute(Class<?> annotationClass) { - if (annotationClass == null) { - throw new RuntimeException(new NoSuchMethodException()); - } - ClassLoader tccl = Thread.currentThread().getContextClassLoader(); - try { - // Thread.currentThread().setContextClassLoader(classLoader); - // Allow privileged access to set class loader. Requires RuntimePermission - // setContextClassLoader in security policy. - final ClassLoader finalClassLoader = classLoader; - AccessController.doPrivileged(new PrivilegedAction<Object>() { - public Object run() { - Thread.currentThread().setContextClassLoader(finalClassLoader); - return null; - } - }); - - for (Method method : testCaseClass.getDeclaredMethods()) { - for (Annotation annotation : method.getAnnotations()) { - if (annotation.annotationType() == annotationClass) { - method.invoke(testCase); - } - } - } - } catch (Exception e) { - throw new RuntimeException(e); - } finally { - // Thread.currentThread().setContextClassLoader(tccl); - // Allow privileged access to set class loader. Requires RuntimePermission - // setContextClassLoader in security policy. - final ClassLoader finaltccl = tccl; - AccessController.doPrivileged(new PrivilegedAction<Object>() { - public Object run() { - Thread.currentThread().setContextClassLoader(finaltccl); - return null; - } - }); - } - } - - /** - * Invoke the specified method - */ - private void execute(String methodName) { - ClassLoader tccl = Thread.currentThread().getContextClassLoader(); - try { - // Thread.currentThread().setContextClassLoader(classLoader); - // Allow privileged access to set class loader. Requires RuntimePermission - // setContextClassLoader in security policy. - final ClassLoader finalClassLoader = classLoader; - AccessController.doPrivileged(new PrivilegedAction<Object>() { - public Object run() { - Thread.currentThread().setContextClassLoader(finalClassLoader); - return null; - } - }); - Method setUpMethod = testCaseClass.getDeclaredMethod(methodName); - setUpMethod.setAccessible(true); - setUpMethod.invoke(testCase); - } catch (Exception e) { - throw new RuntimeException(e); - } finally { - // Thread.currentThread().setContextClassLoader(tccl); - // Allow privileged access to set class loader. Requires RuntimePermission - // setContextClassLoader in security policy. - final ClassLoader finaltccl = tccl; - AccessController.doPrivileged(new PrivilegedAction<Object>() { - public Object run() { - Thread.currentThread().setContextClassLoader(finaltccl); - return null; - } - }); - } - } - -} - diff --git a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java deleted file mode 100644 index 769aad1940..0000000000 --- a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java +++ /dev/null @@ -1,105 +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 itest; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import itest.nodes.Helloworld; - -import java.io.File; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.node.configuration.NodeConfiguration; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.oasisopen.sca.client.SCAClient; - -/** - * This shows how to test the Calculator service component. - */ -public class TwoNodesTestCase { - - private static Node serviceNode; - private static Node clientNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", - "false"); - NodeFactory factory = NodeFactory.newInstance(); - NodeConfiguration configuration1 = - factory.createNodeConfiguration().setURI("serviceNode") - .addContribution("service", getJar("../helloworld-service/target")); - serviceNode = factory.createNode(configuration1).start(); - - NodeConfiguration configuration2 = - factory.createNodeConfiguration().setURI("clientNode") - .addContribution("client", getJar("../helloworld-client/target")); - clientNode = factory.createNode(configuration2).start(); - } - - /** - * Get the jar in the target folder without being dependent on the version name to - * make tuscany releases easier - */ - private static String getJar(String targetDirectory) { - File f = new File(targetDirectory); - for (File file : f.listFiles()) { - if (file.getName().endsWith(".jar")) { - return file.toURI().toString(); - } - } - throw new IllegalStateException("Can't find jar in: " + targetDirectory); - } - - @Test - public void testCalculator() throws Exception { - Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService"); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - - Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - } - - @Test - public void testCalculatorClientAPI() throws Exception { - Helloworld service = SCAClient.getService(Helloworld.class, "HelloworldService"); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - - Helloworld client = SCAClient.getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (serviceNode != null) { - serviceNode.stop(); - } - if (clientNode != null) { - clientNode.stop(); - } - } -} diff --git a/java/sca/itest/nodes/two-nodes-two-vms-test/build.xml b/java/sca/itest/nodes/two-nodes-two-vms-test/build.xml deleted file mode 100644 index 933aec2636..0000000000 --- a/java/sca/itest/nodes/two-nodes-two-vms-test/build.xml +++ /dev/null @@ -1,38 +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. ---> -<project name="itest-samples" default="run"> - - <target name="run"> - - <parallel> - - <daemons> - <ant antfile="server.xml"/> - </daemons> - - <sequential> - <sleep seconds="4"/> - <ant antfile="client.xml"/> - </sequential> - - </parallel> - - </target> - -</project> diff --git a/java/sca/itest/nodes/two-nodes-two-vms-test/client-config.xml b/java/sca/itest/nodes/two-nodes-two-vms-test/client-config.xml deleted file mode 100644 index 1bda0ee4b7..0000000000 --- a/java/sca/itest/nodes/two-nodes-two-vms-test/client-config.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - uri="http://sample/nodes/TestNode1" - domain="http://domain1"> - - <!-- Configure the base URIs for a given binding --> - <!-- Each base URI is for a protocol supported by the binding --> - <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/> - <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/> - - <!-- Configure a list of contributions --> - <contribution uri="iface" location="../helloworld-iface/target/itest-nodes-helloworld-iface-2.0-SNAPSHOT.jar"/> - <contribution uri="client" location="../helloworld-client/target/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar"> - <!-- doesn't pick up the deployable composite properly without this?--> - <deploymentComposite location="helloworld-client.composite"/> - </contribution> - -</node>
\ No newline at end of file diff --git a/java/sca/itest/nodes/two-nodes-two-vms-test/client.xml b/java/sca/itest/nodes/two-nodes-two-vms-test/client.xml deleted file mode 100644 index bb65805144..0000000000 --- a/java/sca/itest/nodes/two-nodes-two-vms-test/client.xml +++ /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. ---> -<project name="server" default="run"> - - <!--echo>${runtime_classpath}</echo--> - - <target name="run"> - <java classpath="${runtime_classpath}" classname="org.apache.tuscany.sca.node.launcher.NodeMain" fork="true"> - <!--jvmarg value="-Djava.util.logging.config.file=../logging.properties"/--> - <arg value="-ttl"/> - <arg value="0"/> - <arg value="-node"/> - <arg value="./client-config.xml"/> - </java> - </target> - -</project>
\ No newline at end of file diff --git a/java/sca/itest/nodes/two-nodes-two-vms-test/pom.xml b/java/sca/itest/nodes/two-nodes-two-vms-test/pom.xml deleted file mode 100644 index 1ffccd9fd5..0000000000 --- a/java/sca/itest/nodes/two-nodes-two-vms-test/pom.xml +++ /dev/null @@ -1,99 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-nodes-two-nodes-two-vms-test</artifactId> - <name>Apache Tuscany SCA iTest Nodes Two Nodes Two VMs Test</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-endpoint-tribes</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>itest-nodes-helloworld-iface</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-launcher</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-client-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-sca-axis2-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <execution> - <id>run-samples</id> - <phase>verify</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <property name="tuscany.version" value="${version}" /> - <property name="runtime_classpath" refid="maven.runtime.classpath"/> - <ant antfile="./build.xml" target="run"/> - </tasks> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/java/sca/itest/nodes/two-nodes-two-vms-test/server-config.xml b/java/sca/itest/nodes/two-nodes-two-vms-test/server-config.xml deleted file mode 100644 index 14a48f507a..0000000000 --- a/java/sca/itest/nodes/two-nodes-two-vms-test/server-config.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - uri="http://sample/nodes/TestNode1" - domain="http://domain1"> - - <!-- Configure the base URIs for a given binding --> - <!-- Each base URI is for a protocol supported by the binding --> - <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/> - <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/> - - <!-- Configure a list of contributions --> - <contribution uri="iface" location="../helloworld-iface/target/classes"/> - <contribution uri="service" location="../helloworld-service/target/classes"> - <!-- doesn't pick up the deployable composite properly without this?--> - <deploymentComposite location="helloworld-service.composite"/> - </contribution> - -</node>
\ No newline at end of file diff --git a/java/sca/itest/nodes/two-nodes-two-vms-test/server.xml b/java/sca/itest/nodes/two-nodes-two-vms-test/server.xml deleted file mode 100644 index 7b6d206b7f..0000000000 --- a/java/sca/itest/nodes/two-nodes-two-vms-test/server.xml +++ /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. ---> -<project name="server" default="run"> - - <!--echo>${runtime_classpath}</echo--> - - <target name="run"> - <java classpath="${runtime_classpath}" classname="org.apache.tuscany.sca.node.launcher.NodeMain" fork="true"> - <!--jvmarg value="-Djava.util.logging.config.file=../logging.properties"/--> - <!--arg value="-ttl"/> - <arg value="0"/--> - <arg value="-node"/> - <arg value="./server-config.xml"/> - </java> - </target> - -</project>
\ No newline at end of file diff --git a/java/sca/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java b/java/sca/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java deleted file mode 100644 index b27d16a562..0000000000 --- a/java/sca/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java +++ /dev/null @@ -1,57 +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 itest; - -import java.io.File; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This shows how to test the Calculator service component. - */ -public class TwoNodesTestCase { - - private static Node serviceNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - NodeFactory factory = NodeFactory.newInstance(); - - serviceNode = factory.createNode(new File("server-config.xml").toURI().toURL()); - serviceNode.start(); - - } - - @Test - public void testNothing() throws Exception { - - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (serviceNode != null) { - serviceNode.stop(); - } - } -} diff --git a/java/sca/itest/operation-overloading/pom.xml b/java/sca/itest/operation-overloading/pom.xml deleted file mode 100644 index 48410a4b47..0000000000 --- a/java/sca/itest/operation-overloading/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-operation-overloading</artifactId> - <name>Apache Tuscany SCA iTest Operation Overloading</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java b/java/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java deleted file mode 100644 index 1f589b44f4..0000000000 --- a/java/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java +++ /dev/null @@ -1,61 +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 org.apache.tuscany.sca.test.opoverload; - -/** - * This is an Interface which has methods declared but not implemented, These methods will be implemented in - * OverloadATarget Class and OverloadASource This class has methods with overloaded parameters. - */ - -//@AllowsPassByReference -public interface OverloadASourceTarget { - String opName = "operationA:"; - - /** - * Method with no parameters - */ - String operationA(); - - /** - * Method with one integer parameter - */ - String operationA(int parm1); - - /** - * Method with one integer parameter and one string parameter - */ - String operationA(int parm1, String parm2); - - /** - * Method with one one string parameter and one integer parameter - */ - String operationA(String parm1, int parm2); - - /** - * Method with one string parameter - */ - String operationA(String string); - - /** - * Method which throws an illegal argument exception in case of any exceptions. - */ - String[] operationAall(); - -} diff --git a/java/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java b/java/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java deleted file mode 100644 index a30d3611fb..0000000000 --- a/java/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java +++ /dev/null @@ -1,113 +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 org.apache.tuscany.sca.test.opoverload.impl; - -import java.util.ArrayList; - -import org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class Implements the interface OverloadASourceTarget, and gives implementation for all methods which are - * declared in the OverloadASourceTarget interface. - */ -@Service(OverloadASourceTarget.class) -public class OverloadASource implements OverloadASourceTarget { - public OverloadASourceTarget overloadASourceTarget; - - /** - * This is a default constructor - */ - public OverloadASource() { - - } - - /** - * @return - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA() - */ - public String[] operationAall() { - assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; - ArrayList<String> ret = new ArrayList<String>(); - ret.add(overloadASourceTarget.operationA()); - ret.add(overloadASourceTarget.operationA(11)); - ret.add(overloadASourceTarget.operationA("eleven")); - ret.add(overloadASourceTarget.operationA(3, "three")); - ret.add(overloadASourceTarget.operationA("four", 4)); - return (String[])ret.toArray(new String[ret.size()]); - } - - /** - * @return - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA() - */ - public String operationA() { - assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; - return overloadASourceTarget.operationA(); - } - - /** - * @param parm1 - * @return - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int) - */ - public String operationA(int parm1) { - assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; - return overloadASourceTarget.operationA(parm1); - } - - /** - * @param parm1 - * @param parm2 - * @return - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int, java.lang.String) - */ - public String operationA(int parm1, String parm2) { - assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; - return overloadASourceTarget.operationA(parm1, parm2); - } - - public String operationA(String string) { - assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; - return overloadASourceTarget.operationA(string); - } - - /** - * @param parm1 - * @param parm2 - * @return - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(java.lang.String, int) - */ - public String operationA(String parm1, int parm2) { - assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; - return overloadASourceTarget.operationA(parm1, parm2); - } - - /** - * This method which is used by all the overloaded functions to set the source target - */ - @Reference - public void setOverloadASourceTarget(OverloadASourceTarget overloadASourceTarget) { - assert overloadASourceTarget != null : "reference overloadASourceTarget is set tonull"; - this.overloadASourceTarget = overloadASourceTarget; - } - -} diff --git a/java/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java b/java/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java deleted file mode 100644 index 9ec60eb78f..0000000000 --- a/java/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java +++ /dev/null @@ -1,99 +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 org.apache.tuscany.sca.test.opoverload.impl; - -import org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget; -import org.oasisopen.sca.annotation.Service; - -/** - * This class Implements the interface OverloadASourceTarget, and gives implementation for all methods which are - * declared in the OverloadASourceTarget interface. - */ -@Service(OverloadASourceTarget.class) -public class OverloadATarget implements OverloadASourceTarget { - - /** - * This is a default Constructor - */ - public OverloadATarget() { - - } - - /* - * (non-Javadoc) - * - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int) - */ - public String operationA(int parm1) { - final String ret = opName + parm1; - out(ret); - return ret; - - } - - /* - * (non-Javadoc) - * - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int, java.lang.String) - */ - public String operationA(int parm1, String parm2) { - final String ret = opName + parm1 + parm2; - out(ret); - return ret; - - } - - /* - * (non-Javadoc) - * - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA() - */ - public String operationA() { - out(opName); - return opName; - - } - - public String operationA(String parm1, int parm2) { - final String ret = opName + parm1 + parm2; - out(ret); - return ret; - } - - public String operationA(String parm1) { - final String ret = opName + parm1; - out(ret); - return ret; - } - - /** - * This method is used to print the message returned by all the overloaded functions - */ - private void out(String msg) { - - java.lang.System.out.println(msg); - } - - public String[] operationAall() { - throw new IllegalArgumentException("not supported"); - - } - -} diff --git a/java/sca/itest/operation-overloading/src/main/resources/OperationOverload.composite b/java/sca/itest/operation-overloading/src/main/resources/OperationOverload.composite deleted file mode 100644 index cbf5aa2078..0000000000 --- a/java/sca/itest/operation-overloading/src/main/resources/OperationOverload.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://foo" - xmlns:foo="http://foo" - name="OperationOverload"> - - <component name="OverloadASourceComponent"> - <implementation.java class="org.apache.tuscany.sca.test.opoverload.impl.OverloadASource" /> - <reference name="overloadASourceTarget" target="OverloadATargetComponent"/> - </component> - - <component name="OverloadATargetComponent"> - <implementation.java class="org.apache.tuscany.sca.test.opoverload.impl.OverloadATarget" /> - </component> - -</composite> diff --git a/java/sca/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java b/java/sca/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java deleted file mode 100644 index 62e5c14ce2..0000000000 --- a/java/sca/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java +++ /dev/null @@ -1,98 +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 org.apache.tuscany.sca.test.opoverload.impl; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -public class OverloadATestCase { - - private static Node node; - private static OverloadASourceTarget overloadA; - - /** - * Method prefixed with 'test' is a test method where testing logic is written using various assert methods. This - * test verifies the values compared are same as the values retrieved from the SCA runtime. - */ - @Test - public void testOperationAall() { - String[] result = overloadA.operationAall(); - assertEquals(5, result.length); - assertEquals(OverloadASourceTarget.opName, result[0]); - assertEquals(OverloadASourceTarget.opName + 11, result[1]); - assertEquals(OverloadASourceTarget.opName + "eleven", result[2]); - assertEquals(OverloadASourceTarget.opName + 3 + "three", result[3]); - assertEquals(OverloadASourceTarget.opName + "four" + 4, result[4]); - } - - @Test - public void testOperationAInt() { - String result = overloadA.operationA(29); - assertEquals(OverloadASourceTarget.opName + 29, result); - } - - @Test - public void testOperationAString() { - String result = overloadA.operationA("rick:-)"); - assertEquals(OverloadASourceTarget.opName + "rick:-)", result); - } - - @Test - public void testOperationAIntString() { - String result = overloadA.operationA(123, "Tuscany"); - assertEquals(OverloadASourceTarget.opName + 123 + "Tuscany", result); - } - - @Test - public void testOperationStringInt() { - String result = overloadA.operationA("StringInt", 77); - assertEquals(OverloadASourceTarget.opName + "StringInt" + 77, result); - } - - /** - * setUp() is a method in JUnit Frame Work which is executed before all others methods in the class extending - * unit.framework.TestCase. So this method is used to create a test Embedded SCA node, to start the SCA node and - * to get a reference to the contribution service - */ - - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("OperationOverload.composite"); - node = NodeFactory.newInstance().createNode("OperationOverload.composite", new Contribution("c1", location)); - node.start(); - overloadA = node.getService(OverloadASourceTarget.class, "OverloadASourceComponent"); - } - - /** - * tearDown() is a method in JUnit Frame Work which is executed after all other methods in the class extending - * unit.framework.TestCase. So this method is used to close the SCA node. - */ - - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } -} diff --git a/java/sca/itest/policies/pom.xml b/java/sca/itest/policies/pom.xml deleted file mode 100644 index daa3e395f5..0000000000 --- a/java/sca/itest/policies/pom.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-policies</artifactId> - <name>Apache Tuscany SCA iTest Policies</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-policy-logging</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - </dependencies> - -</project> diff --git a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCard.java b/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCard.java deleted file mode 100644 index fd33be01d6..0000000000 --- a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCard.java +++ /dev/null @@ -1,65 +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 org.apache.tuscany.sca.itest.policies; - -import java.io.Serializable; - -/** - * Credit Card - */ -public class CreditCard implements Serializable { - private static final long serialVersionUID = -6107293191546007197L; - private String type; - private String number; - private String owner; - private int expMonth; - private int expYear; - - public String getType() { - return type; - } - public void setType(String type) { - this.type = type; - } - public String getNumber() { - return number; - } - public void setNumber(String number) { - this.number = number; - } - public String getOwner() { - return owner; - } - public void setOwner(String owner) { - this.owner = owner; - } - public int getExpMonth() { - return expMonth; - } - public void setExpMonth(int expMonth) { - this.expMonth = expMonth; - } - public int getExpYear() { - return expYear; - } - public void setExpYear(int expYear) { - this.expYear = expYear; - } -} diff --git a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCardPayment.java b/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCardPayment.java deleted file mode 100644 index 368179dc29..0000000000 --- a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCardPayment.java +++ /dev/null @@ -1,37 +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 org.apache.tuscany.sca.itest.policies; - -import org.oasisopen.sca.annotation.Authentication; -import org.oasisopen.sca.annotation.Confidentiality; -import org.oasisopen.sca.annotation.Remotable; - -/** - * - */ -@Remotable -@Authentication -public interface CreditCardPayment { - String COMPLETED = "Completed"; - String REJECTED = "Rejected"; - - @Confidentiality - String authorize(CreditCard creditCard, float amount); -} diff --git a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Customer.java b/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Customer.java deleted file mode 100644 index 05ea341466..0000000000 --- a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Customer.java +++ /dev/null @@ -1,51 +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 org.apache.tuscany.sca.itest.policies; - -import java.io.Serializable; - -/** - * Customer - */ -public class Customer implements Serializable { - private static final long serialVersionUID = 680227659536711695L; - private String id; - private String name; - private CreditCard creditCard; - - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public CreditCard getCreditCard() { - return creditCard; - } - public void setCreditCard(CreditCard creditCard) { - this.creditCard = creditCard; - } -} diff --git a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CustomerRegistry.java b/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CustomerRegistry.java deleted file mode 100644 index c9f50d08ee..0000000000 --- a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CustomerRegistry.java +++ /dev/null @@ -1,27 +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 org.apache.tuscany.sca.itest.policies; - -/** - * - */ -public interface CustomerRegistry { - Customer find(String id); -} diff --git a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Payment.java b/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Payment.java deleted file mode 100644 index cc7c555aff..0000000000 --- a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Payment.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.itest.policies; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * - */ -@Remotable -public interface Payment { - String charge(String customerID, float amount); -} diff --git a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CreditCardPaymentImpl.java b/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CreditCardPaymentImpl.java deleted file mode 100644 index 01cc8ac636..0000000000 --- a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CreditCardPaymentImpl.java +++ /dev/null @@ -1,40 +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 org.apache.tuscany.sca.itest.policies.impl; - -import org.apache.tuscany.sca.itest.policies.CreditCard; -import org.apache.tuscany.sca.itest.policies.CreditCardPayment; - -/** - * - */ -public class CreditCardPaymentImpl implements CreditCardPayment { - - public String authorize(CreditCard creditCard, float amount) { - System.out.println(creditCard.getType() + " " + creditCard.getNumber()); - System.out.println(amount); - if (amount < 200f) { - return COMPLETED; - } else { - return REJECTED; - } - } - -} diff --git a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CustomerRegistryImpl.java b/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CustomerRegistryImpl.java deleted file mode 100644 index 943720451f..0000000000 --- a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CustomerRegistryImpl.java +++ /dev/null @@ -1,78 +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 org.apache.tuscany.sca.itest.policies.impl; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.tuscany.sca.itest.policies.CreditCard; -import org.apache.tuscany.sca.itest.policies.Customer; -import org.apache.tuscany.sca.itest.policies.CustomerRegistry; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * - */ -@Service(CustomerRegistry.class) -@Scope("COMPOSITE") -public class CustomerRegistryImpl implements CustomerRegistry { - private Map<String, Customer> customers = new HashMap<String, Customer>(); - - - @Init - public void init() { - Customer c1 = new Customer(); - c1.setId("001"); - c1.setName("John Smith"); - CreditCard creditCard = new CreditCard(); - creditCard.setNumber("1234-5678-1234"); - creditCard.setType("Visa"); - creditCard.setOwner("John Smith"); - creditCard.setExpMonth(6); - creditCard.setExpYear(2015); - c1.setCreditCard(creditCard); - customers.put(c1.getId(), c1); - - Customer c2 = new Customer(); - c2.setId("002"); - c2.setName("Jane Smith"); - creditCard = new CreditCard(); - creditCard.setNumber("1234-5678-5678"); - creditCard.setType("MasterCard"); - creditCard.setOwner("Jane Smith"); - creditCard.setExpMonth(9); - creditCard.setExpYear(2012); - c2.setCreditCard(creditCard); - customers.put(c2.getId(), c2); - } - - public Customer find(String id) { - return customers.get(id); - } - - @Destroy - public void destroy() { - customers.clear(); - } - -} diff --git a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/PaymentImpl.java b/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/PaymentImpl.java deleted file mode 100644 index b712b99388..0000000000 --- a/java/sca/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/PaymentImpl.java +++ /dev/null @@ -1,54 +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 org.apache.tuscany.sca.itest.policies.impl; - -import org.apache.tuscany.sca.itest.policies.CreditCard; -import org.apache.tuscany.sca.itest.policies.CreditCardPayment; -import org.apache.tuscany.sca.itest.policies.Customer; -import org.apache.tuscany.sca.itest.policies.CustomerRegistry; -import org.apache.tuscany.sca.itest.policies.Payment; -import org.apache.tuscany.sca.policy.logging.Logging; -import org.oasisopen.sca.annotation.Authentication; -import org.oasisopen.sca.annotation.Confidentiality; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Requires; - -/** - * - */ -@Logging -public class PaymentImpl implements Payment { - - @Reference - protected CustomerRegistry customerRegistry; - - @Reference - @Authentication - @Requires({Confidentiality.CONFIDENTIALITY_MESSAGE, Confidentiality.CONFIDENTIALITY_TRANSPORT}) - protected CreditCardPayment creditCardPayment; - - public String charge(String customerID, float amount) { - Customer customer = customerRegistry.find(customerID); - CreditCard creditCard = customer.getCreditCard(); - String status = creditCardPayment.authorize(creditCard, amount); - return status; - } - -} diff --git a/java/sca/itest/policies/src/main/resources/Customer.composite b/java/sca/itest/policies/src/main/resources/Customer.composite deleted file mode 100644 index 2a8f598b90..0000000000 --- a/java/sca/itest/policies/src/main/resources/Customer.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:c="http://customer" - targetNamespace="http://customer" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - name="Customer"> - - <service name="Registry" promote="CustomerRegistry" requires="tuscany:logging"> - <binding.sca/> - </service> - - <component name="CustomerRegistry"> - <implementation.java class="org.apache.tuscany.sca.itest.policies.impl.CustomerRegistryImpl" /> - </component> - -</composite>
\ No newline at end of file diff --git a/java/sca/itest/policies/src/main/resources/LoggingMessages.properties b/java/sca/itest/policies/src/main/resources/LoggingMessages.properties deleted file mode 100644 index ada808be0e..0000000000 --- a/java/sca/itest/policies/src/main/resources/LoggingMessages.properties +++ /dev/null @@ -1,16 +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. diff --git a/java/sca/itest/policies/src/main/resources/META-INF/definitions.xml b/java/sca/itest/policies/src/main/resources/META-INF/definitions.xml deleted file mode 100644 index 0a39912bf0..0000000000 --- a/java/sca/itest/policies/src/main/resources/META-INF/definitions.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * 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. ---> -<definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> - - <policySet name="JDKLoggingPolicy" - provides="tuscany:logging" - appliesTo="//binding | //implementation"> - <tuscany:jdkLogger name="test.logger"> - <tuscany:logLevel>FINE</tuscany:logLevel> - <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle> - </tuscany:jdkLogger> - - </policySet> - - <policySet name="JDKLoggingImplPolicy" - provides="tuscany:logging" - appliesTo="//implementation.java" - attachTo="//sca:component[@name='CreditCardPayment']"> - <tuscany:jdkLogger name="test.logger"> - <tuscany:logLevel>INFO</tuscany:logLevel> - <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle> - </tuscany:jdkLogger> - - </policySet> - -</definitions>
\ No newline at end of file diff --git a/java/sca/itest/policies/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/policies/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index be63597c12..0000000000 --- a/java/sca/itest/policies/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:p="http://payment"> - <deployable composite="p:Payment" /> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/policies/src/main/resources/Payment.composite b/java/sca/itest/policies/src/main/resources/Payment.composite deleted file mode 100644 index df54d0c1c2..0000000000 --- a/java/sca/itest/policies/src/main/resources/Payment.composite +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:p="http://payment" - xmlns:c="http://customer" - xmlns:sca = "http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - requires = "sca:authorization" - targetNamespace="http://payment" - name="Payment"> - - <component name="Payment"> - <implementation.java class="org.apache.tuscany.sca.itest.policies.impl.PaymentImpl" /> - <reference name="creditCardPayment" target="CreditCardPayment"> - <binding.sca requires="sca:integrity tuscany:logging"> - </binding.sca> - </reference> - <reference name="customerRegistry" target="Customer/Registry" requires="sca:suspendsTransaction tuscany:logging"/> - </component> - - <component name="CreditCardPayment"> - <implementation.java class="org.apache.tuscany.sca.itest.policies.impl.CreditCardPaymentImpl" /> - </component> - - <component name="Customer"> - <implementation.composite name="c:Customer" requires="sca:managedTransaction.global"/> - <service name="Registry" requires="sca:suspendsTransaction"> - <binding.sca/> - </service> - </component> - -</composite>
\ No newline at end of file diff --git a/java/sca/itest/policies/src/test/java/org/apache/tuscany/sca/itest/policies/PaymentTestCase.java b/java/sca/itest/policies/src/test/java/org/apache/tuscany/sca/itest/policies/PaymentTestCase.java deleted file mode 100644 index 3385ee9071..0000000000 --- a/java/sca/itest/policies/src/test/java/org/apache/tuscany/sca/itest/policies/PaymentTestCase.java +++ /dev/null @@ -1,69 +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 org.apache.tuscany.sca.itest.policies; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -public class PaymentTestCase { - private static Node node; - - @BeforeClass - public static void init() throws Exception { - try { - String location = ContributionLocationHelper.getContributionLocation("Payment.composite"); - node = NodeFactory.newInstance().createNode(new Contribution("c1", location)); - node.start(); - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } - - @AfterClass - public static void destroy() throws Exception { - if (node != null) { - node.stop(); - } - } - - @Test - public void testPayment() { - Payment payment = node.getService(Payment.class, "Payment"); - String status = payment.charge("001", 100f); - Assert.assertEquals(CreditCardPayment.COMPLETED, status); - - status = payment.charge("002", 300f); - Assert.assertEquals(CreditCardPayment.REJECTED, status); - } - - public static void main(String[] args) throws Exception { - PaymentTestCase.init(); - PaymentTestCase tester = new PaymentTestCase(); - tester.testPayment(); - PaymentTestCase.destroy(); - } -} diff --git a/java/sca/itest/pom.xml b/java/sca/itest/pom.xml deleted file mode 100644 index 6a6d2ad613..0000000000 --- a/java/sca/itest/pom.xml +++ /dev/null @@ -1,167 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---><project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>tuscany-itest</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Integration Tests</name> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>compile</scope> - </dependency> - </dependencies> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>builder</module> - <module>bpel</module> - <module>callback-api</module> - <module>callback-basic</module> - <module>callback-basic-ws</module> - <module>callback-complex-type</module> - <module>callback-multiple-wires</module> - <module>callback-separatethread</module> - <module>component-type</module> - <module>contribution-folder</module> - <module>contribution-zip</module> -<!-- why commented out? - <module>definitions-multiple</module> ---> - <module>distribution</module> - <module>exceptions</module> - <module>implementation-spring</module> - <module>interfaces</module> - <module>jms</module> - <module>nodes</module> -<!-- why commented out? - <module>operation-overloading</module> ---> -<!-- wait until databinding-sdo is in - <module>properties</module> ---> - <module>recursive-multi-level</module> - <module>references</module> - <module>scaclient-api</module> - <module>scopes</module> - <module>scdl</module> - <module>services</module> - <module>service-reference</module> - <module>wires</module> - <module>policies</module> - </modules> - </profile> - - <profile> - <id>old</id> - <modules> - <module>bpel</module> - <module>builder</module> - <module>callablereferences</module> - <module>callablereferences-ws</module> - <module>callback-api</module> - <module>callback-basic</module> - <module>callback-complex-type</module> - <module>callback-id</module> - <module>callback-multiple-wires</module> - <module>callback-separatethread</module> - <module>callback-set-callback</module> - <module>callback-set-conversation</module> - <module>component-type</module> - <module>contribution</module> - <!-- - <module>contribution-classloader</module> - --> - <module>contribution-import-export</module> - <module>conversations</module> - <module>conversations-ws</module> - <module>corba</module> - <module>databindings</module> - <module>exceptions</module> - <module>exceptions-cross-binding</module> - <module>exceptions-cross-binding-ws</module> - <module>exceptions-simple-ws</module> - <module>extended-api</module> - <module>interfaces</module> - <!-- - <module>interop-soap-client</module> - <module>interop-soap-round2-client</module> - <module>interop-soap-service</module> - --> - <module>jms</module> - <module>jms-args</module> - <module>jms-callbacks</module> - <module>jms-definitions</module> - <module>jms-format</module> - <module>jms-selectors</module> - <module>large-sdo-ws</module> - <module>late-reference-resolution</module> - <module>oneway</module> - <module>operation-overloading</module> - <!-- - <module>osgi-implementation</module> - <module>osgi-contribution</module> - --> - <module>policy</module> - <module>policy-security</module> - <module>policy-security-basicauth</module> - <module>policy-security-jsr250</module> - <module>policy-security-token</module> - <!-- - <module>promotion-interface-missmatch</module> - --> - <module>properties</module> - <module>recursive</module> - <module>recursive-multi-level</module> - <module>recursive-ws</module> - <module>references</module> - <module>scopes</module> - <module>serialization</module> - <module>services</module> - <module>spring</module> - <module>transaction</module> - <module>validation</module> - <module>wires</module> - <module>wsdl</module> - <module>wsdl2java</module> - <module>wsdlless</module> - <module>wsdl-multiple</module> - <module>ws-void-args-return</module> - </modules> - </profile> - </profiles> - - <modules> - <module>jaxws</module> - </modules> -</project>
\ No newline at end of file diff --git a/java/sca/itest/properties/pom.xml b/java/sca/itest/properties/pom.xml deleted file mode 100644 index ec04cdba99..0000000000 --- a/java/sca/itest/properties/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-properties</artifactId> - <name>Apache Tuscany SCA iTest Properties</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <!-- XPathFactory --> - <dependency> - <groupId>xalan</groupId> - <artifactId>xalan</artifactId> - <version>2.7.1</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-core-databinding</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-databinding-jaxb</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>compile</scope> - </dependency> - </dependencies> -</project> diff --git a/java/sca/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java b/java/sca/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java deleted file mode 100644 index b0fd64c9da..0000000000 --- a/java/sca/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java +++ /dev/null @@ -1,34 +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 mysca.test.myservice.impl; - -public interface MyService { - /** - * This is a method to get the location property value from the sca runtime environment. It is implemented in the - * class MyServiceImpl - */ - String getLocation(); - - /** - * This is a method to get the year property value from the sca runtime environment. It is implemented in the class - * MyServiceImpl - */ - String getYear(); -} diff --git a/java/sca/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java b/java/sca/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java deleted file mode 100644 index 7b44ef02e4..0000000000 --- a/java/sca/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java +++ /dev/null @@ -1,88 +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 mysca.test.myservice.impl; - -import java.util.logging.Logger; - -import org.oasisopen.sca.annotation.ComponentName; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -/** - * This class Implements the interface MyService and gives implementation for all methods which are declared in that - * interface. scope is specified as Composite using - * - * @scope annotation. - */ - -@Service(MyService.class) -public class MyServiceImpl implements MyService { - - @Property(name = "location") - protected String location = "RTP"; - - @Property(name = "year") - protected String year = "2006"; - - @ComponentName - protected String componentName; - - private Logger logger; - - /** - * @ to print the message in the log - */ - public MyServiceImpl() { - logger = Logger.getAnonymousLogger(); - logger.info("creating service instance..."); - } - - /** - * @Init annotation to Start the service. Which is executed all the time - */ - @Init - public void start() { - logger.info("Start service.."); - } - - /** - * @Destroy annotation to stop the service. Which is executed in the end - */ - @Destroy - public void stop() { - logger.info("Stop service.."); - - } - - public String getComponentName() { - return componentName; - } - - public String getLocation() { - return location; - } - - public String getYear() { - return year; - } - -} diff --git a/java/sca/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java b/java/sca/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java deleted file mode 100644 index e8c4341cf2..0000000000 --- a/java/sca/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.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 mysca.test.myservice.impl; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class Implements the interface MyService and gives implementation for all methods which are declared in that - * interface. scope is specified as Composite using - * - * @scope annotation. - */ - -@Service(MyService.class) -public class MyTotalServiceImpl implements MyService { - - // default required==true so it is 1:1 - @Reference - public MyService myService; - - public String getLocation() { - return myService.getLocation(); - } - - public String getYear() { - return myService.getYear(); - } - -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java deleted file mode 100644 index 68ce5a3cb6..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java +++ /dev/null @@ -1,50 +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 org.apache.tuscany.sca.itest; - -/** - * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this - * interface. Implementation for these methods is provided in ABCDComponentImpl Class - */ -public interface ABCDComponent { - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABCDComponentImpl - */ - String getA(); - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABCDComponentImpl - */ - String getB(); - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABCDComponentImpl - */ - String getC(); - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABCDComponentImpl - */ - String getD(); -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java deleted file mode 100644 index c8d0d4cae4..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java +++ /dev/null @@ -1,73 +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 org.apache.tuscany.sca.itest; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; - -/** - * This class Implements the interface ABCDComponent and gives implementation for all methods which are declared in that - * interface. scope is specified as Composite using - * - * @scope annotation. - */ -@Scope("COMPOSITE") -public class ABCDComponentImpl implements ABCDComponent { - private ABComponent abComponent; - private CDComponent cdComponent; - - /** - * It is a method which injects the property value to the variable 'abComponent' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Reference - public void setAb(ABComponent component) { - this.abComponent = component; - } - - /** - * It is a method which injects the property value to the variable 'cdComponent' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Reference - public void setCd(CDComponent component) { - this.cdComponent = component; - } - - public String getA() { - return this.abComponent.getA(); - } - - public String getB() { - return this.abComponent.getB(); - } - - public String getC() { - return this.cdComponent.getC(); - } - - public String getD() { - return this.cdComponent.getD(); - } -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java deleted file mode 100644 index b727935bc1..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java +++ /dev/null @@ -1,75 +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 org.apache.tuscany.sca.itest; - -import java.util.Collection; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this - * interface. Implementation for these methods is provided in ABComponentImpl Class - */ -@Remotable -public interface ABComponent { - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABComponentImpl - */ - - String getA(); - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABComponentImpl - */ - String getB(); - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABComponentImpl - */ - String getZ(); - - /** - * This is a method to get an integer property value from the SCA runtime environment. It is implemented in the - * class ABComponentImpl - */ - int getIntValue(); - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABComponentImpl - */ - String getF(); - - /** - * This is a method to get collection of property values from the SCA runtime environment. It is implemented in the - * class ABComponentImpl - */ - Collection<String> getManyStringValues(); - - /** - * This is a method to get collection of property value from the SCA runtime environment. It is implemented in the - * class ABComponentImpl - */ - Collection<Integer> getManyIntegers(); -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java deleted file mode 100644 index e402131ce2..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java +++ /dev/null @@ -1,131 +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 org.apache.tuscany.sca.itest; - -import java.util.Collection; - -import org.oasisopen.sca.annotation.Property; - -/** - * This class Implements the interface ABComponent and gives implementation for all methods which are declared in that - * interface. - */ - -public class ABComponentImpl implements ABComponent { - - private String aProperty; - private String bProperty; - private int intValue; - private Collection<String> manyStringValues; - private Collection<Integer> manyIntegerValues; - private String zProperty; - private String fProperty; - - /** - * It is a method which injects the property value to the variable 'zProperty' from the SCA runtime environment - * using Annotations. - */ - @Property(name = "xpath") - public void setZProperty(final String value) { - this.zProperty = value; - } - - /** - * It is a method which injects collection of property values to the variable 'manyStringValues' from the SCA - * runtime environment using Annotations. - */ - @Property(name = "foobar") - public void setManyStringValues(final Collection<String> value) { - this.manyStringValues = value; - } - - /** - * It is a method which injects collection of integer property values to the variable 'manyIntegerValues' from the - * SCA runtime environment using Annotations. - */ - @Property(name = "fooInts") - public void setManyIntegers(final Collection<Integer> value) { - this.manyIntegerValues = value; - } - - /** - * It is a method which injects the property value to the variable 'aProperty' from the SCA runtime environment - * using Annotations. - */ - @Property - public void setA(final String A) { - this.aProperty = A; - } - - /** - * It is a method which injects the property value to the variable 'bProperty' from the SCA runtime environment - * using Annotations. - */ - @Property - public void setB(final String B) { - this.bProperty = B; - } - - /** - * It is a method which injects the property value to the variable 'fProperty' from the SCA runtime environment - * using Annotations. - */ - @Property - public void setF(final String F) { - this.fProperty = F; - } - - /** - * It is a method which injects integer property value to the variable 'intValue' from the SCA runtime environment - * using Annotations. - */ - @Property - public void setOne(final int value) { - this.intValue = value; - } - - public String getA() { - return this.aProperty; - } - - public String getB() { - return this.bProperty; - } - - public int getIntValue() { - return this.intValue; - } - - public String getZ() { - return this.zProperty; - } - - public String getF() { - return this.fProperty; - } - - public Collection<String> getManyStringValues() { - return manyStringValues; - } - - public Collection<Integer> getManyIntegers() { - return manyIntegerValues; - } -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java deleted file mode 100644 index 52f9871d1b..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java +++ /dev/null @@ -1,71 +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 org.apache.tuscany.sca.itest; - -import java.util.Collection; - -/** - * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this - * interface. Implementation for these methods is provided in CDComponentImpl Class - */ -public interface CDComponent { - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - String getC(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - String getC2(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - String getD(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - String getNoSource(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - String getFileProperty(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - Collection<String> getManyValuesFileProperty(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - int getOverrideValue(); -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java deleted file mode 100644 index fceda9d9ae..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java +++ /dev/null @@ -1,143 +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 org.apache.tuscany.sca.itest; - -import java.util.Collection; - -import org.oasisopen.sca.annotation.Property; - -/** - * This class Implements the interface CDComponent and gives implementation for all methods which are declared in that - * interface. - */ -public class CDComponentImpl implements CDComponent { - - private String cProperty; - private String dProperty; - private String nosource; - private String fileProperty; - private Collection<String> manyValuesFileProperty; - private int overrideNumber; - private String cProperty2; - - /** - * It is a method which injects the property value to the variable 'cProperty2' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Property(name = "nonFileProperty") - public void setC2(final String value) { - this.cProperty2 = value; - } - - /** - * It is a method which injects the property value to the variable 'overrideNumber' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Property(name = "two") - public void setOverrideNumber(final int value) { - this.overrideNumber = value; - } - - /** - * It is a method which injects the property value to the variable 'fileProperty' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Property(name = "fileProperty") - public void setFileProp(final String value) { - this.fileProperty = value; - } - - /** - * It is a method which injects the property value to the variable 'manyValuesFileProperty' from the SCA runtime - * environment using - * - * @Property Annotations. - */ - @Property(name = "manyValuesFileProperty") - public void setFileManyValueProp(final Collection<String> values) { - this.manyValuesFileProperty = values; - } - - /** - * It is a method which injects the property value to the variable 'cProperty' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Property - public void setC(final String C) { - this.cProperty = C; - } - - /** - * It is a method which injects the property value to the variable 'dProperty' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Property - public void setD(final String D) { - this.dProperty = D; - } - - /** - * It is a method which injects the property value to the variable 'nosource' from the SCA runtime environment using - * - * @Property Annotations. - */ - @Property - public void setNosource(final String value) { - this.nosource = value; - } - - public String getFileProperty() { - return this.fileProperty; - } - - public String getC() { - return this.cProperty; - } - - public String getC2() { - return this.cProperty2; - } - - public String getD() { - return this.dProperty; - } - - public String getNoSource() { - return this.nosource; - } - - public int getOverrideValue() { - return this.overrideNumber; - } - - public Collection<String> getManyValuesFileProperty() { - return this.manyValuesFileProperty; - } -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java deleted file mode 100644 index 1642ab55f5..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java +++ /dev/null @@ -1,151 +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 org.apache.tuscany.sca.itest; - -/** - * This is a Java Bean which has setter and getter methods for for the variables used in the property tests. - */ -public class ComplexPropertyBean { - - /** - * Variable declarations - */ - protected int integerNumber = 25; - protected float floatNumber = 50; - protected double doubleNumber = 75; - protected int[] intArray = null; - protected double[] doubleArray = null; - protected String[] stringArray = null; - - ComplexPropertyBean numberSet; - protected ComplexPropertyBean[] numberSetArray = null; - - public ComplexPropertyBean() { - - } - - public double getDoubleNumber() { - return doubleNumber; - } - - /** - * It is a setter method to set a value for the variable doubleNumber - */ - public void setDoubleNumber(double doubleNumber) { - this.doubleNumber = doubleNumber; - } - - /** - * It is a getter method to get a value for the variable floatNumber - */ - public float getFloatNumber() { - return floatNumber; - } - - /** - * It is a setter method to set a value for the variable floatNumber - */ - public void setFloatNumber(float floatNumber) { - this.floatNumber = floatNumber; - } - - /** - * It is a getter method to get a value for the variable floatNumber - */ - public int getIntegerNumber() { - return integerNumber; - } - - /** - * It is a getter method to get a value for the variable integerNumber - */ - public void setIntegerNumber(int integerNumber) { - this.integerNumber = integerNumber; - } - - /** - * It is a getter method to set a value for the variable numberSet - */ - public ComplexPropertyBean getNumberSet() { - return numberSet; - } - - /** - * It is a setter method to set a value for the variable numberSet - */ - public void setNumberSet(ComplexPropertyBean numberSet) { - this.numberSet = numberSet; - } - - /** - * It is a method which implements toString() function - */ - - public String toString() { - return Double.toString(integerNumber) + " - " - + Double.toString(floatNumber) - + " - " - + Double.toString(doubleNumber) - + " \n" - + ((intArray == null) ? "" : intArray[0] + " - " + intArray[1] + " \n ") - + ((doubleArray == null) ? "" : doubleArray[0] + " - " + doubleArray[1] + " \n ") - + ((stringArray == null) ? "" : stringArray[0] + " - " + stringArray[1] + " \n ") - + ((numberSetArray == null) ? "" : numberSetArray[0] + " - " + numberSetArray[1] + " \n ") - + ((numberSet == null) ? "" : numberSet.toString()); - } - - /** - * It is a setter method to set values for the variable stringArray - */ - public String[] getStringArray() { - return stringArray; - } - - /** - * It is a setter method to set values for the variable stringArray - */ - public void setStringArray(String[] stringArray) { - this.stringArray = stringArray; - } - - public int[] getIntArray() { - return intArray; - } - - public void setIntArray(int[] intArray) { - this.intArray = intArray; - } - - public double[] getDoubleArray() { - return doubleArray; - } - - public void setDoubleArray(double[] doubleArray) { - this.doubleArray = doubleArray; - } - - public ComplexPropertyBean[] getNumberSetArray() { - return numberSetArray; - } - - public void setNumberSetArray(ComplexPropertyBean[] numberSetArray) { - this.numberSetArray = numberSetArray; - } -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java deleted file mode 100644 index acd1f26670..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java +++ /dev/null @@ -1,27 +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 org.apache.tuscany.sca.itest; - -/** - * This is an Interface for the services - */ -public interface OverrideService { - -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java deleted file mode 100644 index 71dce41efc..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.itest; - -/** - * An implementation for the interface OverrideService. - */ - -public class OverrideServiceImpl implements OverrideService { - -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java deleted file mode 100644 index 9c7e8c3447..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java +++ /dev/null @@ -1,114 +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 org.apache.tuscany.sca.itest; - -import java.util.Collection; - -import test.jaxb.props.ReturnCodeProperties; - -/** - * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this - * interface. Implementation for these methods is provided in PropertyComponentImpl Class - */ -public interface PropertyComponent { - - /** - * This is a method to get a value for a property name 'location' from the SCA runtime environment. It is - * implemented in the class PropertyComponentImpl - */ - public String getLocation(); - - /** - * This is a method to get a value for a property name 'year' from the SCA runtime environment. It is implemented in - * the class PropertyComponentImpl - */ - public String getYear(); - - /** - * This method is used to test injecting a primitive String Array - * - * @return The injected array - */ - public String[] getDaysOfTheWeek(); - - /** - * This method is used to test injecting an Object Integer Array - * - * @return The injected array - */ - public Integer[] getIntegerNumbers(); - - /** - * This method is used to test injecting an int Array - * - * @return The injected array - */ - public int[] getIntNumbers(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - - public ComplexPropertyBean getComplexPropertyOne(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - public ComplexPropertyBean getComplexPropertyTwo(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - public ComplexPropertyBean getComplexPropertyThree(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - public Collection<ComplexPropertyBean> getComplexPropertyFour(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - - public ComplexPropertyBean getComplexPropertyFive(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - public ReturnCodeProperties getComplexJAXBPropertyOne(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - public ReturnCodeProperties getComplexJAXBPropertyTwo(); - - /** - * @return - */ - public String getLocationFromComponentContext(); - -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java deleted file mode 100644 index 64ca749e9f..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java +++ /dev/null @@ -1,144 +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 org.apache.tuscany.sca.itest; - -import java.util.Collection; - -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Property; - -import test.jaxb.props.ReturnCodeProperties; - -/** - * This class Implements the interface PropertyComponent and gives implementation for all methods which are declared in - * that interface. - */ -public class PropertyComponentImpl implements PropertyComponent { - @Context - protected ComponentContext context; - - @Property - protected ComplexPropertyBean complexPropertyOne; - - @Property - protected ComplexPropertyBean complexPropertyTwo; - - @Property - protected ComplexPropertyBean complexPropertyThree; - - @Property - protected Collection<ComplexPropertyBean> complexPropertyFour; - - @Property - protected ComplexPropertyBean complexPropertyFive; - - @Property(name = "location") - protected String location; - - @Property(name = "year") - protected String year; - - @Property(name = "daysOfTheWeek") - protected String[] daysOfTheWeek; - - @Property(name = "integerNumbers") - protected Integer[] integerNumbers; - - @Property(name = "intNumbers") - protected int[] intNumbers; - - @Property - protected ReturnCodeProperties complexJAXBPropertyOne; - - @Property - protected ReturnCodeProperties complexJAXBPropertyTwo; - - public String getLocation() { - return location; - } - - public String getYear() { - return year; - } - - public ComplexPropertyBean getComplexPropertyOne() { - //System.out.println(complexPropertyOne); - return complexPropertyOne; - } - - public ComplexPropertyBean getComplexPropertyTwo() { - //System.out.println(complexPropertyTwo); - return complexPropertyTwo; - } - - public ComplexPropertyBean getComplexPropertyThree() { - //System.out.println(complexPropertyThree); - return complexPropertyThree; - } - - public Collection<ComplexPropertyBean> getComplexPropertyFour() { - //System.out.println(complexPropertyThree); - return complexPropertyFour; - } - - public ComplexPropertyBean getComplexPropertyFive() { - return complexPropertyFive; - } - - /** - * This method is used to test injecting an Array - * - * @return The injected array - */ - public String[] getDaysOfTheWeek() { - return daysOfTheWeek; - } - - /** - * This method is used to test injecting an Object Integer Array - * - * @return The injected array - */ - public Integer[] getIntegerNumbers() { - return integerNumbers; - } - - /** - * This method is used to test injecting an int Array - * - * @return The injected array - */ - public int[] getIntNumbers() { - return intNumbers; - } - - public String getLocationFromComponentContext() { - return context.getProperty(String.class, "location"); - } - - public ReturnCodeProperties getComplexJAXBPropertyOne() { - return complexJAXBPropertyOne; - } - - public ReturnCodeProperties getComplexJAXBPropertyTwo() { - return complexJAXBPropertyTwo; - } -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java deleted file mode 100644 index a57ccd90c8..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java +++ /dev/null @@ -1,27 +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 org.apache.tuscany.sca.itest; - -/** - * This is an Interface for the services. - */ -public interface PropertyService { - -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java deleted file mode 100644 index c147a2affe..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java +++ /dev/null @@ -1,23 +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 org.apache.tuscany.sca.itest.cdi; - -public interface Bar { - public String getBar(); -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java deleted file mode 100644 index 7c700903d6..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java +++ /dev/null @@ -1,39 +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 org.apache.tuscany.sca.itest.cdi; - -import org.oasisopen.sca.annotation.Constructor; -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -@Service(Bar.class) -public class Foo1 implements Bar { - - @Property - protected String bar; - - @Constructor( {"bar"}) - public Foo1(String b) { - this.bar = b; - } - - public String getBar() { - return this.bar; - } -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java deleted file mode 100644 index 1d2e563095..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java +++ /dev/null @@ -1,39 +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 org.apache.tuscany.sca.itest.cdi; - -import org.oasisopen.sca.annotation.Constructor; -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -@Service(Bar.class) -public class Foo2 implements Bar { - - protected String bar; - - @Constructor - public Foo2(@Property(name = "bar") String b) { - this.bar = b; - } - - public String getBar() { - return this.bar; - } - -} diff --git a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java b/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java deleted file mode 100644 index 54082e297a..0000000000 --- a/java/sca/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java +++ /dev/null @@ -1,44 +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 org.apache.tuscany.sca.itest.cdi; - -import org.oasisopen.sca.annotation.Constructor; -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -@Service(Bar.class) -public class Foo3 implements Bar { - - protected String bar; - - @Constructor - public Foo3() { - this.bar = "bar"; - } - - public String getBar() { - return this.bar; - } - - @Property(name = "bar") - public void setBar(String b) { - this.bar = b; - } - -} diff --git a/java/sca/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java b/java/sca/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java deleted file mode 100644 index 15fb49ea4e..0000000000 --- a/java/sca/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java +++ /dev/null @@ -1,75 +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. - */ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 -// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2008.06.07 at 03:30:47 PM EDT -// -package test.jaxb.props; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.namespace.QName; - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the test.jaxb.props package. - * <p>An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private final static QName _MyRCProps_QNAME = new QName("http://test.sca.jaxb/rcprops", "MyRCProps"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: test.jaxb.props - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link ReturnCodeProperties } - * - */ - public ReturnCodeProperties createReturnCodeProperties() { - return new ReturnCodeProperties(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link ReturnCodeProperties }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://test.sca.jaxb/rcprops", name = "MyRCProps") - public JAXBElement<ReturnCodeProperties> createMyRCProps(ReturnCodeProperties value) { - return new JAXBElement<ReturnCodeProperties>(_MyRCProps_QNAME, ReturnCodeProperties.class, null, value); - } - -} diff --git a/java/sca/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java b/java/sca/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java deleted file mode 100644 index 0a1d4a34a3..0000000000 --- a/java/sca/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java +++ /dev/null @@ -1,103 +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. - */ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 -// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2008.06.07 at 03:30:47 PM EDT -// -package test.jaxb.props; - -import java.math.BigInteger; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * <p>Java class for ReturnCodeProperties complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ReturnCodeProperties"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="AInt" type="{http://www.w3.org/2001/XMLSchema}int"/> - * <element name="BInteger" type="{http://www.w3.org/2001/XMLSchema}integer"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ReturnCodeProperties", namespace = "http://test.sca.jaxb/rcprops", propOrder = {"a", "b"}) -public class ReturnCodeProperties { - - @XmlElement(name = "AInt") - protected int a; - @XmlElement(name = "BInteger", required = true) - protected BigInteger b; - - /** - * Gets the value of the a property. - * - */ - public int getA() { - return a; - } - - /** - * Sets the value of the a property. - * - */ - public void setA(int value) { - this.a = value; - } - - /** - * Gets the value of the b property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getB() { - return b; - } - - /** - * Sets the value of the b property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setB(BigInteger value) { - this.b = value; - } - -} diff --git a/java/sca/itest/properties/src/main/java/test/jaxb/props/package-info.java b/java/sca/itest/properties/src/main/java/test/jaxb/props/package-info.java deleted file mode 100644 index 6a6fdd00cc..0000000000 --- a/java/sca/itest/properties/src/main/java/test/jaxb/props/package-info.java +++ /dev/null @@ -1,27 +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. - */ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 -// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2008.06.07 at 03:30:47 PM EDT -// -@javax.xml.bind.annotation.XmlSchema(namespace = "http://test.sca.jaxb/rcprops", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package test.jaxb.props; - diff --git a/java/sca/itest/properties/src/main/resources/ConstructorPropertyInjection.composite b/java/sca/itest/properties/src/main/resources/ConstructorPropertyInjection.composite deleted file mode 100644 index 7e3b2b35f0..0000000000 --- a/java/sca/itest/properties/src/main/resources/ConstructorPropertyInjection.composite +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" targetNamespace="http://foo" name="ConstructorPropertyInjection"> - - <component name="Foo1Component"> - <implementation.java class="org.apache.tuscany.sca.itest.cdi.Foo1" /> - <property name="bar" value="foobar" /> - </component> - - <component name="Foo2Component"> - <implementation.java class="org.apache.tuscany.sca.itest.cdi.Foo2" /> - <property name="bar">fubar</property> - </component> - - <component name="Foo3Component"> - <implementation.java class="org.apache.tuscany.sca.itest.cdi.Foo3" /> - <property name="bar"> - <value>fubar</value> - </property> - </component> - -</composite>
\ No newline at end of file diff --git a/java/sca/itest/properties/src/main/resources/Outer.composite b/java/sca/itest/properties/src/main/resources/Outer.composite deleted file mode 100644 index 5e767b1e0e..0000000000 --- a/java/sca/itest/properties/src/main/resources/Outer.composite +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<composite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:foo="http://foo" xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xsi:schemaLocation="http://docs.oasis-open.org/ns/opencsa/sca/200903 http://docs.oasis-open.org/ns/opencsa/sca/200903" name="Iteration3Composite" - targetNamespace="http://foo" local="true" autowire="false"> - - <property name="newLocation" type="xsd:anyURI">Raleigh</property> - <property name="newYear" type="xsd:anyURI">2008</property> - <component name="MyServiceComponent"> - <implementation.java class="mysca.test.myservice.impl.MyServiceImpl" /> - </component> - <component name="MyServiceComponentNew"> - <implementation.java class="mysca.test.myservice.impl.MyServiceImpl" /> - <property name="location" source="$newLocation" /> - <property name="year" source="$newYear" /> - </component> - <component name="MyTotalServiceNewComponent"> - <implementation.java class="mysca.test.myservice.impl.MyTotalServiceImpl" /> - <reference name="myService" target="MyServiceComponentNew/MyService" /> - </component> - <component name="MySimpleServiceInRecursiveAnother"> - <implementation.composite name="foo:MySimpleService" /> - <property name="newLocation">Durham</property> - <property name="newYear">2009</property> - </component> -</composite> diff --git a/java/sca/itest/properties/src/main/resources/OuterPropertyTest.composite b/java/sca/itest/properties/src/main/resources/OuterPropertyTest.composite deleted file mode 100644 index fd181bfcaa..0000000000 --- a/java/sca/itest/properties/src/main/resources/OuterPropertyTest.composite +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="OuterPropertyTest"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
- <component name="OuterComponent">
- <implementation.composite name="foo:PropertyTest" />
- <property name="number">125</property>
- <property name="complex" type="foo:MyComplexType">
- <value xsi:type="foo:MyComplexType">
- <foo:a>Overriden A</foo:a>
- <foo:b>Overriden B</foo:b>
- <foo:c>Overriden C</foo:c>
- <foo:d>Overriden D</foo:d>
- <foo:x>
- <foo:y>Overriden Y</foo:y>
- <foo:z>Overriden Z</foo:z>
- </foo:x>
- </value>
- </property>
- </component>
-</composite>
-
diff --git a/java/sca/itest/properties/src/main/resources/PropertyTest.composite b/java/sca/itest/properties/src/main/resources/PropertyTest.composite deleted file mode 100644 index 36f75d52a1..0000000000 --- a/java/sca/itest/properties/src/main/resources/PropertyTest.composite +++ /dev/null @@ -1,260 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:foo="http://foo" - xmlns:cust="http://www.example.com/Customer" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:rcp="http://test.sca.jaxb/rcprops" - targetNamespace="http://foo" - name="PropertyTest" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - - <service name="ProperterTestService" promote="ABComponent"> - <interface.java interface="org.apache.tuscany.sca.itest.ABComponent"/> - </service> - - <property name="number" type="xsd:int">1</property> - <property name="complex" type="foo:MyComplexType" > - <value xsi:type="foo:MyComplexType" > - <foo:a>a</foo:a> - <foo:b>b</foo:b> - <foo:c>c</foo:c> - <foo:d>d</foo:d> - <foo:x> - <foo:y>y</foo:y> - <foo:z>z</foo:z> - </foo:x> - </value> - </property> - - <property name="moreComplex" type="foo:MyMoreComplexType"> - <value> - <numberSetArray> - <integerNumber>1</integerNumber> - <floatNumber>11</floatNumber> - <doubleNumber>111</doubleNumber> - </numberSetArray> - <numberSetArray> - <integerNumber>2</integerNumber> - <floatNumber>22</floatNumber> - <doubleNumber>222</doubleNumber> - </numberSetArray> - <stringArray>TestString_1</stringArray> - <stringArray>TestString_2</stringArray> - <intArray>10</intArray> - <intArray>20</intArray> - <integerNumber>27</integerNumber> - <floatNumber>79.34</floatNumber> - <doubleNumber>184.52</doubleNumber> - <doubleArray>50.05</doubleArray> - <doubleArray>25.52</doubleArray> - <numberSet> - <integerNumber>54</integerNumber> - <floatNumber>158.68</floatNumber> - <doubleNumber>369.04</doubleNumber> - </numberSet> - </value> - </property> - - <property name="complexFoo" type="foo:MyMoreComplexType"> - <value> - <stringArray>TestString_3</stringArray> - <stringArray>TestString_4</stringArray> - <intArray>100</intArray> - <intArray>200</intArray> - </value> - </property> - - <component name="ABCDComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.ABCDComponentImpl"/> - <reference name="ab" target="ABComponent"/> - <reference name="cd" target="CDComponent"/> - </component> - - <component name="ABComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.ABComponentImpl"/> - <property name="a" source="$complex/foo:MyComplexValue/foo:a"/> - <property name="b" source="$complex/foo:MyComplexValue/foo:b"/> - <property name="f" source="$complex/foo:MyComplexValue/foo:a">f</property> - <property name="xpath" source="$complex/foo:MyComplexValue/foo:x/*[local-name()='z']"/> - <property name="one" source="$number"/> - <property name="foobar" many="true"> - <value>Apache</value> - <value>Tuscany</value> - <value>Java SCA</value> - </property> - <property name="fooInts" many="true"> - <value>123</value> - <value>456</value> - <value>789</value> - </property> - </component> - - - <component name="CDComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.CDComponentImpl"/> - <property name="c" source="$complex/foo:MyComplexValue/foo:c"/> - <property name="d" source="$complex/foo:MyComplexValue/foo:d"/> - <property name="nosource">aValue</property> - <property name="fileProperty" file="fileProperty.txt"/> - <property name="manyValuesFileProperty" many="true" file="manyValuesFileProperty.txt"/> - <property name="nonFileProperty" file="fileProperty.txt" source="$complex/foo:MyComplexValue/foo:c"/> - <property name="two" source="$number">25</property> - </component> - - <component name="PropertyComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.PropertyComponentImpl"/> - <property name="complexPropertyOne" source="$moreComplex"></property> - <property name="complexPropertyTwo"> - <value> - <stringArray>TestString_1</stringArray> - <stringArray>TestString_2</stringArray> - <intArray>10</intArray> - <integerNumber>27</integerNumber> - <floatNumber>79.34</floatNumber> - <doubleArray>25.52</doubleArray> - <doubleNumber>184.52</doubleNumber> - <doubleArray>50.05</doubleArray> - <intArray>20</intArray> - <numberSetArray> - <integerNumber>1</integerNumber> - <floatNumber>11</floatNumber> - <doubleNumber>111</doubleNumber> - </numberSetArray> - <numberSetArray> - <integerNumber>2</integerNumber> - <floatNumber>22</floatNumber> - <doubleNumber>222</doubleNumber> - </numberSetArray> - <numberSet> - <integerNumber>54</integerNumber> - <floatNumber>158.68</floatNumber> - <doubleNumber>369.04</doubleNumber> - </numberSet> - </value> - </property> - <property name="complexPropertyThree" element="foo:PropertyThreeElement"> - <PropertyThreeElement xmlns="http://foo"> - <stringArray>TestElementString_1</stringArray> - <stringArray>TestElementString_2</stringArray> - <intArray>10</intArray> - <integerNumber>27</integerNumber> - <floatNumber>79.34</floatNumber> - <doubleArray>25.52</doubleArray> - <doubleNumber>184.52</doubleNumber> - <doubleArray>50.05</doubleArray> - <intArray>20</intArray> - <numberSetArray> - <integerNumber>1</integerNumber> - <floatNumber>11</floatNumber> - <doubleNumber>111</doubleNumber> - </numberSetArray> - <numberSetArray> - <integerNumber>2</integerNumber> - <floatNumber>22</floatNumber> - <doubleNumber>222</doubleNumber> - </numberSetArray> - <numberSet> - <integerNumber>54</integerNumber> - <floatNumber>158.68</floatNumber> - <doubleNumber>369.04</doubleNumber> - </numberSet> - </PropertyThreeElement> - </property> - <property name="complexPropertyFour" element="foo:PropertyFourElement" many="true"> - <PropertyFourElement xmlns="http://foo"> - <integerNumber>1</integerNumber> - <floatNumber>11.11</floatNumber> - <doubleNumber>111.111</doubleNumber> - <numberSet> - <integerNumber>11</integerNumber> - <floatNumber>1111.1111</floatNumber> - <doubleNumber>11111.11111</doubleNumber> - </numberSet> - </PropertyFourElement> - <PropertyFourElement xmlns="http://foo"> - <integerNumber>2</integerNumber> - <floatNumber>22.22</floatNumber> - <doubleNumber>222.222</doubleNumber> - <numberSet> - <integerNumber>22</integerNumber> - <floatNumber>2222.2222</floatNumber> - <doubleNumber>22222.22222</doubleNumber> - </numberSet> - </PropertyFourElement> - <PropertyFourElement xmlns="http://foo"> - <integerNumber>3</integerNumber> - <floatNumber>33.33</floatNumber> - <doubleNumber>333.333</doubleNumber> - <numberSet> - <integerNumber>33</integerNumber> - <floatNumber>3333.3333</floatNumber> - <doubleNumber>33333.33333</doubleNumber> - </numberSet> - </PropertyFourElement> - </property> - <property name="complexPropertyFive" source="$complexFoo"/> - <property name="location" type="xsd:string">RTP</property> - <property name="year" type="xsd:string">2006</property> - <property name="daysOfTheWeek" many="true" type="xsd:string"> - <value>Monday</value> - <value>Tuesday</value> - <value>Wednesday</value> - <value>Thursday</value> - <value>Friday</value> - <value>Saturday</value> - <value>Sunday</value> - </property> - <property name="integerNumbers" many="true" type="xsd:int"> - <value>1</value> - <value>2</value> - <value>3</value> - <value>4</value> - <value>5</value> - <value>6</value> - <value>7</value> - <value>8</value> - <value>9</value> - <value>10</value> - </property> - <property name="intNumbers" many="true" type="xsd:int"> - <value>10</value> - <value>9</value> - <value>8</value> - <value>7</value> - <value>6</value> - <value>5</value> - <value>4</value> - <value>3</value> - <value>2</value> - <value>1</value> - <value>0</value> - </property> - - <property name="complexJAXBPropertyOne" type="rcp:ReturnCodeProperties"> - <MyRCProps xmlns="http://test.sca.jaxb/rcprops"> - <AInt>10</AInt> - <BInteger>10</BInteger> - </MyRCProps> - </property> - <property name="complexJAXBPropertyTwo" type="rcp:ReturnCodeProperties" file="rcProps.txt"/> - </component> -</composite> - - diff --git a/java/sca/itest/properties/src/main/resources/customer.xsd b/java/sca/itest/properties/src/main/resources/customer.xsd deleted file mode 100644 index 7421750f1b..0000000000 --- a/java/sca/itest/properties/src/main/resources/customer.xsd +++ /dev/null @@ -1,30 +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. ---> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns="http://www.example.com/Customer" targetNamespace="http://www.example.com/Customer"> - - <xsd:element name="customer" type="Customer"/> - <xsd:complexType name="Customer"> - <xsd:sequence> - <xsd:element name="firstName" type="xsd:string"/> - <xsd:element name="middleName" type="xsd:string"/> - <xsd:element name="lastName" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:schema> diff --git a/java/sca/itest/properties/src/main/resources/fileProperty.txt b/java/sca/itest/properties/src/main/resources/fileProperty.txt deleted file mode 100644 index 0d3d9ead83..0000000000 --- a/java/sca/itest/properties/src/main/resources/fileProperty.txt +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> - -<filePropertyTest>fileValue</filePropertyTest> diff --git a/java/sca/itest/properties/src/main/resources/manyValuesFileProperty.txt b/java/sca/itest/properties/src/main/resources/manyValuesFileProperty.txt deleted file mode 100644 index 6d4180ee2f..0000000000 --- a/java/sca/itest/properties/src/main/resources/manyValuesFileProperty.txt +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<manyFilePropertyValues>fileValueOne</<manyFilePropertyValues>
-<manyFilePropertyValues>fileValueTwo</<manyFilePropertyValues>
-<manyFilePropertyValues>fileValueThree</<manyFilePropertyValues>
-<manyFilePropertyValues>fileValueFour</<manyFilePropertyValues>
diff --git a/java/sca/itest/properties/src/main/resources/mySimpleService.composite b/java/sca/itest/properties/src/main/resources/mySimpleService.composite deleted file mode 100644 index 3cf25384e6..0000000000 --- a/java/sca/itest/properties/src/main/resources/mySimpleService.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite autowire="false" local="true" name="MySimpleService" - targetNamespace="http://foo" xmlns:foo="http://foo" xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://docs.oasis-open.org/ns/opencsa/sca/200903 http://docs.oasis-open.org/ns/opencsa/sca/200903 "> - - - <service name="MyServiceNew1" promote="MyServiceComponentNew/MyService"> - <interface.java interface="mysca.test.myservice.impl.MyService" /> - </service> - - <property name="newLocation" type="xsd:anyURI">Raleigh</property> - <property name="newYear" type="xsd:anyURI">2008</property> - - - <component name="MyServiceComponentNew"> - <implementation.java class="mysca.test.myservice.impl.MyServiceImpl" /> - <property name="location" source="$newLocation" /> - <property name="year" source="$newYear" /> - </component> - -</composite> diff --git a/java/sca/itest/properties/src/main/resources/rcProps.txt b/java/sca/itest/properties/src/main/resources/rcProps.txt deleted file mode 100644 index 052c291fd0..0000000000 --- a/java/sca/itest/properties/src/main/resources/rcProps.txt +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<MyRCProps xmlns="http://test.sca.jaxb/rcprops"> - <AInt>20</AInt> - <BInteger>20</BInteger> -</MyRCProps> diff --git a/java/sca/itest/properties/src/main/resources/rcprops.xsd b/java/sca/itest/properties/src/main/resources/rcprops.xsd deleted file mode 100644 index 21289fa7b2..0000000000 --- a/java/sca/itest/properties/src/main/resources/rcprops.xsd +++ /dev/null @@ -1,55 +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 - * 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. ---> -<schema elementFormDefault="qualified" targetNamespace="http://test.sca.jaxb/rcprops" - xmlns:tns="http://test.sca.jaxb/rcprops" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0" - xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - - - <!-- Use some JAXB customizations --> - - <annotation> - <appinfo> - <jaxb:schemaBindings> - <jaxb:package name="test.jaxb.props" /> - </jaxb:schemaBindings> - </appinfo> - </annotation> - - <element name="MyRCProps" type="tns:ReturnCodeProperties" /> - - <complexType name="ReturnCodeProperties"> - <sequence> - <element name="AInt" type="xsd:int"> - <annotation> - <appinfo> - <jaxb:property name="a" /> - </appinfo> - </annotation> - </element> - <element name="BInteger" type="xsd:integer"> - <annotation> - <appinfo> - <jaxb:property name="b" /> - </appinfo> - </annotation> - </element> - </sequence> - </complexType> -</schema> - - diff --git a/java/sca/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java b/java/sca/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java deleted file mode 100644 index efc635c72b..0000000000 --- a/java/sca/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java +++ /dev/null @@ -1,104 +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 org.apache.tuscany.sca.itest; - -import static org.junit.Assert.assertEquals; -import mysca.test.myservice.impl.MyService; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class MyTotalServiceTestCase { - private static MyService service1; - private static MyService service2; - private static MyService service3; - - private static Node node; - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the local - * property variables defined in the implementation file with the expected values 'RTP' and '2006' - */ - @Test - public void testPropertyDefault() { - assertEquals("RTP", service1.getLocation()); - assertEquals("2006", service1.getYear()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using service2 from the SCA runtime environment with the expected values 'Raleigh' - * and '2008'. This overrides the local property values - */ - @Test - public void testPropertyOverride() { - assertEquals("Raleigh", service2.getLocation()); - assertEquals("2008", service2.getYear()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using service3 from the SCA runtime environment with the expected values 'Durham' - * and '2009' - */ - @Test - public void testPropertyNestedOverride() { - assertEquals("Durham", service3.getLocation()); - assertEquals("2009", service3.getYear()); - } - - /** - * Method annotated with - * - * @BeforeClass is used for one time set Up, it executes before every tests. This method is used to create a test - * Embedded SCA node, to start the SCA node and to get a reference to the 'outerABService' service - */ - @BeforeClass - public static void setUp() throws Exception { - - String location = ContributionLocationHelper.getContributionLocation("Outer.composite"); - node = NodeFactory.newInstance().createNode("Outer.composite", new Contribution("c1", location)); - node.start(); - service1 = node.getService(MyService.class, "MyServiceComponent/MyService"); - service2 = node.getService(MyService.class, "MyServiceComponentNew/MyService"); - service3 = node.getService(MyService.class, "MySimpleServiceInRecursiveAnother"); - } - - /** - * Method annotated with - * - * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the - * node, close any previously opened connections etc - */ - @AfterClass - public static void tearDown() { - node.stop(); - } -} diff --git a/java/sca/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java b/java/sca/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java deleted file mode 100644 index 0906a45ab3..0000000000 --- a/java/sca/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java +++ /dev/null @@ -1,169 +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 org.apache.tuscany.sca.itest; - -import static org.junit.Assert.assertEquals; - -import java.util.Iterator; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This is a class which makes user of JUnit Framework, all tests are written using JUnit notation. These tests are used - * to test different property values returned from the SCA Runtime Environment which is initialized with the composite - * 'OuterPropertyTest.composite'. It basically tests the Simple type of property and Complex type of property from the - * SCA Runtime Environment. - */ -public class OuterPropertyTestCase { - - private static Node node; - private static ABComponent outerABService; - - /** - * Method annotated with - * - * @BeforeClass is used for one time set Up, it executes before every tests. This method is used to create a test - * Embedded SCA node, to start the SCA node and to get a reference to the 'outerABService' service - */ - @BeforeClass - public static void init() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("OuterPropertyTest.composite"); - node = NodeFactory.newInstance().createNode("OuterPropertyTest.composite", new Contribution("c1", location)); - node.start(); - outerABService = node.getService(ABComponent.class, "OuterComponent"); - } - - /** - * Method annotated with - * - * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the - * node, close any previously opened connections etc - */ - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'Overriden - * A' - */ - @Test - public void testOverridenA() { - assertEquals("Overriden A", outerABService.getA()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'Overriden - * B' - */ - @Test - public void testOverridenB() { - assertEquals("Overriden B", outerABService.getB()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'Overriden - * A' - */ - @Test - public void testOverridenF() { - assertEquals("Overriden A", outerABService.getF()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'Overriden - * Z' - */ - @Test - public void testOverridenZ() { - assertEquals("Overriden Z", outerABService.getZ()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 125 - */ - @Test - public void testOverridenIntValue() { - assertEquals(125, outerABService.getIntValue()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 125 - */ - @Test - public void testDefaultValue() { - assertEquals(125, outerABService.getIntValue()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 'Apache' , - * 'Tuscany' and 'Java SCA' respectively . - */ - @Test - public void testManySimpleStringValues() { - Iterator<String> iterator = outerABService.getManyStringValues().iterator(); - assertEquals("Apache", iterator.next()); - assertEquals("Tuscany", iterator.next()); - assertEquals("Java SCA", iterator.next()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 123, 456 - * and 789 - */ - @Test - public void testManySimpleIntegerValues() { - Iterator<Integer> iterator = outerABService.getManyIntegers().iterator(); - assertEquals(123, iterator.next().intValue()); - assertEquals(456, iterator.next().intValue()); - assertEquals(789, iterator.next().intValue()); - } -} diff --git a/java/sca/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java b/java/sca/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java deleted file mode 100644 index eb217600db..0000000000 --- a/java/sca/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java +++ /dev/null @@ -1,422 +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 org.apache.tuscany.sca.itest; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.math.BigInteger; -import java.util.Arrays; -import java.util.Iterator; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import test.jaxb.props.ReturnCodeProperties; - -/** - * This is a class which makes user of JUnit Framework, all tests are written using JUnit notation. These tests are used - * to test different property values returned from the SCA Runtime Environment which is initialized with the composite - * 'PropertyTest.composite'. It basically tests all types of property values returned from SCA runtime environment. - */ -public class PropertyTestCase { - private static Node node; - private static ABComponent abService; - private static CDComponent cdService; - private static ABCDComponent abcdService; - private static PropertyComponent propertyService; - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'a' - */ - @Test - public void testA() { - assertEquals("a", abService.getA()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'b' - */ - @Test - public void testB() { - assertEquals("b", abService.getB()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'c' - */ - @Test - public void testC() { - assertEquals("c", cdService.getC()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'c' - */ - @Test - public void testC2() { - assertEquals("c", cdService.getC2()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'd' - */ - @Test - public void testD() { - assertEquals("d", cdService.getD()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'a' - */ - @Test - public void testF() { - assertEquals("a", abService.getF()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'z' - */ - @Test - public void testZ() { - assertEquals("z", abService.getZ()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 1. - */ - @Test - public void testIntValue() { - assertEquals(1, abService.getIntValue()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 1. - */ - @Test - public void testDefaultValue() { - assertEquals(1, abService.getIntValue()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 1. - */ - @Test - public void testDefaultValueOverride() { - assertEquals(1, cdService.getOverrideValue()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'aValue' - */ - @Test - public void testNoSource() { - assertEquals("aValue", cdService.getNoSource()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value - * 'fileValue' - */ - @Test - public void testFileProperty() { - assertEquals("fileValue", cdService.getFileProperty()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 4 and - * 'fileValueTwo' respectively. - */ - @Test - public void testManyValuesFileProperty() { - Iterator<String> iterator = cdService.getManyValuesFileProperty().iterator(); - iterator.next(); - String secondValue = iterator.next(); - assertEquals(4, cdService.getManyValuesFileProperty().size()); - assertEquals("fileValueTwo", secondValue); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 'a' , - * 'b', 'c' and 'd' respectively. - */ - @Test - public void testABCD() { - assertEquals("a", abcdService.getA()); - assertEquals("b", abcdService.getB()); - assertEquals("c", abcdService.getC()); - assertEquals("d", abcdService.getD()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 'RTP' - * and '2006' respectively - */ - @Test - public void testDefaultProperty() { - assertEquals("RTP", propertyService.getLocation()); - assertEquals("2006", propertyService.getYear()); - - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 'Apache' , - * 'Tuscany' and 'Java SCA' respectively . - */ - @Test - public void testManySimpleStringValues() { - Iterator<String> iterator = abService.getManyStringValues().iterator(); - assertEquals("Apache", iterator.next()); - assertEquals("Tuscany", iterator.next()); - assertEquals("Java SCA", iterator.next()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 123, 456 - * and 789 respectively. - */ - @Test - public void testManySimpleIntegerValues() { - Iterator<Integer> iterator = abService.getManyIntegers().iterator(); - assertEquals(123, iterator.next().intValue()); - assertEquals(456, iterator.next().intValue()); - assertEquals(789, iterator.next().intValue()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values - * 'TestString_1' and 2 respectively. - */ - @Test - public void testComplexPropertyOne() { - ComplexPropertyBean propBean = propertyService.getComplexPropertyOne(); - assertNotNull(propBean); - assertEquals("TestString_1", propBean.getStringArray()[0]); - assertEquals(2, propBean.numberSetArray[1].integerNumber); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected integer number - * and a float number - */ - @Test - public void testComplexPropertyTwo() { - ComplexPropertyBean propBean = propertyService.getComplexPropertyTwo(); - assertNotNull(propBean); - assertEquals(10, propBean.intArray[0]); - assertEquals((float)22, propBean.numberSetArray[1].floatNumber); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected value first - * element in the string array and the float number - */ - @Test - public void testComplexPropertyThree() { - ComplexPropertyBean propBean = propertyService.getComplexPropertyThree(); - assertNotNull(propBean); - assertEquals("TestElementString_1", propBean.stringArray[0]); - assertEquals((float)22, propBean.numberSetArray[1].floatNumber); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * complex property value obtained using a service from the SCA runtime environment with the expected values - * 1, 222.222 and 33 respectively. - */ - @Test - public void testComplexPropertyFour() { - Object[] propBeanCollection = propertyService.getComplexPropertyFour().toArray(); - assertNotNull(propBeanCollection); - assertEquals(1, ((ComplexPropertyBean)propBeanCollection[0]).getIntegerNumber()); - assertEquals(222.222, ((ComplexPropertyBean)propBeanCollection[1]).getDoubleNumber()); - assertEquals(33, ((ComplexPropertyBean)propBeanCollection[2]).getNumberSet().getIntegerNumber()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values - * 'TestString_3', 'TestString_4', 100 and 200. - */ - @Test - public void testComplexPropertyFive() { - ComplexPropertyBean propBean = propertyService.getComplexPropertyFive(); - assertNotNull(propBean); - assertEquals("TestString_3", propBean.getStringArray()[0]); - assertEquals("TestString_4", propBean.getStringArray()[1]); - assertEquals(100, propBean.getIntArray()[0]); - assertEquals(200, propBean.getIntArray()[1]); - } - - @Test - public void testGetLocationFromComponentContext() { - String location = propertyService.getLocation(); - assertNotNull(location); - String locationFromCC = propertyService.getLocationFromComponentContext(); - assertNotNull(locationFromCC); - assertEquals(location, locationFromCC); - } - - @Test - public void testGetInjectedStringArrayProperty() { - String[] daysOfWeek = propertyService.getDaysOfTheWeek(); - assertNotNull(daysOfWeek); - - String[] expected = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}; - Assert.assertTrue(Arrays.equals(expected, daysOfWeek)); - } - - @Test - public void testGetInjectedIntegerArrayProperty() { - Integer[] numbers = propertyService.getIntegerNumbers(); - assertNotNull(numbers); - - Integer[] expected = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - Assert.assertTrue(Arrays.equals(expected, numbers)); - } - - @Test - public void testGetInjectedIntArrayProperty() { - int[] numbers = propertyService.getIntNumbers(); - assertNotNull(numbers); - - int[] expected = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; - Assert.assertTrue(Arrays.equals(expected, numbers)); - } - - @Test - public void testComplexJAXBProperty() { - ReturnCodeProperties rc = propertyService.getComplexJAXBPropertyOne(); - assertEquals(10, rc.getA()); - assertEquals(new BigInteger("10"), rc.getB()); - } - - @Test - public void testComplexJAXBPropertyFromFile() { - ReturnCodeProperties rc = propertyService.getComplexJAXBPropertyTwo(); - System.out.println("SKSK: a =" + rc.getA()); - System.out.println("SKSK: b =" + rc.getB()); - assertEquals(20, rc.getA()); - assertEquals(new BigInteger("20"), rc.getB()); - } - - /** - * Method annotated with - * - * @BeforeClass is used for one time set Up, it executes before every tests. This method is used to create a test - * Embedded SCA node, to start the SCA node and to get a reference to 4 services namely 'abService' - * service, 'cdService' service, 'abcdService' service and 'propertyService' service - */ - @BeforeClass - public static void init() throws Exception { - try { - String location = ContributionLocationHelper.getContributionLocation("PropertyTest.composite"); - node = NodeFactory.newInstance().createNode("PropertyTest.composite", new Contribution("c1", location)); - node.start(); - } catch (Exception e) { - e.printStackTrace(); - } - abService = node.getService(ABComponent.class, "ABComponent"); - cdService = node.getService(CDComponent.class, "CDComponent"); - abcdService = node.getService(ABCDComponent.class, "ABCDComponent"); - propertyService = node.getService(PropertyComponent.class, "PropertyComponent"); - } - - /** - * Method annotated with - * - * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the - * node, close any previously opened connections etc - */ - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } -} diff --git a/java/sca/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java b/java/sca/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java deleted file mode 100644 index a0213ced46..0000000000 --- a/java/sca/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java +++ /dev/null @@ -1,72 +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 org.apache.tuscany.sca.itest.cdi; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class ConstructorPropertyInjectionTestCase { - private static org.apache.tuscany.sca.node.Node node; - - @BeforeClass - public static void init() throws Exception { - try { - String location = ContributionLocationHelper.getContributionLocation("ConstructorPropertyInjection.composite"); - node = NodeFactory.newInstance().createNode("ConstructorPropertyInjection.composite", new Contribution("c1", location)); - node.start(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Method annotated with - * - * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the - * node, close any previously opened connections etc - */ - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testFoo1() throws Exception { - Bar foo = node.getService(Bar.class, "Foo1Component"); - assertEquals("fubar", foo.getBar()); - } - - @Test - public void testFoo2() throws Exception { - Bar foo = node.getService(Bar.class, "Foo2Component"); - assertEquals("fubar", foo.getBar()); - } - - @Test - public void testFoo3() throws Exception { - Bar foo = node.getService(Bar.class, "Foo3Component"); - assertEquals("fubar", foo.getBar()); - } -} diff --git a/java/sca/itest/recursive-multi-level/pom.xml b/java/sca/itest/recursive-multi-level/pom.xml deleted file mode 100644 index 6114e64ad8..0000000000 --- a/java/sca/itest/recursive-multi-level/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <!--relativePath>../pom.xml</relativePath--> - </parent> - <artifactId>itest-recursive-multi-level</artifactId> - <name>Apache Tuscany SCA iTest Recusive Multi-Level</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <!-- XPathFactory --> - <dependency> - <groupId>xalan</groupId> - <artifactId>xalan</artifactId> - <version>2.7.1</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java b/java/sca/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java deleted file mode 100644 index 986c8305dd..0000000000 --- a/java/sca/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java +++ /dev/null @@ -1,26 +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 mysca.test.myservice; - -public interface MyService { - String getLocation(); - - String getYear(); -} diff --git a/java/sca/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java b/java/sca/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java deleted file mode 100644 index 6cad998042..0000000000 --- a/java/sca/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java +++ /dev/null @@ -1,42 +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 mysca.test.myservice; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -@Service(MyService.class) -public class MyServiceImpl implements MyService { - - @Property(name = "location") - protected String location = "ABC"; - - @Property(name = "year") - protected String year = "2006"; - - public String getLocation() { - return location; - } - - public String getYear() { - return year; - } - -} diff --git a/java/sca/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java b/java/sca/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java deleted file mode 100644 index 261eff2584..0000000000 --- a/java/sca/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java +++ /dev/null @@ -1,26 +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 mysca.test.myservice; - -public interface MySimpleTotalService { - String getLocation(); - - String getYear(); -} diff --git a/java/sca/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java b/java/sca/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java deleted file mode 100644 index f3c9280f96..0000000000 --- a/java/sca/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java +++ /dev/null @@ -1,39 +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 mysca.test.myservice; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(MySimpleTotalService.class) -public class MySimpleTotalServiceImpl implements MySimpleTotalService { - // default required==true so it is 1:1 - @Reference - public MyService myService; - - public String getLocation() { - return myService.getLocation(); - } - - public String getYear() { - return myService.getYear(); - } - -} diff --git a/java/sca/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite b/java/sca/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite deleted file mode 100644 index 090bc49a41..0000000000 --- a/java/sca/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. - --> -<composite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:foo="http://foo" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xsi:schemaLocation="http://docs.oasis-open.org/ns/opencsa/sca/200903 http://docs.oasis-open.org/ns/opencsa/sca/200903" - name="TotalComposite1Auto" - targetNamespace="http://foo" - local="true" - autowire="false"> - - <property name="newLocation" type="xsd:anyURI">Level 1</property> - <property name="newYear" type="xsd:anyURI">2001</property> - - <component name="ServiceComponentLevel1Auto"> - <implementation.java class="mysca.test.myservice.MyServiceImpl"/> - <property name="location" source="$newLocation"/> - <property name="year" source="$newYear"/> - </component> - - <service name="MyServiceLevel1Auto" promote="TotalServiceComponentLevel1Auto/MySimpleTotalService"> - <interface.java interface="mysca.test.myservice.MySimpleTotalService"/> - </service> - - <component name="TotalServiceComponentLevel1Auto"> - <implementation.java class="mysca.test.myservice.MySimpleTotalServiceImpl"/> - <reference name="myService" autowire="true"/> - </component> - - <reference name="myServiceReference1Auto" promote="TotalServiceComponentLevel1Auto/myService"> - <interface.java interface="mysca.test.myservice.MyService"/> - </reference> -</composite> - diff --git a/java/sca/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite b/java/sca/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite deleted file mode 100644 index 8c1a9a2f72..0000000000 --- a/java/sca/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. - --> -<composite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:foo="http://foo" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xsi:schemaLocation="http://docs.oasis-open.org/ns/opencsa/sca/200903 http://docs.oasis-open.org/ns/opencsa/sca/200903" - name="TotalComposite2Auto" - targetNamespace="http://foo" - local="true" - autowire="false"> - - <property name="newLocation" type="xsd:anyURI">Level 2</property> - <property name="newYear" type="xsd:anyURI">2002</property> - - <component name="ServiceComponentLevel2Auto"> - <implementation.java class="mysca.test.myservice.MyServiceImpl"/> - <property name="location">Default 2</property> - <property name="year">1992</property> - </component> - - <service name="MyServiceLevel2Auto" promote="TotalServiceInRecursive2Auto/MyServiceLevel1Auto"/> - - <component name="TotalServiceInRecursive2Auto"> - <implementation.composite name="foo:TotalComposite1Auto"/> - <reference name="myServiceReference1Auto" autowire="true"/> - <property name="newLocation" source="$newLocation"/> - <property name="newYear" source="$newYear"/> - </component> - - <reference name="myServiceReference2Auto" promote="TotalServiceInRecursive2Auto/myServiceReference1Auto"/> -</composite>
\ No newline at end of file diff --git a/java/sca/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite b/java/sca/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite deleted file mode 100644 index 884a8b0a96..0000000000 --- a/java/sca/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. - --> -<composite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:foo="http://foo" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xsi:schemaLocation="http://docs.oasis-open.org/ns/opencsa/sca/200903 http://docs.oasis-open.org/ns/opencsa/sca/200903" - name="TotalComposite3Auto" - targetNamespace="http://foo" - local="true" - autowire="false"> - - <property name="newLocation" type="xsd:anyURI">Level 3</property> - <property name="newYear" type="xsd:anyURI">2003</property> - - <component name="ServiceComponentLevel3Auto"> - <implementation.java class="mysca.test.myservice.MyServiceImpl"/> - <property name="location">Default 3</property> - <property name="year">1993</property> - </component> - - <service name="MyServiceLevel3Auto" promote="TotalServiceInRecursive3Auto/MyServiceLevel2Auto"> - </service> - - <component name="TotalServiceInRecursive3Auto" autowire="true"> - <implementation.composite name="foo:TotalComposite2Auto"/> - <reference name="myServiceReference2Auto"/> - <property name="newLocation" source="$newLocation"/> - <property name="newYear" source="$newYear"/> - </component> - - <reference name="myServiceReference3Auto" promote="TotalServiceInRecursive3Auto/myServiceReference2Auto"> - </reference> - -</composite>
\ No newline at end of file diff --git a/java/sca/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java b/java/sca/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java deleted file mode 100644 index b9b4e3ba7c..0000000000 --- a/java/sca/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java +++ /dev/null @@ -1,90 +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 test.sca.tests; - -import static org.junit.Assert.assertEquals; -import mysca.test.myservice.MySimpleTotalService; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests to make sure that autowiring and recusive composite work together - * - */ -public class MultiLevelTestCase { - private static Node node1; - private static Node node2; - private static Node node3; - private static MySimpleTotalService myService1; - private static MySimpleTotalService myService2; - private static MySimpleTotalService myService3; - - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("TotalService1Auto.composite"); - Contribution contribution = new Contribution("c1", location); - try { - node1 = NodeFactory.newInstance().createNode("TotalService1Auto.composite", contribution); - } catch (Exception e) { - e.printStackTrace(); - } - node2 = NodeFactory.newInstance().createNode("TotalService2Auto.composite", contribution); - node3 = NodeFactory.newInstance().createNode("TotalService3Auto.composite", contribution); - - node1.start(); - node2.start(); - node3.start(); - - myService1 = node1.getService(MySimpleTotalService.class, "TotalServiceComponentLevel1Auto"); - myService2 = node2.getService(MySimpleTotalService.class, "TotalServiceInRecursive2Auto/MyServiceLevel1Auto"); - myService3 = node3.getService(MySimpleTotalService.class, "TotalServiceInRecursive3Auto/MyServiceLevel2Auto"); - } - - @Test - public void testLevel1() { - assertEquals("Level 1", myService1.getLocation()); - assertEquals("2001", myService1.getYear()); - } - - @Test - public void testLevel2() { - assertEquals("Default 2", myService2.getLocation()); - assertEquals("1992", myService2.getYear()); - } - - @Test - public void testLevel3() { - assertEquals("Default 3", myService3.getLocation()); - assertEquals("1993", myService3.getYear()); - } - - @AfterClass - public static void tearDown() { - node1.stop(); - node2.stop(); - node3.stop(); - } -} diff --git a/java/sca/itest/references/pom.xml b/java/sca/itest/references/pom.xml deleted file mode 100644 index 9da71f2ee8..0000000000 --- a/java/sca/itest/references/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-references</artifactId> - <name>Apache Tuscany SCA iTest References</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> diff --git a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java b/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java deleted file mode 100644 index f8c0850118..0000000000 --- a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java +++ /dev/null @@ -1,40 +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 org.apache.tuscany.sca.itest.references; - -public interface AComponent { - - String fooB(); - - String fooC(); - - String fooBC(); - - String fooD1(); - - String fooD2(); - - String fooMultipleD(); - - String fooMultipleDArray(); - - String fooMultipleDServiceRef(); - - DComponent getDReference(); -} diff --git a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java b/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java deleted file mode 100644 index cd0aad3eea..0000000000 --- a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java +++ /dev/null @@ -1,125 +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 org.apache.tuscany.sca.itest.references; - -import java.util.Collection; -import java.util.List; - -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Reference; - -public class AComponentImpl implements AComponent { - - @Reference(name = "bReference") - protected BComponent b; - - @Reference - private CComponent cReference; - - @Reference(required = false) - protected DComponent dReference; - - @Reference(name = "dReferences") - public Collection<DComponent> dReferences; - - @Reference(name = "dReferenceArray") - public DComponent[] dReferenceArray; - - @Reference(name = "dServiceReferences") - public List<ServiceReference<DComponent>> dServiceReferences; - - private DComponent dReference1; - - private DComponent dReference2; - - @Reference(name = "dReference1", required = false) - public void setDReference(DComponent dReference) { - this.dReference1 = dReference; - } - - @Reference - public void setDReference2(DComponent dReference2) { - this.dReference2 = dReference2; - } - - public String fooB() { - return b.bFoo(); - } - - public String fooC() { - return cReference.cFoo(); - } - - public String fooBC() { - return b.fooC(); - } - - public String fooD() { - return dReference1.dFoo(); - } - - public String fooD1() { - return dReference1.dFoo(); - } - - public String fooD2() { - return dReference2.dFoo(); - } - - public String fooMultipleDArray() { - StringBuffer str = new StringBuffer(); - for (DComponent d : dReferenceArray) { - str.append(d.getComponentName()); - str.append(','); - } - if (str.length() > 0) { - str.deleteCharAt(str.length() - 1); - } - return str.toString(); - } - - public String fooMultipleD() { - StringBuffer str = new StringBuffer(); - for (DComponent d : dReferences) { - str.append(d.getComponentName()); - str.append(','); - } - if (str.length() > 0) { - str.deleteCharAt(str.length() - 1); - } - return str.toString(); - } - - public String fooMultipleDServiceRef() { - StringBuffer str = new StringBuffer(); - for (ServiceReference<DComponent> d : dServiceReferences) { - str.append(d.getService().getComponentName()); - str.append(','); - } - if (str.length() > 0) { - str.deleteCharAt(str.length() - 1); - } - return str.toString(); - } - - public DComponent getDReference() { - return dReference; - } - -} diff --git a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java b/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java deleted file mode 100644 index 785920bb2d..0000000000 --- a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java +++ /dev/null @@ -1,26 +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 org.apache.tuscany.sca.itest.references; - -public interface BComponent { - - String bFoo(); - - String fooC(); -} diff --git a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java b/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java deleted file mode 100644 index 211e6160f6..0000000000 --- a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java +++ /dev/null @@ -1,39 +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 org.apache.tuscany.sca.itest.references; - -import org.oasisopen.sca.annotation.Reference; - -public class BComponentImpl implements BComponent { - - protected CComponent cReference; - - public BComponentImpl(@Reference(name = "cReference") CComponent cReference) { - this.cReference = cReference; - } - - public String bFoo() { - return "BComponent"; - } - - public String fooC() { - return "B" + cReference.cFoo(); - } - -} diff --git a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java b/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java deleted file mode 100644 index 47a1f9bde8..0000000000 --- a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java +++ /dev/null @@ -1,39 +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 org.apache.tuscany.sca.itest.references; - -import org.oasisopen.sca.annotation.Reference; - -public class BComponentWrongTargetImpl implements BComponent { - - protected CComponent cReference; - - public BComponentWrongTargetImpl(@Reference(name = "cReference") CComponent cReference) { - this.cReference = cReference; - } - - public String bFoo() { - return "BComponentWrongTarget"; - } - - public String fooC() { - return "B" + cReference.cFoo(); - } - -} diff --git a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java b/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java deleted file mode 100644 index d436c28adc..0000000000 --- a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java +++ /dev/null @@ -1,24 +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 org.apache.tuscany.sca.itest.references; - -public interface CComponent { - - String cFoo(); -} diff --git a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java b/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java deleted file mode 100644 index a1823e1cdc..0000000000 --- a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java +++ /dev/null @@ -1,27 +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 org.apache.tuscany.sca.itest.references; - -public class CComponentImpl implements CComponent { - - public String cFoo() { - return "CComponent"; - } - -} diff --git a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java b/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java deleted file mode 100644 index 80617bdec2..0000000000 --- a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java +++ /dev/null @@ -1,26 +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 org.apache.tuscany.sca.itest.references; - -public interface DComponent { - - String dFoo(); - - String getComponentName(); -} diff --git a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java b/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java deleted file mode 100644 index d181ac96ca..0000000000 --- a/java/sca/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java +++ /dev/null @@ -1,35 +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 org.apache.tuscany.sca.itest.references; - -import org.oasisopen.sca.annotation.ComponentName; - -public class DComponentImpl implements DComponent { - @ComponentName - public String name; - - public String dFoo() { - return "DComponent"; - } - - public String getComponentName() { - return name; - } - -} diff --git a/java/sca/itest/references/src/main/resources/AutoWiredReferencesTest.composite b/java/sca/itest/references/src/main/resources/AutoWiredReferencesTest.composite deleted file mode 100644 index 3934025e64..0000000000 --- a/java/sca/itest/references/src/main/resources/AutoWiredReferencesTest.composite +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" xmlns:foo="http://foo" targetNamespace="http://foo" - name="AutowireReferencesTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autowire="true"> - - <component name="AComponent" autowire="false"> - <implementation.java class="org.apache.tuscany.sca.itest.references.AComponentImpl" /> - <reference name="bReference" target="BComponent" /> - <reference name="cReference" autowire="true" /> - <reference name="dReference1" multiplicity="0..1"/> - <!-- - <reference name="dReference1" target="DComponent" /> - --> - <reference name="DReference2" target="DComponent" /> - <reference name="dReferences" autowire="true" /> - <reference name="dReferenceArray" autowire="true" /> - <reference name="dServiceReferences" target="DComponent DComponent1" /> - - </component> - - <component name="AComponentAutowire" autowire="true"> - <implementation.java class="org.apache.tuscany.sca.itest.references.AComponentImpl" /> - <reference name="bReference" target="BComponent" /> - </component> - - <component name="BComponentWrongTarget"> - <implementation.java class="org.apache.tuscany.sca.itest.references.BComponentWrongTargetImpl" /> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.references.BComponentImpl" /> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.references.CComponentImpl" /> - </component> - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.references.DComponentImpl" /> - </component> - - <component name="DComponent1"> - <implementation.java class="org.apache.tuscany.sca.itest.references.DComponentImpl" /> - </component> -</composite>
\ No newline at end of file diff --git a/java/sca/itest/references/src/main/resources/InnerReferencesTest.composite b/java/sca/itest/references/src/main/resources/InnerReferencesTest.composite deleted file mode 100644 index 871a846edf..0000000000 --- a/java/sca/itest/references/src/main/resources/InnerReferencesTest.composite +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" xmlns:foo="http://foo" targetNamespace="http://foo" - name="InnerReferencesTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.references.AComponentImpl" /> - <reference name="bReference" target="BComponent" /> - <reference name="cReference" target="CComponent" /> - <reference name="dReference1" target="DComponent" /> - <reference name="DReference2" target="DComponent" /> - <reference name="dReferences" target="DComponent DComponent1" /> - <reference name="dReferenceArray" target="DComponent1" /> - <reference name="dServiceReferences" target="DComponent DComponent1" /> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.references.BComponentImpl" /> - <reference name="cReference" target="CComponent" /> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.references.CComponentImpl" /> - </component> - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.references.DComponentImpl" /> - </component> - - <component name="DComponent1"> - <implementation.java class="org.apache.tuscany.sca.itest.references.DComponentImpl" /> - </component> - -</composite>
\ No newline at end of file diff --git a/java/sca/itest/references/src/main/resources/ManualWiredReferencesTest.composite b/java/sca/itest/references/src/main/resources/ManualWiredReferencesTest.composite deleted file mode 100644 index 52d6fe48c1..0000000000 --- a/java/sca/itest/references/src/main/resources/ManualWiredReferencesTest.composite +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" xmlns:foo="http://foo" targetNamespace="http://foo" - name="ManualWiredReferencesTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autowire="true"> - - <component name="AComponent" > - <implementation.java class="org.apache.tuscany.sca.itest.references.AComponentImpl" /> - <reference name="bReference" target="BComponent" /> - <reference name="cReference" target="CComponent/CComponentImpl"> - <!-- reference name="cReference" target="CComponent"--> - </reference> - <reference name="dReference1" > - <binding.sca uri="DComponent"/> - </reference> - <reference name="DReference2" target="DComponent" > - <!-- binding.ws uri="DComponent"/--> - </reference> - <reference name="dReferences" target="DComponent DComponent1" /> - <reference name="dReferenceArray" target="DComponent DComponent1" /> - <reference name="dServiceReferences" target="DComponent DComponent1" /> - - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.references.BComponentImpl" /> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.references.CComponentImpl" /> - </component> - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.references.DComponentImpl" /> - <service name="DComponentImpl"> - <binding.sca/> - <!-- binding.ws/--> - </service> - </component> - - <component name="DComponent1"> - <implementation.java class="org.apache.tuscany.sca.itest.references.DComponentImpl" /> - </component> -</composite>
\ No newline at end of file diff --git a/java/sca/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java b/java/sca/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java deleted file mode 100644 index 76264d308f..0000000000 --- a/java/sca/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java +++ /dev/null @@ -1,114 +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 org.apache.tuscany.sca.itest.references; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.oasisopen.sca.ServiceUnavailableException; - -public class AutoWiredReferenceTestCase { - private static Node node; - private static AComponent acomponent; - private static AComponent acomponentAutowire; - - @BeforeClass - public static void init() throws Exception { - try { - String location = ContributionLocationHelper.getContributionLocation("AutoWiredReferencesTest.composite"); - node = - NodeFactory.newInstance().createNode("AutoWiredReferencesTest.composite", - new Contribution("c1", location)); - node.start(); - acomponent = node.getService(AComponent.class, "AComponent"); - acomponentAutowire = node.getService(AComponent.class, "AComponentAutowire"); - } catch (Throwable e) { - e.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testBReference() { - assertEquals("BComponent", acomponent.fooB()); - } - - @Test - public void testCReference() { - assertEquals("CComponent", acomponent.fooC()); - } - - @Test - public void testBCReference() { - assertEquals("BCComponent", acomponent.fooBC()); - } - - @Test(expected = Exception.class) - public void testD1Reference() { - acomponent.fooD1(); - } - - @Test - public void testD2Reference() { - assertEquals("DComponent", acomponent.fooD2()); - } - - @Test - public void testMultiDReferenceArray() { - String components = acomponent.fooMultipleDArray(); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test - public void testMultiDServiceReference() { - String components = acomponent.fooMultipleDServiceRef(); - Assert.assertTrue(components.contains("DComponent")); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test - public void testRequiredFalseReference() { - try { - acomponent.getDReference().dFoo(); - } catch (Exception e) { - Assert.assertTrue(true); - } - } - - @Test - public void testTargetPrecendence() { - try { - assertEquals("BComponent", acomponentAutowire.fooB()); - } catch (Exception e) { - Assert.assertTrue(true); - } - } - -} diff --git a/java/sca/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java b/java/sca/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java deleted file mode 100644 index 6e4212fd9a..0000000000 --- a/java/sca/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java +++ /dev/null @@ -1,99 +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 org.apache.tuscany.sca.itest.references; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -public class InnerReferenceTestCase { - private static Node node; - private static AComponent acomponent; - - @BeforeClass - public static void init() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("InnerReferencesTest.composite"); - node = NodeFactory.newInstance().createNode("InnerReferencesTest.composite", new Contribution("c1", location)); - node.start(); - acomponent = node.getService(AComponent.class, "AComponent"); - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testBReference() { - assertEquals("BComponent", acomponent.fooB()); - } - - @Test - public void testCReference() { - assertEquals("CComponent", acomponent.fooC()); - } - - @Test - public void testBCReference() { - assertEquals("BCComponent", acomponent.fooBC()); - } - - @Test - public void testD1Reference() { - assertEquals("DComponent", acomponent.fooD1()); - } - - @Test - public void testD2Reference() { - assertEquals("DComponent", acomponent.fooD2()); - } - - @Test - public void testMultiDReference() { - String components = acomponent.fooMultipleD(); - Assert.assertTrue(components.contains("DComponent")); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test - public void testMultiDReferenceArray() { - String components = acomponent.fooMultipleDArray(); - Assert.assertTrue(components.equals("DComponent1")); - } - - @Test - public void testMultiDServiceReference() { - String components = acomponent.fooMultipleDServiceRef(); - Assert.assertTrue(components.contains("DComponent")); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test(expected = Exception.class) - public void testRequiredFalseReference() { - acomponent.getDReference().dFoo(); - } - -} diff --git a/java/sca/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java b/java/sca/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java deleted file mode 100644 index 2fce95401e..0000000000 --- a/java/sca/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java +++ /dev/null @@ -1,97 +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 org.apache.tuscany.sca.itest.references; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -public class ManualWiredReferenceTestCase { - private static Node node; - private static AComponent acomponent; - - @BeforeClass - public static void init() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("ManualWiredReferencesTest.composite"); - node = NodeFactory.newInstance().createNode("ManualWiredReferencesTest.composite", new Contribution("c1", location)); - node.start(); - acomponent = node.getService(AComponent.class, "AComponent"); - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testBReference() { - assertEquals("BComponent", acomponent.fooB()); - } - - @Test - public void testCReference() { - assertEquals("CComponent", acomponent.fooC()); - } - - @Test - public void testBCReference() { - assertEquals("BCComponent", acomponent.fooBC()); - } - - @Test - public void testD1Reference() { - acomponent.fooD1(); - } - - @Test - public void testD2Reference() { - assertEquals("DComponent", acomponent.fooD2()); - } - - @Test - public void testMultiDReferenceArray() { - String components = acomponent.fooMultipleDArray(); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test - public void testMultiDServiceReference() { - String components = acomponent.fooMultipleDServiceRef(); - Assert.assertTrue(components.contains("DComponent")); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test - public void testRequiredFalseReference() { - try { - acomponent.getDReference().dFoo(); - } catch (Exception e) { - Assert.assertTrue(true); - } - } - -} diff --git a/java/sca/itest/scaclient-api/pom.xml b/java/sca/itest/scaclient-api/pom.xml deleted file mode 100644 index 795221292c..0000000000 --- a/java/sca/itest/scaclient-api/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-scaclient-api</artifactId> - <name>Apache Tuscany SCA iTest SCAClient API</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-client-impl</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/scaclient-api/src/main/java/itest/HelloworldService.java b/java/sca/itest/scaclient-api/src/main/java/itest/HelloworldService.java deleted file mode 100644 index 1c7edaefb6..0000000000 --- a/java/sca/itest/scaclient-api/src/main/java/itest/HelloworldService.java +++ /dev/null @@ -1,25 +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 itest; - -public interface HelloworldService { - - String sayHello(String name); - -} diff --git a/java/sca/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java b/java/sca/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java deleted file mode 100644 index 4b9910bb21..0000000000 --- a/java/sca/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java +++ /dev/null @@ -1,38 +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 itest; - -import org.oasisopen.sca.annotation.EagerInit; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; - -@EagerInit -@Scope("COMPOSITE") -public class HelloworldServiceImpl implements HelloworldService { - - public String sayHello(String name) { - return "Hello " + name; - } - - @Init - public void init() { - System.out.println(sayHello("world")); - } - -} diff --git a/java/sca/itest/scaclient-api/src/main/resources/Helloworld.composite b/java/sca/itest/scaclient-api/src/main/resources/Helloworld.composite deleted file mode 100644 index 3f0e0a164c..0000000000 --- a/java/sca/itest/scaclient-api/src/main/resources/Helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - targetNamespace="http://itest" - name="Helloworld"> - - <component name="HelloworldComponent"> - <implementation.java class="itest.HelloworldServiceImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index d8604a5cc0..0000000000 --- a/java/sca/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:itest="http://itest"> - <deployable composite="itest:Helloworld"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java b/java/sca/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java deleted file mode 100644 index a331e4dd22..0000000000 --- a/java/sca/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java +++ /dev/null @@ -1,61 +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 test.scaclient; - -import itest.HelloworldService; -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.oasisopen.sca.client.SCAClient; -import org.oasisopen.sca.client.SCAClientFactory; - -/** - * Test SCADomain.newInstance and invocation of a service. - * - * @version $Rev$ $Date$ - */ -public class SCAClientTestCase extends TestCase { - - private Node node; - - @Override - protected void setUp() throws Exception { - node = NodeFactory.newInstance().createNode(); - node.start(); - } - - public void testInvoke() throws Exception { - HelloworldService service = - SCAClientFactory.newInstance(null).getService(HelloworldService.class, "HelloworldComponent"); - assertEquals("Hello petra", service.sayHello("petra")); - } - - public void testSimpleAPI() throws Exception { - HelloworldService service = SCAClient.getService(HelloworldService.class, "/HelloworldComponent"); - assertEquals("Hello petra", service.sayHello("petra")); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/java/sca/itest/scdl/pom.xml b/java/sca/itest/scdl/pom.xml deleted file mode 100644 index 54e1c132ec..0000000000 --- a/java/sca/itest/scdl/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-itest</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>itest-scdl</artifactId>
- <name>Apache Tuscany SCA iTest SCDL</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-deployment</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jsonp</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-rmi</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <!-- Copy all the dependencies so the test can verify only the expected ones get dragged in -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy</id>
- <phase>compile</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java b/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java deleted file mode 100644 index c56545dd3b..0000000000 --- a/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java +++ /dev/null @@ -1,80 +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 org.apache.tuscany.sca.itest.scdl;
-
-import java.io.File;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.List;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.assembly.Component;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.Implementation;
-import org.apache.tuscany.sca.assembly.Reference;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.deployment.DefaultDeployer;
-import org.apache.tuscany.sca.deployment.Deployer;
-import org.apache.tuscany.sca.implementation.java.JavaImplementation;
-import org.apache.tuscany.sca.monitor.Monitor;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Test case for reading and writing SCDL
- */
-public class ContributionTestCase {
-
- @Test
- public void testRead() throws Exception {
- Deployer deployer = new DefaultDeployer();
- File file = new File("../../samples/calculator/target/sample-calculator.jar");
- URL url = file.toURI().toURL();
- Monitor monitor = deployer.createMonitor();
- Contribution contribution = deployer.loadContribution(url.toURI(), url, monitor);
- deployer.build(Arrays.asList(contribution), null, monitor);
-
- // Ferkle around in the contribution verifying it looks as expected
- Assert.assertNotNull(contribution);
- List<Composite> deployables = contribution.getDeployables();
- Assert.assertEquals(1, deployables.size());
- Composite calculatorComposte = deployables.get(0);
- Assert.assertEquals("Calculator", calculatorComposte.getName().getLocalPart());
- Assert.assertEquals(5, calculatorComposte.getComponents().size());
- Component calcComp = calculatorComposte.getComponent("CalculatorServiceComponent");
- Assert.assertNotNull(calcComp);
- Assert.assertEquals(4, calcComp.getReferences().size());
- Reference ref = calcComp.getReference("addService");
- Assert.assertEquals("AddServiceComponent", ref.getTargets().get(0).getName());
- Implementation impl = calcComp.getImplementation();
- Assert.assertTrue(impl instanceof JavaImplementation);
- Assert.assertEquals("calculator.CalculatorServiceImpl", ((JavaImplementation)impl).getJavaClass().getName());
- }
-
- @Before
- public void setUp() throws Exception {
- }
-
- @After
- public void tearDown() throws Exception {
- }
-}
diff --git a/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java b/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java deleted file mode 100644 index 18fb9394bf..0000000000 --- a/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java +++ /dev/null @@ -1,87 +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 org.apache.tuscany.sca.itest.scdl;
-
-import java.net.URL;
-
-import javax.xml.stream.XMLStreamException;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.assembly.Component;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.Service;
-import org.apache.tuscany.sca.binding.jms.JMSBinding;
-import org.apache.tuscany.sca.binding.jsonp.JSONPBinding;
-import org.apache.tuscany.sca.binding.rmi.RMIBinding;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-import org.apache.tuscany.sca.deployment.Deployer;
-import org.junit.Test;
-
-/**
- * Test case for reading and writing a composite
- */
-public class SCDLTestCase {
-
- @Test
- public void testRead() throws ContributionReadException, XMLStreamException {
- ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
- Deployer deployer = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(Deployer.class);
-
- URL r = getClass().getResource("/test.composite");
- Composite composite = deployer.loadXMLDocument(r, null);
- Assert.assertNotNull(composite);
-
- Component JavaComp = composite.getComponent("JavaComponent");
- Assert.assertNotNull(JavaComp);
-
- Component bpelComp = composite.getComponent("BPELComponent");
- Assert.assertNotNull(bpelComp);
-
- Service jsonpService = composite.getService("JSONPService");
- Assert.assertNotNull(jsonpService);
- Assert.assertEquals(1, jsonpService.getBindings().size());
- JSONPBinding jsonpBinding = jsonpService.getBinding(JSONPBinding.class);
- Assert.assertNotNull(jsonpBinding);
-
- Service jmsService = composite.getService("JMSService");
- Assert.assertNotNull(jmsService);
- Assert.assertEquals(1, jmsService.getBindings().size());
- JMSBinding jmsBinding = jmsService.getBinding(JMSBinding.class);
- Assert.assertNotNull(jmsBinding);
-
- Service rmiService = composite.getService("RMIService");
- Assert.assertNotNull(rmiService);
- Assert.assertEquals(1, rmiService.getBindings().size());
- RMIBinding rmiBinding = rmiService.getBinding(RMIBinding.class);
- Assert.assertNotNull(rmiBinding);
-
-// TODO: WS binding drags in entire runtime
-// Service wsService = composite.getService("WSService");
-// Assert.assertNotNull(wsService);
-// Assert.assertEquals(1, wsService.getBindings().size());
-// WSBinding wsBinding = wsService.getBinding(WSBinding.class);
-// Assert.assertNotNull(wsBinding);
- }
-
-}
diff --git a/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java b/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java deleted file mode 100644 index 44695e5dde..0000000000 --- a/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java +++ /dev/null @@ -1,73 +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 org.apache.tuscany.sca.itest.scdl;
-
-import java.io.File;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-/**
- * Test case for verifying only SCDL jars are needed
- *
- * Uses maven-dependency-plugin config in the pom.xml
- *
- * Current required jars are:
- * geronimo-stax-api_1.0_spec-1.0.1.jar
- * jsr181-api-1.0-MR1.jar
- * junit-4.5.jar
- * tuscany-assembly-2.0-SNAPSHOT.jar
- * tuscany-assembly-xml-2.0-SNAPSHOT.jar
- * tuscany-assembly-xsd-2.0-SNAPSHOT.jar
- * tuscany-binding-jms-2.0-SNAPSHOT.jar
- * tuscany-binding-jsonp-2.0-SNAPSHOT.jar
- * tuscany-binding-rmi-2.0-SNAPSHOT.jar
- * tuscany-binding-ws-2.0-SNAPSHOT.jar
- * tuscany-common-java-2.0-SNAPSHOT.jar
- * tuscany-common-xml-2.0-SNAPSHOT.jar
- * tuscany-contribution-2.0-SNAPSHOT.jar
- * tuscany-extensibility-2.0-SNAPSHOT.jar
- * tuscany-implementation-bpel-2.0-SNAPSHOT.jar
- * tuscany-implementation-java-2.0-SNAPSHOT.jar
- * tuscany-interface-java-2.0-SNAPSHOT.jar
- * tuscany-interface-wsdl-2.0-SNAPSHOT.jar
- * tuscany-monitor-2.0-SNAPSHOT.jar
- * tuscany-sca-api-2.0-SNAPSHOT.jar
- * tuscany-scdl-2.0-SNAPSHOT.jar
- * tuscany-xsd-2.0-SNAPSHOT.jar
- * wsdl4j-1.6.2.jar
- * wstx-asl-3.2.4.jar
- * XmlSchema-1.4.2.jar
- *
- * TODO: WS binding drags in all runtime
- */
-public class ValidateDependenciesTestCase {
-
- @Test
- public void countDependencies() {
-
- File dependenciesDir = new File("target/dependency");
- Assert.assertTrue(dependenciesDir.exists());
-
- File[] dependencyFiles = dependenciesDir.listFiles();
- Assert.assertEquals(20, dependencyFiles.length);
- }
-}
diff --git a/java/sca/itest/scdl/src/test/resources/test.composite b/java/sca/itest/scdl/src/test/resources/test.composite deleted file mode 100644 index aa11c0d092..0000000000 --- a/java/sca/itest/scdl/src/test/resources/test.composite +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://itest"
- xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- name="SCDLTest">
-
- <component name="JavaComponent">
- <implementation.java class="itest.FooImpl"/>
- </component>
-
- <component name="BPELComponent">
- <implementation.bpel process="hns:HelloWorld"/>
- </component>
-
- <service name="JSONPService" promote="JavaComponent">
- <tuscany:binding.jsonp/>
- </service>
-
- <service name="JMSService" promote="JavaComponent">
- <binding.jms/>
- </service>
-
- <service name="RMIService" promote="JavaComponent">
- <tuscany:binding.rmi/>
- </service>
-
-<!-- TODO: leave out WS binding for now as it drags in entire runtime
- <service name="WSService" promote="JavaComponent">
- <binding.ws/>
- </service>
--->
-</composite>
diff --git a/java/sca/itest/scopes/pom.xml b/java/sca/itest/scopes/pom.xml deleted file mode 100644 index 4ba97f3062..0000000000 --- a/java/sca/itest/scopes/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <name>Apache Tuscany SCA iTest Scopes</name> - <artifactId>itest-scopes</artifactId> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - </dependencies> - -</project> diff --git a/java/sca/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java b/java/sca/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java deleted file mode 100644 index 208ac3ba44..0000000000 --- a/java/sca/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.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 org.apache.tuscany.sca.itest.scopes; - -import org.oasisopen.sca.annotation.Scope; - -/** - * Test Composite scope - */ -@Scope("COMPOSITE") -public class CompositeScopeStateVerifierImpl implements StateVerifier { - - // State data for this module (composite). - // In order to support thread-based state verification, - // the module state needs to be a ThreadLocal. - ThreadLocal<Integer> moduleState; - - public CompositeScopeStateVerifierImpl() { - moduleState = new ThreadLocal<Integer>(); - } - - public void setState(int i) { - moduleState.set(i); - } - - public boolean checkState(int i) { - return (moduleState.get() == i); - } - -} diff --git a/java/sca/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java b/java/sca/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java deleted file mode 100644 index e6bf08ccf2..0000000000 --- a/java/sca/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java +++ /dev/null @@ -1,25 +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 org.apache.tuscany.sca.itest.scopes; - -public interface StateVerifier { - void setState(int i); - - boolean checkState(int i); -} diff --git a/java/sca/itest/scopes/src/main/resources/scopes.composite b/java/sca/itest/scopes/src/main/resources/scopes.composite deleted file mode 100644 index 83a71218f5..0000000000 --- a/java/sca/itest/scopes/src/main/resources/scopes.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://Scopes" - name="Scopes"> - - <!-- Components used to test scopes. --> - <component name="ModuleScopeComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.scopes.CompositeScopeStateVerifierImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java b/java/sca/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java deleted file mode 100644 index 594bdd5038..0000000000 --- a/java/sca/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java +++ /dev/null @@ -1,89 +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 org.apache.tuscany.sca.test; - -import static org.junit.Assert.fail; - -import org.apache.tuscany.sca.itest.scopes.StateVerifier; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class ScopeTestCase { - - /** - * Number of threads to drive each scope container. - */ - private static final int NUM_THREADS = 4; - - /** - * Number of iterations per thread. - */ - private static final int ITERATIONS = 200; - - private Node node; - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("scopes.composite"); - node = NodeFactory.newInstance().createNode("scopes.composite", new Contribution("c1", location)); - node.start(); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - - @Test - public void testScopes() throws InterruptedException { - - Thread[] moduleScopeThreadTable = new Thread[NUM_THREADS]; - - for (int i = 0; i < NUM_THREADS; i++) { - moduleScopeThreadTable[i] = new ModuleScopeTestThread(); - } - for (int j = 0; j < NUM_THREADS; j++) { - moduleScopeThreadTable[j].start(); - } - for (int k = 0; k < NUM_THREADS; k++) { - moduleScopeThreadTable[k].join(); - } - } - - private class ModuleScopeTestThread extends Thread { - - public void run() { - StateVerifier moduleScopeService = node.getService(StateVerifier.class, "ModuleScopeComponent"); - for (int i = 1; i <= ITERATIONS; i++) { - moduleScopeService.setState(i); - if (!moduleScopeService.checkState(i)) { - fail("The module scope service lost its state on iteration " + i); - } - } - } - } - - - -} diff --git a/java/sca/itest/service-reference/pom.xml b/java/sca/itest/service-reference/pom.xml deleted file mode 100644 index 0fdd1cb994..0000000000 --- a/java/sca/itest/service-reference/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-service-reference</artifactId> - <name>Apache Tuscany SCA iTest ServiceReference</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> diff --git a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponent.java b/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponent.java deleted file mode 100644 index 8b5cf4d29a..0000000000 --- a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponent.java +++ /dev/null @@ -1,39 +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 org.apache.tuscany.sca.itest.serviceref; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface AComponent { - String foo(); - - String fooB(); - String fooB1(); - - String fooC(); - String fooC1(); - - String fooStringD(); - String fooD(); - - String fooBC(); - - String invokeDReference(); -} diff --git a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponentImpl.java b/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponentImpl.java deleted file mode 100644 index 3f68ac828a..0000000000 --- a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponentImpl.java +++ /dev/null @@ -1,112 +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 org.apache.tuscany.sca.itest.serviceref; - -import java.io.ByteArrayOutputStream; -import java.io.ObjectOutputStream; - -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(AComponent.class) -public class AComponentImpl implements AComponent { - - @Context - protected ComponentContext componentContext; - - @Reference(name = "bReference") - protected BComponent b; - - @Reference - protected CComponent cReference; - - @Reference - protected ServiceReference<CComponent> cServiceReference; - - @Reference(required=false) - protected DComponent dReference; - - protected DComponent dReference1; - - @Reference(name = "dReference1") - public void setDReference(DComponent dReference) { - this.dReference1 = dReference; - } - - public String foo() { - return "AComponent"; - } - - public String fooB() { - return b.foo(); - } - - public String fooB1() { - ServiceReference<BComponent> bRef = componentContext.cast(b); - return bRef.getService().foo(); - } - - public String fooC() { - return cReference.foo(); - } - - public String fooC1() { - return cServiceReference.getService().foo(); - } - - public String fooBC() { - ServiceReference<CComponent> cReference = componentContext.getServiceReference(CComponent.class, "cReference"); - return b.fooC(cReference); - } - - public String fooD() { - ServiceReference<AComponent> aReference = componentContext.createSelfReference(AComponent.class); - return dReference1.foo(aReference); - } - - /** - * A test case to work out what needs to be done in a transformer to get the - * CallableReference across the wire. Left here for interest in case anyone - * is looking for how to get at the innards of CallableReferences - */ - public String fooStringD() { - ServiceReference<AComponent> aReference = componentContext.createSelfReference(AComponent.class); - ByteArrayOutputStream bos = null; - - try { - bos = new ByteArrayOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(bos); - oos.writeObject(aReference); - } catch (Exception ex) { - System.out.println(ex.toString()); - return null; - } - - String aReferenceString = Base64Binary.encode(bos.toByteArray()); - return dReference1.fooString(aReferenceString); - } - - public String invokeDReference() { - return dReference.foo(null); - } - -} diff --git a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponent.java b/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponent.java deleted file mode 100644 index 18242cd594..0000000000 --- a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponent.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 org.apache.tuscany.sca.itest.serviceref; - -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Remotable; - - -@Remotable -public interface BComponent { - - String foo(); - - String fooC(ServiceReference<CComponent> cComponent); -} diff --git a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponentImpl.java b/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponentImpl.java deleted file mode 100644 index dd143df036..0000000000 --- a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponentImpl.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.itest.serviceref; - -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Service; - -@Service(BComponent.class) -public class BComponentImpl implements BComponent { - - public BComponentImpl() { - } - - public String foo() { - return "BComponent"; - } - - public String fooC(ServiceReference<CComponent> cReference) { - return "B" + cReference.getService().foo(); - } - -} diff --git a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/Base64Binary.java b/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/Base64Binary.java deleted file mode 100644 index fb436ae10c..0000000000 --- a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/Base64Binary.java +++ /dev/null @@ -1,297 +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 org.apache.tuscany.sca.itest.serviceref; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; - -/** - * - */ - -public final class Base64Binary { - private static final char[] S_BASE64CHAR = - {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', - 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', - 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'}; - - private static final char S_BASE64PAD = '='; - - private static final byte[] S_DECODETABLE = new byte[128]; - - static { - for (int i = 0; i < S_DECODETABLE.length; i++) { - S_DECODETABLE[i] = Byte.MAX_VALUE; // 127 - } - for (int i = 0; i < S_BASE64CHAR.length; i++) { - // 0 to 63 - S_DECODETABLE[S_BASE64CHAR[i]] = (byte)i; - } - } - - private Base64Binary() { - } - - /** - * - */ - public static byte[] decode(char[] data, int off, int len) { - char[] ibuf = new char[4]; - int ibufcount = 0; - byte[] obuf = new byte[len / 4 * 3 + 3]; - int obufcount = 0; - for (int i = off; i < off + len; i++) { - char ch = data[i]; - if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { - ibuf[ibufcount++] = ch; - if (ibufcount == ibuf.length) { - ibufcount = 0; - obufcount += decode0(ibuf, obuf, obufcount); - } - } - } - if (obufcount == obuf.length) { - return obuf; - } - byte[] ret = new byte[obufcount]; - System.arraycopy(obuf, 0, ret, 0, obufcount); - return ret; - } - - /** - * - */ - public static void decode(char[] data, int off, int len, OutputStream ostream) throws IOException { - char[] ibuf = new char[4]; - int ibufcount = 0; - byte[] obuf = new byte[3]; - for (int i = off; i < off + len; i++) { - char ch = data[i]; - if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { - ibuf[ibufcount++] = ch; - if (ibufcount == ibuf.length) { - ibufcount = 0; - int obufcount = decode0(ibuf, obuf, 0); - ostream.write(obuf, 0, obufcount); - } - } - } - } - - /** - * - */ - public static byte[] decode(String data) { - char[] ibuf = new char[4]; - int ibufcount = 0; - byte[] obuf = new byte[data.length() / 4 * 3 + 3]; - int obufcount = 0; - for (int i = 0; i < data.length(); i++) { - char ch = data.charAt(i); - if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { - ibuf[ibufcount++] = ch; - if (ibufcount == ibuf.length) { - ibufcount = 0; - obufcount += decode0(ibuf, obuf, obufcount); - } - } - } - if (obufcount == obuf.length) { - return obuf; - } - byte[] ret = new byte[obufcount]; - System.arraycopy(obuf, 0, ret, 0, obufcount); - return ret; - } - - /** - * - */ - public static void decode(String data, OutputStream ostream) throws IOException { - char[] ibuf = new char[4]; - int ibufcount = 0; - byte[] obuf = new byte[3]; - for (int i = 0; i < data.length(); i++) { - char ch = data.charAt(i); - if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { - ibuf[ibufcount++] = ch; - if (ibufcount == ibuf.length) { - ibufcount = 0; - int obufcount = decode0(ibuf, obuf, 0); - ostream.write(obuf, 0, obufcount); - } - } - } - } - - private static int decode0(char[] ibuf, byte[] obuf, int index) { - int wp = index; - int outlen = 3; - if (ibuf[3] == S_BASE64PAD) { - outlen = 2; - } - if (ibuf[2] == S_BASE64PAD) { - outlen = 1; - } - int b0 = S_DECODETABLE[ibuf[0]]; - int b1 = S_DECODETABLE[ibuf[1]]; - int b2 = S_DECODETABLE[ibuf[2]]; - int b3 = S_DECODETABLE[ibuf[3]]; - switch (outlen) { - case 1: - obuf[wp] = (byte)(b0 << 2 & 0xfc | b1 >> 4 & 0x3); - return 1; - case 2: - obuf[wp++] = (byte)(b0 << 2 & 0xfc | b1 >> 4 & 0x3); - obuf[wp] = (byte)(b1 << 4 & 0xf0 | b2 >> 2 & 0xf); - return 2; - case 3: - obuf[wp++] = (byte)(b0 << 2 & 0xfc | b1 >> 4 & 0x3); - obuf[wp++] = (byte)(b1 << 4 & 0xf0 | b2 >> 2 & 0xf); - obuf[wp] = (byte)(b2 << 6 & 0xc0 | b3 & 0x3f); - return 3; - default: - throw new IllegalArgumentException("The character sequence is not base64 encoded."); - } - } - - /** - * Returns base64 representation of specified byte array. - */ - public static String encode(byte[] data) { - return encode(data, 0, data.length); - } - - /** - * Returns base64 representation of specified byte array. - */ - public static String encode(byte[] data, int off, int len) { - if (len <= 0) { - return ""; - } - char[] out = new char[len / 3 * 4 + 4]; - int rindex = off; - int windex = 0; - int rest = len - off; - while (rest >= 3) { - int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff); - out[windex++] = S_BASE64CHAR[i >> 18]; - out[windex++] = S_BASE64CHAR[(i >> 12) & 0x3f]; - out[windex++] = S_BASE64CHAR[(i >> 6) & 0x3f]; - out[windex++] = S_BASE64CHAR[i & 0x3f]; - rindex += 3; - rest -= 3; - } - if (rest == 1) { - int i = data[rindex] & 0xff; - out[windex++] = S_BASE64CHAR[i >> 2]; - out[windex++] = S_BASE64CHAR[(i << 4) & 0x3f]; - out[windex++] = S_BASE64PAD; - out[windex++] = S_BASE64PAD; - } else if (rest == 2) { - int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff); - out[windex++] = S_BASE64CHAR[i >> 10]; - out[windex++] = S_BASE64CHAR[(i >> 4) & 0x3f]; - out[windex++] = S_BASE64CHAR[(i << 2) & 0x3f]; - out[windex++] = S_BASE64PAD; - } - return new String(out, 0, windex); - } - - /** - * Outputs base64 representation of the specified byte array to a byte stream. - */ - public static void encode(byte[] data, int off, int len, OutputStream ostream) throws IOException { - if (len <= 0) { - return; - } - byte[] out = new byte[4]; - int rindex = off; - int rest = len - off; - while (rest >= 3) { - int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff); - out[0] = (byte)S_BASE64CHAR[i >> 18]; - out[1] = (byte)S_BASE64CHAR[(i >> 12) & 0x3f]; - out[2] = (byte)S_BASE64CHAR[(i >> 6) & 0x3f]; - out[3] = (byte)S_BASE64CHAR[i & 0x3f]; - ostream.write(out, 0, 4); - rindex += 3; - rest -= 3; - } - if (rest == 1) { - int i = data[rindex] & 0xff; - out[0] = (byte)S_BASE64CHAR[i >> 2]; - out[1] = (byte)S_BASE64CHAR[(i << 4) & 0x3f]; - out[2] = (byte)S_BASE64PAD; - out[3] = (byte)S_BASE64PAD; - ostream.write(out, 0, 4); - } else if (rest == 2) { - int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff); - out[0] = (byte)S_BASE64CHAR[i >> 10]; - out[1] = (byte)S_BASE64CHAR[(i >> 4) & 0x3f]; - out[2] = (byte)S_BASE64CHAR[(i << 2) & 0x3f]; - out[3] = (byte)S_BASE64PAD; - ostream.write(out, 0, 4); - } - } - - /** - * Outputs base64 representation of the specified byte array to a character stream. - */ - public static void encode(byte[] data, int off, int len, Writer writer) throws IOException { - if (len <= 0) { - return; - } - char[] out = new char[4]; - int rindex = off; - int rest = len - off; - int output = 0; - while (rest >= 3) { - int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff); - out[0] = S_BASE64CHAR[i >> 18]; - out[1] = S_BASE64CHAR[(i >> 12) & 0x3f]; - out[2] = S_BASE64CHAR[(i >> 6) & 0x3f]; - out[3] = S_BASE64CHAR[i & 0x3f]; - writer.write(out, 0, 4); - rindex += 3; - rest -= 3; - output += 4; - if (output % 76 == 0) { - writer.write("\n"); - } - } - if (rest == 1) { - int i = data[rindex] & 0xff; - out[0] = S_BASE64CHAR[i >> 2]; - out[1] = S_BASE64CHAR[(i << 4) & 0x3f]; - out[2] = S_BASE64PAD; - out[3] = S_BASE64PAD; - writer.write(out, 0, 4); - } else if (rest == 2) { - int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff); - out[0] = S_BASE64CHAR[i >> 10]; - out[1] = S_BASE64CHAR[(i >> 4) & 0x3f]; - out[2] = S_BASE64CHAR[(i << 2) & 0x3f]; - out[3] = S_BASE64PAD; - writer.write(out, 0, 4); - } - } -} diff --git a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponent.java b/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponent.java deleted file mode 100644 index fc15b632d2..0000000000 --- a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponent.java +++ /dev/null @@ -1,27 +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 org.apache.tuscany.sca.itest.serviceref; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CComponent { - - String foo(); -} diff --git a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponentImpl.java b/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponentImpl.java deleted file mode 100644 index 276093b69f..0000000000 --- a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponentImpl.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.itest.serviceref; - -import org.oasisopen.sca.annotation.Service; - -@Service(CComponent.class) -public class CComponentImpl implements CComponent { - - public String foo() { - return "CComponent"; - } - -} diff --git a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponent.java b/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponent.java deleted file mode 100644 index 84e15b5eb2..0000000000 --- a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponent.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.itest.serviceref; - -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface DComponent { - - String foo(ServiceReference<AComponent> aReference); - - String fooString(String aReferenceString); -} diff --git a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponentImpl.java b/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponentImpl.java deleted file mode 100644 index db99472385..0000000000 --- a/java/sca/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponentImpl.java +++ /dev/null @@ -1,64 +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 org.apache.tuscany.sca.itest.serviceref; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; - -import org.oasisopen.sca.RequestContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Service; - -@Service(DComponent.class) -public class DComponentImpl implements DComponent { - - @Context - protected RequestContext requestContext; - - public String foo(ServiceReference<AComponent> aReference) { - try { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(bos); - oos.writeObject(aReference); - ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); - Object obj = ois.readObject(); - aReference = (ServiceReference<AComponent>) obj; - } catch (Exception e) { - e.printStackTrace(); - } - System.out.println("Invoking service: " + requestContext.getServiceName()); - return "D" + aReference.getService().foo(); - } - - public String fooString(String aReferenceString) { - ServiceReference<AComponent> aReference = null; - try { - ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(Base64Binary.decode(aReferenceString))); - Object obj = ois.readObject(); - aReference = (ServiceReference<AComponent>) obj; - } catch (Exception e) { - e.printStackTrace(); - } - System.out.println("Invoking service: " + requestContext.getServiceName()); - return "D" + aReference.getService().foo(); - } -} diff --git a/java/sca/itest/service-reference/src/main/resources/nodeA/CompositeA.composite b/java/sca/itest/service-reference/src/main/resources/nodeA/CompositeA.composite deleted file mode 100644 index fb88cd8bea..0000000000 --- a/java/sca/itest/service-reference/src/main/resources/nodeA/CompositeA.composite +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:foo="http://foo" - targetNamespace="http://foo" - name="CompositeA" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.serviceref.AComponentImpl" /> - <service name="AComponent"> - <binding.ws uri="http://localhost:8084/AComponent"/> - </service> - <reference name="bReference"> - <binding.ws uri="http://localhost:8085/BComponent" /> - </reference> - <reference name="cReference"> - <binding.ws uri="http://localhost:8085/CComponent" /> - </reference> - <reference name="cServiceReference"> - <binding.ws uri="http://localhost:8085/CComponent" /> - </reference> - <reference name="dReference1"> - <binding.ws uri="http://localhost:8085/DComponent" /> - </reference> - </component> - -</composite>
\ No newline at end of file diff --git a/java/sca/itest/service-reference/src/main/resources/nodeB/CompositeB.composite b/java/sca/itest/service-reference/src/main/resources/nodeB/CompositeB.composite deleted file mode 100644 index 06e4c63e94..0000000000 --- a/java/sca/itest/service-reference/src/main/resources/nodeB/CompositeB.composite +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:foo="http://foo" - targetNamespace="http://foo" - name="CompositeB" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.serviceref.BComponentImpl" /> - <service name="BComponent"> - <binding.ws uri="http://localhost:8085/BComponent"/> - </service> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.serviceref.CComponentImpl" /> - <service name="CComponent"> - <binding.ws uri="http://localhost:8085/CComponent"/> - </service> - </component> - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.serviceref.DComponentImpl" /> - <service name="DComponent"> - <binding.ws uri="http://localhost:8085/DComponent"/> - </service> - </component> - -</composite>
\ No newline at end of file diff --git a/java/sca/itest/service-reference/src/main/resources/servicereference/ServiceReferenceTest.composite b/java/sca/itest/service-reference/src/main/resources/servicereference/ServiceReferenceTest.composite deleted file mode 100644 index 63302847b5..0000000000 --- a/java/sca/itest/service-reference/src/main/resources/servicereference/ServiceReferenceTest.composite +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:foo="http://foo" - targetNamespace="http://foo" - name="InnerReferencesTest" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - - <service name="AComponent" promote="AComponent"> - <interface.java interface="org.apache.tuscany.sca.itest.serviceref.AComponent" /> - </service> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.serviceref.AComponentImpl" /> - <reference name="bReference" target="BComponent" /> - <reference name="cReference" target="CComponent" /> - <reference name="cServiceReference" target="CComponent" /> - <reference name="dReference1" target="DComponent" /> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.serviceref.BComponentImpl" /> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.serviceref.CComponentImpl" /> - </component> - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.serviceref.DComponentImpl" /> - </component> -</composite>
\ No newline at end of file diff --git a/java/sca/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/CallableReferenceRemoteTestCase.java b/java/sca/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/CallableReferenceRemoteTestCase.java deleted file mode 100644 index 843afe207c..0000000000 --- a/java/sca/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/CallableReferenceRemoteTestCase.java +++ /dev/null @@ -1,139 +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 org.apache.tuscany.sca.itest.serviceref; - -import static junit.framework.Assert.assertEquals; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.itest.serviceref.AComponent; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Runs a distributed domain in a single VM by using and in memory - * implementation of the distributed domain - */ -public class CallableReferenceRemoteTestCase { - - private static Node nodeA; - private static Node nodeB; - - private static AComponent acomponent; - - @BeforeClass - public static void init() throws Exception { - - try { - - System.out.println("Setting up nodes"); - - NodeFactory nodeFactory = NodeFactory.newInstance(); - - nodeA = nodeFactory.createNode("nodeA/CompositeA.composite", new Contribution("contrib","target/classes")); - nodeA.start(); - - nodeB = nodeFactory.createNode("nodeB/CompositeB.composite", new Contribution("contrib","target/classes")); - nodeB.start(); - - acomponent = nodeA.getService(AComponent.class, "AComponent/AComponent"); - - } catch (Throwable ex) { - System.out.println(ex.toString()); - // Print detailed cause information. - ex.printStackTrace(); - StringBuffer sb = new StringBuffer(); - Throwable cause = ex.getCause(); - while ( cause != null ) { - sb.append( " " ); - System.out.println( sb.toString() + "Cause: " + cause ); - if (cause instanceof java.lang.reflect.InvocationTargetException) - System.out.println( sb.toString() + "Target Exception: " + ((java.lang.reflect.InvocationTargetException)cause).getTargetException() ); - cause = cause.getCause(); - } - } - } - - @AfterClass - public static void destroy() throws Exception { - // stop the nodes and hence the domains they contain - nodeA.stop(); - nodeB.stop(); - } - - //@Test - public void testKeepServerRunning1() throws Exception { - System.out.println("press enter to continue"); - System.in.read(); - } - - @Test - public void testBReference() { - assertEquals("BComponent", acomponent.fooB()); - } - - @Test - public void testBCast() { - assertEquals("BComponent", acomponent.fooB1()); - } - - @Test - public void testCReference() { - assertEquals("CComponent", acomponent.fooC()); - } - - @Test - public void testCServiceReference() { - assertEquals("CComponent", acomponent.fooC1()); - } - - @Test - public void testDReferenceString() { - assertEquals("DAComponent", acomponent.fooStringD()); - } - - @Test - @Ignore - public void testDReference() { - assertEquals("DAComponent", acomponent.fooD()); - } - - - @Test - @Ignore - public void testBCReference() { - assertEquals("BCComponent", acomponent.fooBC()); - } - - @Test - public void testRequiredFalseReference() { - try { - acomponent.invokeDReference(); - } catch (Exception e) { - Assert.assertTrue(true); - } - } - -} diff --git a/java/sca/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/ServiceReferenceTestCase.java b/java/sca/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/ServiceReferenceTestCase.java deleted file mode 100644 index 1a454c939a..0000000000 --- a/java/sca/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/ServiceReferenceTestCase.java +++ /dev/null @@ -1,88 +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 org.apache.tuscany.sca.itest.serviceref; - -import static junit.framework.Assert.assertEquals; -import junit.framework.Assert; - -import org.apache.tuscany.sca.itest.serviceref.AComponent; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class ServiceReferenceTestCase { - private static Node node; - private static AComponent acomponent; - - @BeforeClass - public static void init() throws Exception { - node = NodeFactory.newInstance().createNode("ServiceReferenceTest.composite", - new Contribution("contrib","src/main/resources/servicereference")); - node.start(); - acomponent = node.getService(AComponent.class, "AComponent"); - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testBReference() { - assertEquals("BComponent", acomponent.fooB()); - } - - @Test - public void testBCast() { - assertEquals("BComponent", acomponent.fooB1()); - } - - @Test - public void testCReference() { - assertEquals("CComponent", acomponent.fooC()); - } - - @Test - public void testCServiceReference() { - assertEquals("CComponent", acomponent.fooC1()); - } - - @Test - public void testDReference() { - assertEquals("DAComponent", acomponent.fooD()); - } - - @Test - public void testBCReference() { - assertEquals("BCComponent", acomponent.fooBC()); - } - - @Test - public void testRequiredFalseReference() { - try { - acomponent.invokeDReference(); - } catch (Exception e) { - Assert.assertTrue(true); - } - } - -} diff --git a/java/sca/itest/services/pom.xml b/java/sca/itest/services/pom.xml deleted file mode 100644 index 7564ee1c9a..0000000000 --- a/java/sca/itest/services/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-services</artifactId> - <name>Apache Tuscany SCA iTest Services</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - </dependencies> - -</project> diff --git a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java b/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java deleted file mode 100644 index 26e58dc530..0000000000 --- a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java +++ /dev/null @@ -1,27 +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 org.apache.tuscany.sca.itest.services; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface AComponent { - String foo(); -} diff --git a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java b/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java deleted file mode 100644 index 627ff4976f..0000000000 --- a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.itest.services; - -public class AComponentImpl implements AComponent { - - public String foo() { - return "AComponent"; - } - -} diff --git a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java b/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java deleted file mode 100644 index d04bd1b985..0000000000 --- a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java +++ /dev/null @@ -1,25 +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 org.apache.tuscany.sca.itest.services; - -public interface BComponent { - - String foo(); -} diff --git a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java b/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java deleted file mode 100644 index 01df89a8fa..0000000000 --- a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.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 org.apache.tuscany.sca.itest.services; - -import org.oasisopen.sca.annotation.Service; - -@Service(BComponent.class) -public class BComponentImpl implements BComponent { - - public String foo() { - return "BComponent"; - } - -} diff --git a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java b/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java deleted file mode 100644 index 07397e4502..0000000000 --- a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java +++ /dev/null @@ -1,27 +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 org.apache.tuscany.sca.itest.services; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CComponent { - String foo(); -} diff --git a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java b/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java deleted file mode 100644 index 8713e5ab22..0000000000 --- a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java +++ /dev/null @@ -1,28 +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 org.apache.tuscany.sca.itest.services; - -public class CComponentImpl implements CComponent { - - public String foo() { - return "CComponent"; - } - -} diff --git a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java b/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java deleted file mode 100644 index 842a85e000..0000000000 --- a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java +++ /dev/null @@ -1,24 +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 org.apache.tuscany.sca.itest.services; - -public interface D1Component { - String foo1(); -} diff --git a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java b/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java deleted file mode 100644 index 8a3923b351..0000000000 --- a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java +++ /dev/null @@ -1,24 +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 org.apache.tuscany.sca.itest.services; - -public interface DComponent { - String foo(); -} diff --git a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java b/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java deleted file mode 100644 index e52692fbf4..0000000000 --- a/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.itest.services; - -import org.oasisopen.sca.annotation.Service; - -@Service({DComponent.class, D1Component.class}) -public class DComponentImpl implements DComponent, D1Component { - - public String foo() { - return "DComponent"; - } - - public String foo1() { - return "DComponent"; - } -} diff --git a/java/sca/itest/services/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/services/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index e21261d8d0..0000000000 --- a/java/sca/itest/services/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:foo="http://foo"> - <deployable composite="foo:InnerServicesTest" /> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/services/src/main/resources/ServicesTest.composite b/java/sca/itest/services/src/main/resources/ServicesTest.composite deleted file mode 100644 index e7d56032ea..0000000000 --- a/java/sca/itest/services/src/main/resources/ServicesTest.composite +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" xmlns:foo="http://foo" targetNamespace="http://foo" - name="InnerServicesTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - - <component name="AComponent1"> - <implementation.java class="org.apache.tuscany.sca.itest.services.AComponentImpl" /> - </component> - - <component name="AComponent2"> - <implementation.java class="org.apache.tuscany.sca.itest.services.AComponentImpl" /> - <service name="AComponent"> - <interface.java interface="org.apache.tuscany.sca.itest.services.AComponent" /> - </service> - </component> - - <component name="BComponent1"> - <implementation.java class="org.apache.tuscany.sca.itest.services.BComponentImpl" /> - </component> - - <component name="BComponent2"> - <implementation.java class="org.apache.tuscany.sca.itest.services.BComponentImpl" /> - <service name="BComponent"> - <interface.java interface="org.apache.tuscany.sca.itest.services.BComponent" /> - </service> - </component> - - <component name="CComponent1"> - <implementation.java class="org.apache.tuscany.sca.itest.services.CComponentImpl" /> - </component> - - <component name="CComponent2"> - <implementation.java class="org.apache.tuscany.sca.itest.services.CComponentImpl" /> - <service name="CComponent"> - <interface.java interface="org.apache.tuscany.sca.itest.services.CComponent" /> - </service> - </component> - - <component name="DComponent1"> - <implementation.java class="org.apache.tuscany.sca.itest.services.DComponentImpl" /> - </component> - - <component name="DComponent2"> - <implementation.java class="org.apache.tuscany.sca.itest.services.DComponentImpl" /> - <service name="DComponent"> - <interface.java interface="org.apache.tuscany.sca.itest.services.DComponent" /> - </service> - <service name="D1Component"> - <interface.java interface="org.apache.tuscany.sca.itest.services.D1Component" /> - </service> - </component> - -</composite>
\ No newline at end of file diff --git a/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java b/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java deleted file mode 100644 index da779b2c54..0000000000 --- a/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java +++ /dev/null @@ -1,108 +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 org.apache.tuscany.sca.itest.services; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.oasisopen.sca.ServiceRuntimeException; - -public class ServicesTestCase { - private static Node node; - - @BeforeClass - public static void init() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("ServicesTest.composite"); - node = NodeFactory.newInstance().createNode("ServicesTest.composite", new Contribution("c1", location)); - node.start(); - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testAService() { - AComponent a1 = node.getService(AComponent.class, "AComponent1"); - assertEquals("AComponent", a1.foo()); - - AComponent a2 = node.getService(AComponent.class, "AComponent2/AComponent"); - assertEquals("AComponent", a2.foo()); - } - - @Test - public void testBService() { - BComponent a1 = node.getService(BComponent.class, "BComponent1"); - assertEquals("BComponent", a1.foo()); - - BComponent a2 = node.getService(BComponent.class, "BComponent2/BComponent"); - assertEquals("BComponent", a2.foo()); - } - - @Test - public void testCService() { - CComponent a1 = node.getService(CComponent.class, "CComponent1"); - assertEquals("CComponent", a1.foo()); - - CComponent a2 = node.getService(CComponent.class, "CComponent2/CComponent"); - assertEquals("CComponent", a2.foo()); - } - - @Test - public void testDService() { - DComponent a1 = node.getService(DComponent.class, "DComponent1/DComponent"); - assertEquals("DComponent", a1.foo()); - - D1Component a2 = node.getService(D1Component.class, "DComponent1/D1Component"); - assertEquals("DComponent", a2.foo1()); - - try { - node.getService(DComponent.class, "DComponent1"); - Assert.fail("The service name is required"); - } catch (ServiceRuntimeException e) { - Assert.assertTrue("The service name is required", true); - } - - DComponent a3 = node.getService(DComponent.class, "DComponent2/DComponent"); - assertEquals("DComponent", a3.foo()); - - D1Component a4 = node.getService(D1Component.class, "DComponent2/D1Component"); - assertEquals("DComponent", a4.foo1()); - - } - - public static void main(String[] args) throws Exception { - ServicesTestCase.init(); - ServicesTestCase tester = new ServicesTestCase(); - tester.testAService(); - tester.testBService(); - tester.testCService(); - tester.testDService(); - ServicesTestCase.destroy(); - } -} diff --git a/java/sca/itest/wires/pom.xml b/java/sca/itest/wires/pom.xml deleted file mode 100644 index 73868c649e..0000000000 --- a/java/sca/itest/wires/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-wires</artifactId> - <name>Apache Tuscany SCA iTest Wires Basic</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>2.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - </dependencies> -</project> diff --git a/java/sca/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java b/java/sca/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java deleted file mode 100644 index f5a4337254..0000000000 --- a/java/sca/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java +++ /dev/null @@ -1,34 +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 org.apache.tuscany.sca.itest; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the client interface for the wires tests - */ -@Remotable -public interface WireClient { - - /** - * This tests the wires. - */ - void runTests(); -} diff --git a/java/sca/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java b/java/sca/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java deleted file mode 100644 index 82f0e26d58..0000000000 --- a/java/sca/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java +++ /dev/null @@ -1,51 +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 org.apache.tuscany.sca.itest; - -import org.junit.Assert; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This is the client implementation for the wires tests - */ -@Service(WireClient.class) -public class WireClientImpl implements WireClient { - /** - * This is our injected reference to the WireService - */ - @Reference - protected WireService aWireService; - - /** - * This tests the wire reference - */ - public void runTests() { - // Make sure the wire has injected a reference - Assert.assertNotNull(aWireService); - - // Test the injected reference - String msg = aWireService.sayHello("MCC"); - - // Validate the response - Assert.assertNotNull(msg); - Assert.assertEquals("Hello MCC", msg); - } -} diff --git a/java/sca/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java b/java/sca/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java deleted file mode 100644 index 67df1e3a52..0000000000 --- a/java/sca/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java +++ /dev/null @@ -1,36 +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 org.apache.tuscany.sca.itest; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * Sample Wire Service - */ -@Remotable -public interface WireService { - /** - * Returns "Hello " + aName - * - * @param aName The name to say hello - * @return "Hello " + aName - */ - String sayHello(String aName); -} diff --git a/java/sca/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java b/java/sca/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java deleted file mode 100644 index f0308252ba..0000000000 --- a/java/sca/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java +++ /dev/null @@ -1,39 +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 org.apache.tuscany.sca.itest; - -import org.oasisopen.sca.annotation.Service; - -/** - * Sample WireService Implementation - */ -@Service(WireService.class) -public class WireServiceImpl implements WireService { - - /** - * Returns "Hello " + aName - * - * @param aName The name to say hello - * @return "Hello " + aName - */ - public String sayHello(String aName) { - return "Hello " + aName; - } -} diff --git a/java/sca/itest/wires/src/main/resources/WireTest.composite b/java/sca/itest/wires/src/main/resources/WireTest.composite deleted file mode 100644 index 614beaec00..0000000000 --- a/java/sca/itest/wires/src/main/resources/WireTest.composite +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" targetNamespace="http://wires" name="WireTest"> - - <component name="WireClient"> - <implementation.java class="org.apache.tuscany.sca.itest.WireClientImpl"/> -<!-- We are not using a reference - we are using a wire - see below --> -<!-- The equivalent reference for the wire would be as follows --> -<!-- <reference name="aWireService" target="WireService"/>--> - </component> - - <component name="AnotherWireClient"> - <implementation.java class="org.apache.tuscany.sca.itest.WireClientImpl"/> - </component> - - <component name="WireServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.WireServiceImpl"/> - </component> - - <wire source="WireClient/aWireService" target="WireServiceComponent"/> - <wire source="AnotherWireClient/aWireService" target="WireServiceComponent/WireService"/> -</composite> diff --git a/java/sca/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java b/java/sca/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java deleted file mode 100644 index 2a0095cabc..0000000000 --- a/java/sca/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java +++ /dev/null @@ -1,78 +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 org.apache.tuscany.sca.itest; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -/** - * This test case will attempt to use a wire - */ -public class WireTestCase { - - /** - * The Node we are using - */ - private Node node; - - /** - * The client the tests should use - */ - private WireClient aWireClient; - - /** - * Run the wire tests - */ - @Test - public void testWire() { - aWireClient.runTests(); - } - - /** - * Load the Wire composite and look up the client. - */ - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("WireTest.composite"); - node = NodeFactory.newInstance().createNode("WireTest.composite", new Contribution("c1", location)); - node.start(); - aWireClient = node.getService(WireClient.class, "WireClient"); - Assert.assertNotNull(aWireClient); - - aWireClient = node.getService(WireClient.class, "AnotherWireClient"); - Assert.assertNotNull(aWireClient); - } - - /** - * Shutdown the SCA node - */ - - @After - public void tearDown() throws Exception { - node.stop(); - } -} |