diff options
Diffstat (limited to 'tags/java/sca/1.0/itest/old')
114 files changed, 0 insertions, 9444 deletions
diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/pom.xml b/tags/java/sca/1.0/itest/old/bindings/bindingsclient/pom.xml deleted file mode 100644 index 8e2fac4669..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.0-incubating</version> - <relativePath>../../pom.xml</relativePath> - </parent> - - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.tuscany.testing.bindingstest</groupId> - <artifactId>itest-bindings-bindingsclient</artifactId> - <packaging>jar</packaging> - <name>SCA FVT Bindings Test Tool JSP Client</name> - - <dependencies> - - <dependency> - <groupId>org.apache.tuscany.testing.bindingstest</groupId> - <artifactId>itest-bindings-bindingscomposite</artifactId> - <version>1.0-incubating</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.testing.bindingstest</groupId> - <artifactId>itest-bindings-bindingsutility</artifactId> - <version>1.0-incubating</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-databinding-sdo</artifactId> - <version>1.0-incubating</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sdo</groupId> - <artifactId>tuscany-sdo-api-r2.1</artifactId> - <version>1.0-incubating</version> - <scope>runtime</scope> - </dependency> - </dependencies> - -</project> diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java b/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java deleted file mode 100644 index 44801846f6..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.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; - -import org.osoa.sca.annotations.Remotable; - -/** - * SCA Test Tool Service - */ - -@Remotable -public interface SCATestToolService { - - public String doOneHopPing(String input); - - public String doTwoHopPing(String input); - - public String doDataTypeTest(String input); - - public String getCallbackBuffer(); - - public void clearCallbackBuffer(); -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/resources/bindingsclient.composite b/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/resources/bindingsclient.composite deleted file mode 100644 index ca3ff6494e..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/resources/bindingsclient.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" xmlns:v="http://www.osoa.org/xmlns/sca/values/1.0" - xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" - xmlns:dbsdo="http://incubator.apache.org/tuscany/xmlns/databinding/sdo/1.0-incubator-M2" - name="bindingsclient"> - - <!-- - <reference name="SCATestToolSCAReference"> - <interface.java interface="org.apache.tuscany.sca.itest.SCATestToolService"/> - <binding.sca uri="SCATestToolSCAServiceComponent"/> - </reference> - --> - - <reference name="SCATestToolWSReference"> - <interface.java interface="org.apache.tuscany.sca.itest.SCATestToolService" /> - <binding.ws endpoint="http://scatesttool.scabeta1fvt#wsdl.endpoint(SCATestToolService/SCATestToolServiceSoapPort)" - location="wsdl/testtool.wsdl" /> - </reference> - - <!-- - <reference name="SCATestToolEJBReference"> - <interface.java interface="org.apache.tuscany.sca.itest.SCATestToolService"/> - <binding.ejb uri="corbaname:iiop:localhost:2811/NameServiceServerRoot#ejb/scabeta1fvt/scatesttool/SCATestToolServiceHome"/> - </reference> - - --> -</composite> - diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/resources/wsdl/testtool.wsdl b/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/resources/wsdl/testtool.wsdl deleted file mode 100644 index 7dc608f063..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/resources/wsdl/testtool.wsdl +++ /dev/null @@ -1,272 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT 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://scatesttool.scabeta1fvt" xmlns:impl="http://scatesttool.scabeta1fvt"
- xmlns:tns="http://scatesttool.scabeta1fvt" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="testtool"> - <wsdl:types> - <schema targetNamespace="http://scatesttool.scabeta1fvt" xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <element name="doOneHopPingResponse"> - <complexType> - <sequence> - <element name="doOneHopPingReturn" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="doTwoHopPing"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="doTwoHopPingResponse"> - <complexType> - <sequence> - <element name="doTwoHopPingReturn" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="doDataTypeTest"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="doDataTypeTestResponse"> - <complexType> - <sequence> - <element name="doDataTypeTestReturn" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="getCallbackBuffer"> - <complexType> - <sequence /> - </complexType> - </element> - <element name="getCallbackBufferResponse"> - <complexType> - <sequence> - <element name="getCallbackBufferReturn" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="clearCallbackBuffer"> - <complexType> - <sequence /> - </complexType> - </element> - <element name="clearCallbackBufferResponse"> - <complexType> - <sequence /> - </complexType> - </element> - <element name="doOneHopPing"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - </schema> - </wsdl:types> - - <wsdl:message name="doOneHopPingResponse"> - <wsdl:part element="tns:doOneHopPingResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="doDataTypeTestResponse"> - <wsdl:part element="tns:doDataTypeTestResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="clearCallbackBufferResponse"> - <wsdl:part element="tns:clearCallbackBufferResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="getCallbackBufferRequest"> - <wsdl:part element="tns:getCallbackBuffer" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="doTwoHopPingRequest"> - <wsdl:part element="tns:doTwoHopPing" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="doTwoHopPingResponse"> - <wsdl:part element="tns:doTwoHopPingResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="getCallbackBufferResponse"> - <wsdl:part element="tns:getCallbackBufferResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="clearCallbackBufferRequest"> - <wsdl:part element="tns:clearCallbackBuffer" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="doDataTypeTestRequest"> - <wsdl:part element="tns:doDataTypeTest" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="doOneHopPingRequest"> - <wsdl:part element="tns:doOneHopPing" name="parameters" /> - - </wsdl:message> - - <wsdl:portType name="SCATestToolService"> - <wsdl:operation name="doOneHopPing"> - <wsdl:input message="tns:doOneHopPingRequest" name="doOneHopPingRequest" /> - - <wsdl:output message="tns:doOneHopPingResponse" name="doOneHopPingResponse" /> - - </wsdl:operation> - - <wsdl:operation name="doTwoHopPing"> - <wsdl:input message="tns:doTwoHopPingRequest" name="doTwoHopPingRequest" /> - - <wsdl:output message="tns:doTwoHopPingResponse" name="doTwoHopPingResponse" /> - - </wsdl:operation> - - <wsdl:operation name="doDataTypeTest"> - <wsdl:input message="tns:doDataTypeTestRequest" name="doDataTypeTestRequest" /> - - <wsdl:output message="tns:doDataTypeTestResponse" name="doDataTypeTestResponse" /> - - </wsdl:operation> - - <wsdl:operation name="getCallbackBuffer"> - <wsdl:input message="tns:getCallbackBufferRequest" name="getCallbackBufferRequest" /> - - <wsdl:output message="tns:getCallbackBufferResponse" name="getCallbackBufferResponse" /> - - </wsdl:operation> - - <wsdl:operation name="clearCallbackBuffer"> - <wsdl:input message="tns:clearCallbackBufferRequest" name="clearCallbackBufferRequest" /> - - <wsdl:output message="tns:clearCallbackBufferResponse" name="clearCallbackBufferResponse" /> - - </wsdl:operation> - - </wsdl:portType> - - <wsdl:binding name="SCATestToolServiceSoapBinding" type="tns:SCATestToolService"> - <!-- <wsaw:UsingAddressing wsdl:required="false" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"/> --> - - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - - <wsdl:operation name="doOneHopPing"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="doOneHopPingRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="doOneHopPingResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="doTwoHopPing"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="doTwoHopPingRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="doTwoHopPingResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="doDataTypeTest"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="doDataTypeTestRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="doDataTypeTestResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="getCallbackBuffer"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="getCallbackBufferRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="getCallbackBufferResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="clearCallbackBuffer"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="clearCallbackBufferRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="clearCallbackBufferResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - </wsdl:binding> - - <wsdl:service name="SCATestToolService"> - <wsdl:port binding="tns:SCATestToolServiceSoapBinding" name="SCATestToolServiceSoapPort"> - <wsdlsoap:address location="http://localhost:8085/services/SCATestToolWSService" /> - - </wsdl:port> - - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/webapp/SCATestTool.jsp b/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/webapp/SCATestTool.jsp deleted file mode 100644 index eb219e4cef..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/webapp/SCATestTool.jsp +++ /dev/null @@ -1,130 +0,0 @@ -<%--/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
- --%>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<%--
- * SCATestService.java
- * written by Chris Ortiz
- * interface class for basic test service
- * version .1 9/22/2006
- *
- *
- --%>
-
-
-<HTML>
-<HEAD>
- <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1" session="true" autoFlush="true"
- isThreadSafe="true" isErrorPage="false"
- import="org.apache.tuscany.sca.itest.SCATestToolService"
- import="java.io.PrintWriter"
- import="java.io.StringWriter"
- import="org.osoa.sca.CurrentCompositeContext"
- import="org.osoa.sca.CompositeContext"
- %>
- <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <META name="GENERATOR" content="IBM Software Development Platform">
- <TITLE>SCA FVT Test Service Driver</TITLE>
-</HEAD>
-
-<BODY bgcolor="#c8d8f8">
-<H2>SCA FVT Test Tool Client</H2>
-
-<form action="SCATestTool.jsp" method="get"><HR><BR>Choose Binding type:<BR><BR>
- <INPUT type="radio" name="bind" value="WS"> WS Binding
- <INPUT type="radio" name="bind" value="EJB"> EJB Binding
- <INPUT type="radio" name="bind" value="SCA" checked> Default Binding<BR><BR><HR>
- <BR>Check Tests to run:<BR><BR>
- <INPUT type="checkbox" name="test" value="Ping First Composite" checked> Ping First Composite
- <INPUT type="checkbox" name="test" value="Ping Second Composite"> Ping Second Composite<BR><BR>
- <INPUT type="checkbox" name="test" value="Data Type Test"> Data Type Test<BR><BR>
- <INPUT type="checkbox" name="test" value="Async One Way"> Async One Way
- <INPUT type="checkbox" name="test" value="Async Callback"> Async Call Back<BR><BR>
-
-
- <BR>
- <INPUT type="submit" value="Run Test"></FORM>
-<BR>
-
- <%
-
- String bindingchoice = request.getParameter("bind");
- String[] selected = request.getParameterValues("test");
-
- try {
- SCATestToolService scaTestTool;
- if (bindingchoice.equals("WS")) {
- CompositeContext compositeContext = CurrentCompositeContext.getContext();
- scaTestTool = (SCATestToolService) compositeContext.locateService(SCATestToolService.class, "SCATestToolWSReference");
- } else if (bindingchoice.equals("EJB")) {
- CompositeContext compositeContext = CurrentCompositeContext.getContext();
- scaTestTool = (SCATestToolService) compositeContext.locateService(SCATestToolService.class, "SCATestToolEJBReference");
- } else {
- // assume default binding
- CompositeContext compositeContext = CurrentCompositeContext.getContext();
- scaTestTool = (SCATestToolService) compositeContext.locateService(SCATestToolService.class, "SCATestToolSCAReference");
- }
- if (selected != null && selected.length != 0) {
- for (int i = 0; i < selected.length; i++) {
- String value = null;
- if (null != selected[i] && selected[i].equals("Ping First Composite")) {
- value = scaTestTool.doOneHopPing("brio");
- } else if (null != selected[i] && selected[i].equals("Ping Second Composite")){
- value = scaTestTool.doTwoHopPing("brio");
- } else if (null != selected[i] && selected[i].equals("Data Type Test")){
- value = scaTestTool.doDataTypeTest("brio");
- } else if (null != selected[i] && selected[i].equals("Async One Way")){
- value = "Ut Oh! Test tool not complete for oneway testing";
- } else if (null != selected[i] && selected[i].equals("Async Callback")){
- value = "Ut Oh! Test tool not complete for async testing";
- } else {
- value = "Ut Oh! unknown test";
- }
-
-%>
-
-<HR>
-Results from <%=selected[i]%> test with <%=bindingchoice%> binding:
-<P><%=value%>
- <%
- } //for
- } //if
-
- }catch(Exception e){
- e.printStackTrace();
- StringWriter sw= new StringWriter();
- PrintWriter pw= new PrintWriter(sw);
-
- e.printStackTrace(pw);
- pw.flush();
-
-%>
- Whoops!<BR clear="all">
-<PRE>
- Exception "<%=e.getClass().getName()%>" Exception message: "<%=e.getMessage()%>"<BR clear="all">
- <%=sw.toString() %>
-</PRE>
-<% } //catch
-
-%>
-
-</BODY>
-</HTML>
\ No newline at end of file diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/webapp/WEB-INF/web.xml b/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index fd58cb8b0e..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/main/webapp/WEB-INF/web.xml +++ /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. - */ - --> - -<!DOCTYPE web-app PUBLIC - "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" - "http://java.sun.com/dtd/web-app_2_3.dtd" > - -<web-app> - <display-name>SCA Test Service Driver</display-name> - <welcome-file-list id="WelcomeFileList"> - <welcome-file>SCATestTool.jsp</welcome-file> - </welcome-file-list> -</web-app> diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java b/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java deleted file mode 100644 index 6cc72c99a2..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.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 java.io.IOException; -import java.net.Socket; - -import junit.framework.TestCase; - -import org.apache.tuscany.api.SCARuntime; - -public class SCATestToolServerTest extends TestCase { - - @Override - protected void setUp() throws Exception { - SCARuntime.start("bindingscomposite-system.composite", "bindingscomposite.composite"); - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - @Override - protected void tearDown() throws Exception { - SCARuntime.stop(); - } - -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java b/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java deleted file mode 100644 index b5f076b7e8..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.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; - -import java.lang.reflect.UndeclaredThrowableException; - -import junit.framework.TestCase; - -import org.apache.tuscany.api.SCARuntime; -import org.apache.tuscany.core.test.SCATestCaseRunner; -import org.apache.tuscany.sca.util.SCATestUtilityServerTest; -import org.osoa.sca.CompositeContext; -import org.osoa.sca.CurrentCompositeContext; - -public class WSBindingsClientTestCase extends TestCase { - private SCATestToolService scaTestTool; - - private SCATestCaseRunner toolServer; - private SCATestCaseRunner utilityServer; - - // Hops over one composite - public void testOneHopPing() throws Throwable { - try { - assertTrue(scaTestTool.doOneHopPing("brio").contains("brio")); - } catch (UndeclaredThrowableException e) { - throw (e.getCause()); - } - } - - // Hops over two composites - public void testTwoHopPing() { - assertTrue(scaTestTool.doTwoHopPing("brio").contains("brio")); - } - - protected void setUp() throws Exception { - SCARuntime.start("bindingsclient.composite"); - - toolServer = new SCATestCaseRunner(SCATestToolServerTest.class); - toolServer.setUp(); - utilityServer = new SCATestCaseRunner(SCATestUtilityServerTest.class); - utilityServer.setUp(); - - CompositeContext cc = CurrentCompositeContext.getContext(); - System.out.println("Composite Name = " + cc.getName()); - System.out.println(CurrentCompositeContext.getContext()); - scaTestTool = - (SCATestToolService)CurrentCompositeContext.getContext().locateService(SCATestToolService.class, - "SCATestToolWSReference"); - if (scaTestTool == null) { - System.out.println("Yo Yo It is null"); - } else { - System.out.println("Yo Yo It is not null: " + scaTestTool); - } - - } - - @Override - protected void tearDown() throws Exception { - SCARuntime.stop(); - toolServer.tearDown(); - utilityServer.tearDown(); - } -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java b/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java deleted file mode 100644 index 0f6cb912a7..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.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.util; - - - -import java.io.IOException; -import java.net.Socket; - -import org.apache.tuscany.api.SCARuntime; - -import junit.framework.TestCase; - -public class SCATestUtilityServerTest extends TestCase { - - @Override - protected void setUp() throws Exception { - SCARuntime.start("bindingsutility-system.composite", "bindingsutility.composite"); - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8081); - } - - @Override - protected void tearDown() throws Exception { - SCARuntime.stop(); - } - -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/pom.xml b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/pom.xml deleted file mode 100644 index 9f35206c25..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -org.apache.tuscany.sdo<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.0-incubating</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.tuscany.testing.bindingstest</groupId> - <artifactId>itest-bindings-bindingscomposite</artifactId> - <packaging>jar</packaging> - <name>SCA FVT Bindings Test Tool Service Composite</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-databinding-sdo</artifactId> - <version>1.0-incubating</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sdo</groupId> - <artifactId>tuscany-sdo-api-r2.1</artifactId> - <version>1.0-incubating</version> - <scope>runtime</scope> - </dependency> - - <!-- SDO's XXXHelper.INSTANCE pattern requires the implementation --> - <dependency> - <groupId>org.apache.tuscany.sdo</groupId> - <artifactId>tuscany-sdo-impl</artifactId> - <version>1.0-incubating</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - -</project> diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelper.java b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelper.java deleted file mode 100644 index efe30c4f4e..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelper.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.math.BigDecimal; -import java.math.BigInteger; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.Random; -import java.util.Vector; - -import org.apache.tuscany.sca.util.SCATestUtilityService; - -public class SCADataTypeHelper { - - Date date; - Random ran; - SCATestUtilityService scaUtil; // change this to be the service provider - - public SCADataTypeHelper(SCATestUtilityService util) { - date = new Date(); - ran = new Random(date.getTime()); - scaUtil = util; - } - - public StringBuffer test_char() throws SCADataTypeHelperException { - - char x = 'a'; - x += ran.nextInt(26); // get a char a-z - StringBuffer rc = new StringBuffer("\nchar datatype test sending ==> " + x); - try { - char y = scaUtil.echo_char(x); - if (x == y) { - rc.append("\nchar successfully received ==> " + y); - } else { - throw new SCADataTypeHelperException(rc + "\nDatatype exception: char ==> " + y); - } - } catch (Exception e) { - throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_char\n" + e.toString()); - } - return rc; - } - - public StringBuffer test_String() throws SCADataTypeHelperException { - - String x = date.toString(); - StringBuffer rc = new StringBuffer("\nString datatype test sending ==> " + x); - try { - String y = scaUtil.echo_String(x); - if (x.equals(y)) { - rc.append("\nString successfully received ==> " + y); - } else { - throw new SCADataTypeHelperException(rc + "\nDatatype exception: String ==> " + y); - } - } catch (Exception e) { - throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_String\n" + e.toString()); - } - return rc; - } - - public StringBuffer test_int() throws SCADataTypeHelperException { - - int x = ran.nextInt(); - StringBuffer rc = new StringBuffer("\nint datatype test sending ==> " + x); - try { - int y = scaUtil.echo_int(x); - if (x == y) { - rc.append("\nint successfully received ==> " + y); - } else { - throw new SCADataTypeHelperException(rc + "\nDatatype exception: int ==> " + y); - } - } catch (Exception e) { - throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_int\n" + e.toString()); - } - return rc; - } - - public StringBuffer test_boolean() throws SCADataTypeHelperException { - - boolean x = ran.nextBoolean(); - StringBuffer rc = new StringBuffer("\nboolean datatype test sending ==> " + x); - try { - boolean y = scaUtil.echo_boolean(x); - if (x == y) { - rc.append("\nboolean successfully received ==> " + y); - } else { - throw new SCADataTypeHelperException(rc + "\nDatatype exception: boolean ==> " + y); - } - } catch (Exception e) { - throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_boolean\n" + e.toString()); - } - return rc; - } - - public StringBuffer test_long() throws SCADataTypeHelperException { - - long x = ran.nextLong(); - StringBuffer rc = new StringBuffer("\nlong datatype test sending ==> " + x); - try { - long y = scaUtil.echo_long(x); - if (x == y) { - rc.append("\nlong successfully received ==> " + y); - } else { - throw new SCADataTypeHelperException(rc + "\nDatatype exception: long ==> " + y); - } - } catch (Exception e) { - throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_long\n" + e.toString()); - } - return rc; - } - - public StringBuffer test_short() throws SCADataTypeHelperException { - - short x = (short)ran.nextInt(); - StringBuffer rc = new StringBuffer("\nshort datatype test sending ==> " + x); - try { - short y = scaUtil.echo_short(x); - if (x == y) { - rc.append("\nshort successfully received ==> " + y); - } else { - throw new SCADataTypeHelperException(rc + "\nDatatype exception: short ==> " + y); - } - } catch (Exception e) { - throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_short\n" + e.toString()); - } - return rc; - } - - public StringBuffer test_float() throws SCADataTypeHelperException { - - float x = ran.nextFloat(); - StringBuffer rc = new StringBuffer("\nfloat datatype test sending ==> " + x); - try { - float y = scaUtil.echo_float(x); - if (x == y) { - rc.append("\nfloat successfully received ==> " + y); - } else { - throw new SCADataTypeHelperException(rc + "\nDatatype exception: float ==> " + y); - } - } catch (Exception e) { - throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_float " + e.toString()); - } - return rc; - } - - public StringBuffer test_double() throws SCADataTypeHelperException { - - double x = ran.nextDouble(); - StringBuffer rc = new StringBuffer("\ndouble datatype test sending ==> " + x); - try { - double y = scaUtil.echo_double(x); - if (x == y) { - rc.append("\ndouble successfully received ==> " + y); - } else { - throw new SCADataTypeHelperException(rc + "\nDatatype exception: double ==> " + y); - } - } catch (Exception e) { - throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_double\n" + e.toString()); - } - return rc; - } - - public StringBuffer test_BigInteger() throws SCADataTypeHelperException { - - BigInteger x = new BigInteger(ran.nextInt(32) + 32, ran); // between - // 32 - 64 - // bitLength - StringBuffer rc = new StringBuffer("\nBigInteger datatype test sending ==> " + x); - try { - BigInteger y = scaUtil.echo_BigInteger(x); - if (x.equals(y)) { - rc.append("\nBigInteger successfully received ==> " + y); - } else { - throw new SCADataTypeHelperException("\n" + rc + "\nDatatype exception: BigInteger ==> " + y); - } - } catch (Exception e) { - throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_BigInteger\n" + e.toString()); - } - return rc; - } - - public StringBuffer test_BigDecimal() throws SCADataTypeHelperException { - - BigDecimal x = new BigDecimal(ran.nextDouble()); - StringBuffer rc = new StringBuffer("\nBigDecimal datatype test sending ==> " + x); - try { - BigDecimal y = scaUtil.echo_BigDecimal(x); - if (x.equals(y)) { - rc.append("\nBigDecimal successfully received ==> " + y); - } else { - throw new SCADataTypeHelperException("\n" + rc + "\nDatatype exception: BigDecimal ==> " + y); - } - } catch (Exception e) { - throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_BigDecimal\n" + e.toString()); - } - return rc; - } - - private StringBuffer test_Vector() throws SCADataTypeHelperException { - - Vector vector = new Vector(); - vector.addElement("DanW"); - vector.addElement(new Float(2000F)); - vector.addElement(new Short((short)11)); - StringBuffer rc = new StringBuffer("\nVector datatype test sending ==> " + vector.toString()); - boolean passed = true; - try { - Vector y = scaUtil.echo_Vector(vector); - if (((String)y.elementAt(0)).equals("DanW")) { - rc.append("\nVector element 0 string " + y.elementAt(0) + " successfully recieved"); - } else { - passed = false; - } - if ((((Float)y.elementAt(1)).equals((Float)vector.elementAt(1)))) { - rc.append("\nVector element 1 Float " + y.elementAt(1) + " successfully recieved"); - } else { - passed = false; - } - if (y.elementAt(2).equals(vector.elementAt(2))) { - rc.append("\nVector element 2 (Short) " + y.elementAt(2) + " successfully received"); - } else { - passed = false; - } - if (!passed) { - // - // one of the tests failed - // - rc.append("\nVector element 0 (String) " + y.elementAt(0) + " should be \"DanW\""); - rc.append("\nVector element 1 (Float) " + y.elementAt(1) + " should be \"2000F\""); - rc.append("\nVector element 2 (Short) " + y.elementAt(2) + " should be \"11\""); - throw new SCADataTypeHelperException("\n" + rc + "\nDataType exception: Vector ==> " + y); - } - } catch (Exception e) { - throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_Vector\n" + e.toString()); - } - return rc; - } - - public StringBuffer test_GregorianCalendar() throws SCADataTypeHelperException { - - GregorianCalendar x = new GregorianCalendar(); - StringBuffer rc = new StringBuffer("\nGregorianCalendar datatype test sending ==> " + x.toString()); - try { - GregorianCalendar y = scaUtil.echo_GregorianCalendar(x); - if (x.equals(y)) { - rc.append("\nGregorianCalendar successfully received ==> " + y); - } else { - throw new SCADataTypeHelperException("\n" + rc + "\nDatatype exception: GregorianCalendar ==> " + y); - } - } catch (Exception e) { - throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_GregorianCalendar\n" + e - .toString()); - } - return rc; - } - - public StringBuffer doDataType() { - - StringBuffer rc = new StringBuffer(); - try { - rc.append(test_boolean()); - } catch (SCADataTypeHelperException e) { - rc.append("\n" + e.toString() + "\n"); - } - try { - rc.append(test_char()); - } catch (SCADataTypeHelperException e) { - rc.append("\n" + e.toString() + "\n"); - } - try { - rc.append(test_String()); - } catch (SCADataTypeHelperException e) { - rc.append("\n" + e.toString() + "\n"); - } - try { - rc.append(test_int()); - } catch (SCADataTypeHelperException e) { - rc.append("\n" + e.toString()); - } - try { - rc.append(test_long()); - } catch (SCADataTypeHelperException e) { - rc.append("\n" + e.toString() + "\n"); - } - try { - rc.append(test_short()); - } catch (SCADataTypeHelperException e) { - rc.append("\n" + e.toString() + "\n"); - } - try { - rc.append(test_float()); - } catch (SCADataTypeHelperException e) { - rc.append("\n" + e.toString() + "\n"); - } - try { - rc.append(test_double()); - } catch (SCADataTypeHelperException e) { - rc.append("\n" + e.toString() + "\n"); - } - try { - rc.append(test_BigInteger()); - } catch (SCADataTypeHelperException e) { - rc.append("\n" + e.toString() + "\n"); - } - try { - rc.append(test_BigDecimal()); - } catch (SCADataTypeHelperException e) { - rc.append("\n" + e.toString() + "\n"); - } - try { - rc.append(test_Vector()); - } catch (SCADataTypeHelperException e) { - rc.append("\n" + e.toString() + "\n"); - } - try { - rc.append(test_GregorianCalendar()); - } catch (SCADataTypeHelperException e) { - rc.append("\n" + e.toString() + "\n"); - } catch (Exception e) { - rc.append("\n" + e.toString() + "\n"); - } - - return rc; - } -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelperException.java b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelperException.java deleted file mode 100644 index 074fba8057..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelperException.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.itest; - -public class SCADataTypeHelperException extends Exception { - - public SCADataTypeHelperException() { - } - - public SCADataTypeHelperException(String msg) { - super(msg); - } -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java deleted file mode 100644 index c55e22c905..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.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; - -/** - * SCA Test Tool Callback Service - */ -public interface SCATestToolCallbackService { - - public void pingCallBack(String reply); -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java deleted file mode 100644 index 44e799a566..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.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; - - -import java.io.IOException; - -import org.apache.tuscany.api.SCARuntime; - -public class SCATestToolServer { - - /** - * @param args - */ - public static void main(String[] args) { - - SCARuntime.start("bindingscomposite-system.composite", "bindingscomposite.composite"); - - try { - System.out.println("SCATestTool server started"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - SCARuntime.stop(); - System.out.println("SCATestTool server stopped"); - } - -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java deleted file mode 100644 index 67b7e8eb64..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.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.osoa.sca.annotations.Remotable; - -/** - * SCA Test Tool Service - */ - -@Remotable -public interface SCATestToolService { - - public String doOneHopPing(String input); - - public String doTwoHopPing(String input); - - public String doDataTypeTest(String input); - - public String getCallbackBuffer(); - - public void clearCallbackBuffer(); -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServiceImpl.java b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServiceImpl.java deleted file mode 100644 index e207a23927..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServiceImpl.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.itest; - -import org.apache.tuscany.sca.util.SCATestUtilityService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * SCA Test Service Implementation - */ - -@Service(SCATestToolService.class) -public class SCATestToolServiceImpl implements SCATestToolService, SCATestToolCallbackService { - @Reference - public SCATestUtilityService scaTestUtil; - - private String callbackBuffer = null; - - public String doOneHopPing(String input) { - System.out.println("Invoking SCATestToolServiceImpl.doOneHopPing()"); - StringBuffer rc = new StringBuffer(); - rc.append("doOneHopPing(): "); - rc.append(input); - return rc.toString(); - } - - public String doTwoHopPing(String input) { - System.out.println("Invoking SCATestToolServiceImpl.doTwoHopPing()"); - StringBuffer rc = new StringBuffer(); - rc.append("doTwoHopPing(): "); - rc.append(input); - rc.append(" --> "); - rc.append(scaTestUtil.ping(input)); - return rc.toString(); - } - - public String doDataTypeTest(String input) { - StringBuffer rc = new StringBuffer(); - rc.append("doDataTypeTest(): "); - rc.append(input); - rc.append(" --> "); - SCADataTypeHelper dataHelper = new SCADataTypeHelper(scaTestUtil); - rc.append(dataHelper.doDataType()); - return rc.toString(); - } - - public void pingCallBack(String reply) { - callbackBuffer = reply; - } - - public String getCallbackBuffer() { - return callbackBuffer; - } - - public void clearCallbackBuffer() { - callbackBuffer = null; - } - -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java deleted file mode 100644 index 0ceb553727..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.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.util; - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.Vector; -import java.util.GregorianCalendar; - -import org.apache.tuscany.sca.itest.SCATestToolCallbackService; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Remotable; - -/** - * SCA Test Utility Service - */ - -@Remotable -public interface SCATestUtilityService { - public String ping(String input); - - @Callback(SCATestToolCallbackService.class) - public void asyncping(); - - public int echo_int(int input); - - public short echo_short(short input); - - public long echo_long(long input); - - public float echo_float(float input); - - public double echo_double(double input); - - public boolean echo_boolean(boolean input); - - public char echo_char(char input); - - public String echo_String(String input); - - public BigDecimal echo_BigDecimal(BigDecimal input); - - public BigInteger echo_BigInteger(BigInteger input); - - public Vector echo_Vector(Vector input); - - public GregorianCalendar echo_GregorianCalendar(GregorianCalendar input); -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite-system.composite b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite-system.composite deleted file mode 100644 index 0b894bf701..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite-system.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.
--->
-<!--
- Tuscany system configuration.
-
- $Rev$ $Date$
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:t="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
- name="system">
-
- <include name="default-system"
- scdlResource="META-INF/tuscany/default-system.composite" />
- - <component name="httpserver"> - <t:implementation.system class="org.apache.tuscany.service.jetty.JettyServiceImpl" /> - <property name="httpPort">8085</property> - </component> -
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite.composite b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite.composite deleted file mode 100644 index 9b2bb51b9c..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite.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" xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" - xmlns:v="http://www.osoa.org/xmlns/sca/values/1.0" xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0" - name="bindingscomposite"> - - <!-- dbsdo:import.sdo location="wsdl/testtool.wsdl" / --> - <!-- dbsdo:import.sdo location="wsdl/testutility.wsdl" / --> - - <service name="SCATestToolWSService"> - <interface.wsdl interface="http://scatesttool.scabeta1fvt#wsdl.interface(SCATestToolService)" - wsdli:wsdlLocation="http://scatesttool.scabeta1fvt wsdl/testtool.wsdl" /> - <reference>SCATestToolWSServiceComponent</reference> - <binding.ws endpoint="http://scatesttool.scabeta1fvt#wsdl.endpoint(SCATestToolService/SCATestToolServiceSoapPort)" - location="wsdl/testtool.wsdl" uri="testtool" /> - </service> - - <component name="SCATestToolWSServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.SCATestToolServiceImpl" /> - <reference name="scaTestUtil">SCATestUtilityWSReference</reference> - </component> - - <reference name="SCATestUtilityWSReference"> - <interface.java interface="org.apache.tuscany.sca.util.SCATestUtilityService" /> - <binding.ws endpoint="http://scatestutil.scabeta1fvt#wsdl.endpoint(SCATestUtilityService/SCATestUtilityServiceSoapPort)" - location="wsdl/testutility.wsdl" /> - </reference> - - -</composite> - diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testtool.wsdl b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testtool.wsdl deleted file mode 100644 index 870af6ac2e..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testtool.wsdl +++ /dev/null @@ -1,272 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT 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://scatesttool.scabeta1fvt" xmlns:impl="http://scatesttool.scabeta1fvt"
- xmlns:tns="http://scatesttool.scabeta1fvt" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="testtool"> - <wsdl:types> - <schema targetNamespace="http://scatesttool.scabeta1fvt" xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <element name="doOneHopPingResponse"> - <complexType> - <sequence> - <element name="doOneHopPingReturn" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="doTwoHopPing"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="doTwoHopPingResponse"> - <complexType> - <sequence> - <element name="doTwoHopPingReturn" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="doDataTypeTest"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="doDataTypeTestResponse"> - <complexType> - <sequence> - <element name="doDataTypeTestReturn" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="getCallbackBuffer"> - <complexType> - <sequence /> - </complexType> - </element> - <element name="getCallbackBufferResponse"> - <complexType> - <sequence> - <element name="getCallbackBufferReturn" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="clearCallbackBuffer"> - <complexType> - <sequence /> - </complexType> - </element> - <element name="clearCallbackBufferResponse"> - <complexType> - <sequence /> - </complexType> - </element> - <element name="doOneHopPing"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - </schema> - </wsdl:types> - - <wsdl:message name="doOneHopPingResponse"> - <wsdl:part element="tns:doOneHopPingResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="doDataTypeTestResponse"> - <wsdl:part element="tns:doDataTypeTestResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="clearCallbackBufferResponse"> - <wsdl:part element="tns:clearCallbackBufferResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="getCallbackBufferRequest"> - <wsdl:part element="tns:getCallbackBuffer" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="doTwoHopPingRequest"> - <wsdl:part element="tns:doTwoHopPing" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="doTwoHopPingResponse"> - <wsdl:part element="tns:doTwoHopPingResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="getCallbackBufferResponse"> - <wsdl:part element="tns:getCallbackBufferResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="clearCallbackBufferRequest"> - <wsdl:part element="tns:clearCallbackBuffer" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="doDataTypeTestRequest"> - <wsdl:part element="tns:doDataTypeTest" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="doOneHopPingRequest"> - <wsdl:part element="tns:doOneHopPing" name="parameters" /> - - </wsdl:message> - - <wsdl:portType name="SCATestToolService"> - <wsdl:operation name="doOneHopPing"> - <wsdl:input message="tns:doOneHopPingRequest" name="doOneHopPingRequest" /> - - <wsdl:output message="tns:doOneHopPingResponse" name="doOneHopPingResponse" /> - - </wsdl:operation> - - <wsdl:operation name="doTwoHopPing"> - <wsdl:input message="tns:doTwoHopPingRequest" name="doTwoHopPingRequest" /> - - <wsdl:output message="tns:doTwoHopPingResponse" name="doTwoHopPingResponse" /> - - </wsdl:operation> - - <wsdl:operation name="doDataTypeTest"> - <wsdl:input message="tns:doDataTypeTestRequest" name="doDataTypeTestRequest" /> - - <wsdl:output message="tns:doDataTypeTestResponse" name="doDataTypeTestResponse" /> - - </wsdl:operation> - - <wsdl:operation name="getCallbackBuffer"> - <wsdl:input message="tns:getCallbackBufferRequest" name="getCallbackBufferRequest" /> - - <wsdl:output message="tns:getCallbackBufferResponse" name="getCallbackBufferResponse" /> - - </wsdl:operation> - - <wsdl:operation name="clearCallbackBuffer"> - <wsdl:input message="tns:clearCallbackBufferRequest" name="clearCallbackBufferRequest" /> - - <wsdl:output message="tns:clearCallbackBufferResponse" name="clearCallbackBufferResponse" /> - - </wsdl:operation> - - </wsdl:portType> - - <wsdl:binding name="SCATestToolServiceSoapBinding" type="tns:SCATestToolService"> - <!-- <wsaw:UsingAddressing wsdl:required="false" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"/> --> - - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - - <wsdl:operation name="doOneHopPing"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="doOneHopPingRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="doOneHopPingResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="doTwoHopPing"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="doTwoHopPingRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="doTwoHopPingResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="doDataTypeTest"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="doDataTypeTestRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="doDataTypeTestResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="getCallbackBuffer"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="getCallbackBufferRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="getCallbackBufferResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="clearCallbackBuffer"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="clearCallbackBufferRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="clearCallbackBufferResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - </wsdl:binding> - - <wsdl:service name="SCATestToolService"> - <wsdl:port binding="tns:SCATestToolServiceSoapBinding" name="SCATestToolServiceSoapPort"> - <wsdlsoap:address location="http://localhost:8085/services/SCATestToolWSService" /> - - </wsdl:port> - - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testutility.wsdl b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testutility.wsdl deleted file mode 100644 index 32d9050a61..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testutility.wsdl +++ /dev/null @@ -1,704 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT 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://scatestutil.scabeta1fvt" xmlns:impl="http://scatestutil.scabeta1fvt"
- xmlns:tns="http://scatestutil.scabeta1fvt" xmlns:tns2="http://xml.apache.org/xml-soap" xmlns:tns3="http://util.java"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="testutility"> - <wsdl:types> - - <schema elementFormDefault="qualified" targetNamespace="http://scatestutil.scabeta1fvt"
- xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns2="http://xml.apache.org/xml-soap"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <import namespace="http://xml.apache.org/xml-soap" /> - <element name="pingResponse"> - <complexType> - <sequence> - <element name="pingReturn" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="asyncping"> - <complexType> - <sequence /> - </complexType> - </element> - <element name="asyncpingResponse"> - <complexType> - <sequence /> - </complexType> - </element> - <element name="echo_int"> - <complexType> - <sequence> - <element name="input" type="xsd:int" /> - </sequence> - </complexType> - </element> - <element name="echo_intResponse"> - <complexType> - <sequence> - <element name="echo_intReturn" type="xsd:int" /> - </sequence> - </complexType> - </element> - <element name="echo_short"> - <complexType> - <sequence> - <element name="input" type="xsd:short" /> - </sequence> - </complexType> - </element> - <element name="echo_shortResponse"> - <complexType> - <sequence> - <element name="echo_shortReturn" type="xsd:short" /> - </sequence> - </complexType> - </element> - <element name="echo_long"> - <complexType> - <sequence> - <element name="input" type="xsd:long" /> - </sequence> - </complexType> - </element> - <element name="echo_longResponse"> - <complexType> - <sequence> - <element name="echo_longReturn" type="xsd:long" /> - </sequence> - </complexType> - </element> - <element name="echo_float"> - <complexType> - <sequence> - <element name="input" type="xsd:float" /> - </sequence> - </complexType> - </element> - <element name="echo_floatResponse"> - <complexType> - <sequence> - <element name="echo_floatReturn" type="xsd:float" /> - </sequence> - </complexType> - </element> - <element name="echo_double"> - <complexType> - <sequence> - <element name="input" type="xsd:double" /> - </sequence> - </complexType> - </element> - <element name="echo_doubleResponse"> - <complexType> - <sequence> - <element name="echo_doubleReturn" type="xsd:double" /> - </sequence> - </complexType> - </element> - <element name="echo_boolean"> - <complexType> - <sequence> - <element name="input" type="xsd:boolean" /> - </sequence> - </complexType> - </element> - <element name="echo_booleanResponse"> - <complexType> - <sequence> - <element name="echo_booleanReturn" type="xsd:boolean" /> - </sequence> - </complexType> - </element> - <element name="echo_char"> - <complexType> - <sequence> - <element name="input" type="tns2:char" /> - </sequence> - </complexType> - </element> - <element name="echo_charResponse"> - <complexType> - <sequence> - <element name="echo_charReturn" type="tns2:char" /> - </sequence> - </complexType> - </element> - <element name="echo_String"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="echo_StringResponse"> - <complexType> - <sequence> - <element name="echo_StringReturn" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="echo_BigDecimal"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:decimal" /> - </sequence> - </complexType> - </element> - <element name="echo_BigDecimalResponse"> - <complexType> - <sequence> - <element name="echo_BigDecimalReturn" minOccurs="0" type="xsd:decimal" /> - </sequence> - </complexType> - </element> - <element name="echo_BigInteger"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:integer" /> - </sequence> - </complexType> - </element> - <element name="echo_BigIntegerResponse"> - <complexType> - <sequence> - <element name="echo_BigIntegerReturn" minOccurs="0" type="xsd:integer" /> - </sequence> - </complexType> - </element> - <element name="echo_Vector"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="tns2:Vector" /> - </sequence> - </complexType> - </element> - <element name="echo_VectorResponse"> - <complexType> - <sequence> - <element name="echo_VectorReturn" minOccurs="0" type="tns2:Vector" /> - </sequence> - </complexType> - </element> - <element name="echo_GregorianCalendar"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:anyType" /> - </sequence> - </complexType> - </element> - <element name="echo_GregorianCalendarResponse"> - <complexType> - <sequence> - <element name="echo_GregorianCalendarReturn" minOccurs="0" type="xsd:anyType" /> - </sequence> - </complexType> - </element> - <element name="ping"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - </schema> - <schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <simpleType name="char"> - <restriction base="xsd:string"> - <length value="1" /> - </restriction> - </simpleType> - <complexType name="Vector"> - <sequence> - <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:anyType" /> - </sequence> - </complexType> - </schema> - </wsdl:types> - - <wsdl:message name="echo_StringRequest"> - <wsdl:part element="tns:echo_String" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_shortResponse"> - <wsdl:part element="tns:echo_shortResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="asyncpingRequest"> - <wsdl:part element="tns:asyncping" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="asyncpingResponse"> - <wsdl:part element="tns:asyncpingResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_doubleResponse"> - <wsdl:part element="tns:echo_doubleResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_BigDecimalResponse"> - <wsdl:part element="tns:echo_BigDecimalResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_shortRequest"> - <wsdl:part element="tns:echo_short" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_BigIntegerRequest"> - <wsdl:part element="tns:echo_BigInteger" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_VectorRequest"> - <wsdl:part element="tns:echo_Vector" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="pingResponse"> - <wsdl:part element="tns:pingResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_charResponse"> - <wsdl:part element="tns:echo_charResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_VectorResponse"> - <wsdl:part element="tns:echo_VectorResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_longRequest"> - <wsdl:part element="tns:echo_long" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_doubleRequest"> - <wsdl:part element="tns:echo_double" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_BigDecimalRequest"> - <wsdl:part element="tns:echo_BigDecimal" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_GregorianCalendarRequest"> - <wsdl:part element="tns:echo_GregorianCalendar" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_floatResponse"> - <wsdl:part element="tns:echo_floatResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_booleanRequest"> - <wsdl:part element="tns:echo_boolean" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_booleanResponse"> - <wsdl:part element="tns:echo_booleanResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_StringResponse"> - <wsdl:part element="tns:echo_StringResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_floatRequest"> - <wsdl:part element="tns:echo_float" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_GregorianCalendarResponse"> - <wsdl:part element="tns:echo_GregorianCalendarResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_intResponse"> - <wsdl:part element="tns:echo_intResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_longResponse"> - <wsdl:part element="tns:echo_longResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_charRequest"> - <wsdl:part element="tns:echo_char" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="pingRequest"> - <wsdl:part element="tns:ping" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_intRequest"> - <wsdl:part element="tns:echo_int" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_BigIntegerResponse"> - <wsdl:part element="tns:echo_BigIntegerResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:portType name="SCATestUtilityService"> - <wsdl:operation name="ping"> - <wsdl:input message="tns:pingRequest" name="pingRequest" /> - - <wsdl:output message="tns:pingResponse" name="pingResponse" /> - - </wsdl:operation> - - <wsdl:operation name="asyncping"> - <wsdl:input message="tns:asyncpingRequest" name="asyncpingRequest" /> - - <wsdl:output message="tns:asyncpingResponse" name="asyncpingResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_int"> - <wsdl:input message="tns:echo_intRequest" name="echo_intRequest" /> - - <wsdl:output message="tns:echo_intResponse" name="echo_intResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_short"> - <wsdl:input message="tns:echo_shortRequest" name="echo_shortRequest" /> - - <wsdl:output message="tns:echo_shortResponse" name="echo_shortResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_long"> - <wsdl:input message="tns:echo_longRequest" name="echo_longRequest" /> - - <wsdl:output message="tns:echo_longResponse" name="echo_longResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_float"> - <wsdl:input message="tns:echo_floatRequest" name="echo_floatRequest" /> - - <wsdl:output message="tns:echo_floatResponse" name="echo_floatResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_double"> - <wsdl:input message="tns:echo_doubleRequest" name="echo_doubleRequest" /> - - <wsdl:output message="tns:echo_doubleResponse" name="echo_doubleResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_boolean"> - <wsdl:input message="tns:echo_booleanRequest" name="echo_booleanRequest" /> - - <wsdl:output message="tns:echo_booleanResponse" name="echo_booleanResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_char"> - <wsdl:input message="tns:echo_charRequest" name="echo_charRequest" /> - - <wsdl:output message="tns:echo_charResponse" name="echo_charResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_String"> - <wsdl:input message="tns:echo_StringRequest" name="echo_StringRequest" /> - - <wsdl:output message="tns:echo_StringResponse" name="echo_StringResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_BigDecimal"> - <wsdl:input message="tns:echo_BigDecimalRequest" name="echo_BigDecimalRequest" /> - - <wsdl:output message="tns:echo_BigDecimalResponse" name="echo_BigDecimalResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_BigInteger"> - <wsdl:input message="tns:echo_BigIntegerRequest" name="echo_BigIntegerRequest" /> - - <wsdl:output message="tns:echo_BigIntegerResponse" name="echo_BigIntegerResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_Vector"> - <wsdl:input message="tns:echo_VectorRequest" name="echo_VectorRequest" /> - - <wsdl:output message="tns:echo_VectorResponse" name="echo_VectorResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_GregorianCalendar"> - <wsdl:input message="tns:echo_GregorianCalendarRequest" name="echo_GregorianCalendarRequest" /> - - <wsdl:output message="tns:echo_GregorianCalendarResponse" name="echo_GregorianCalendarResponse" /> - - </wsdl:operation> - - </wsdl:portType> - - <wsdl:binding name="SCATestUtilityServiceSoapBinding" type="tns:SCATestUtilityService"> - <!-- <wsaw:UsingAddressing wsdl:required="false" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"/> --> - - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - - <wsdl:operation name="ping"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="pingRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="pingResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="asyncping"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="asyncpingRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="asyncpingResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_int"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_intRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_intResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_short"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_shortRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_shortResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_long"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_longRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_longResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_float"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_floatRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_floatResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_double"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_doubleRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_doubleResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_boolean"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_booleanRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_booleanResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_char"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_charRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_charResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_String"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_StringRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_StringResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_BigDecimal"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_BigDecimalRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_BigDecimalResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_BigInteger"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_BigIntegerRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_BigIntegerResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_Vector"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_VectorRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_VectorResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_GregorianCalendar"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_GregorianCalendarRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_GregorianCalendarResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - </wsdl:binding> - - <wsdl:service name="SCATestUtilityService"> - <wsdl:port binding="tns:SCATestUtilityServiceSoapBinding" name="SCATestUtilityServiceSoapPort"> - <wsdlsoap:address location="http://localhost:8081/services/SCATestUtilityWSService" /> - - </wsdl:port> - - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java b/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java deleted file mode 100644 index 727eb2332f..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.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 java.io.IOException; -import java.net.Socket; - -import junit.framework.TestCase; - -import org.apache.tuscany.api.SCARuntime; - -public class SCATestToolServerTestCase extends TestCase { - - @Override - protected void setUp() throws Exception { - SCARuntime.start("bindingscomposite-system.composite", "bindingscomposite.composite"); - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - @Override - protected void tearDown() throws Exception { - SCARuntime.stop(); - } - -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/pom.xml b/tags/java/sca/1.0/itest/old/bindings/bindingsutility/pom.xml deleted file mode 100644 index 07f70030ae..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.0-incubating-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.tuscany.testing.bindingstest</groupId> - <artifactId>itest-bindings-bindingsutility</artifactId> - <packaging>jar</packaging> - <name>SCA FVT Bindings Test Tool Utility Composite</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-databinding-sdo</artifactId> - <version>1.0-incubating-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sdo</groupId> - <artifactId>tuscany-sdo-api-r2.1</artifactId> - <version>1.0-incubating</version> - <scope>runtime</scope> - </dependency> - - <!-- SDO's XXXHelper.INSTANCE pattern requires the implementation --> - <dependency> - <groupId>org.apache.tuscany.sdo</groupId> - <artifactId>tuscany-sdo-impl</artifactId> - <version>1.0-incubating</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - -</project> diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java b/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java deleted file mode 100644 index 664fb06930..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.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; - -/** - * SCA Test Tool Callback Service - */ - -public interface SCATestToolCallbackService { - - public void pingCallBack(String reply); -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java b/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java deleted file mode 100644 index cd967e275a..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.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.util; - - -import java.io.IOException; - -import org.apache.tuscany.api.SCARuntime; - -public class SCATestUtilityServer { - - /** - * @param args - */ - public static void main(String[] args) { - - SCARuntime.start("bindingsutility-system.composite", "bindingsutility.composite"); - - try { - System.out.println("SCATestUtility server started"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - SCARuntime.stop(); - System.out.println("SCATestUtility server stopped"); - } - -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java b/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java deleted file mode 100644 index 0ceb553727..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.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.util; - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.Vector; -import java.util.GregorianCalendar; - -import org.apache.tuscany.sca.itest.SCATestToolCallbackService; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Remotable; - -/** - * SCA Test Utility Service - */ - -@Remotable -public interface SCATestUtilityService { - public String ping(String input); - - @Callback(SCATestToolCallbackService.class) - public void asyncping(); - - public int echo_int(int input); - - public short echo_short(short input); - - public long echo_long(long input); - - public float echo_float(float input); - - public double echo_double(double input); - - public boolean echo_boolean(boolean input); - - public char echo_char(char input); - - public String echo_String(String input); - - public BigDecimal echo_BigDecimal(BigDecimal input); - - public BigInteger echo_BigInteger(BigInteger input); - - public Vector echo_Vector(Vector input); - - public GregorianCalendar echo_GregorianCalendar(GregorianCalendar input); -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServiceImpl.java b/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServiceImpl.java deleted file mode 100644 index e752e4d6e6..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServiceImpl.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.util; - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.net.InetAddress; -import java.util.GregorianCalendar; -import java.util.Properties; -import java.util.Vector; - -import org.osoa.sca.annotations.Service; - -@Service(SCATestUtilityService.class) -public class SCATestUtilityServiceImpl implements SCATestUtilityService { - - // private SCATestToolCallbackService utilCallBack; - - /** - * The setter used by the runtime to set the callback reference - * - * @param myServiceCallback - */ - - // @Callback - // public void setCallback(SCATestToolCallbackService utilCallBack) { - // this.utilCallBack = utilCallBack; - // } - public String ping(String input) { - System.out.println("Invoking SCATestUtilityServiceImpl.ping()"); - StringBuffer rc = new StringBuffer(); - - try { - // get a systems property object - Properties sp = System.getProperties(); - rc.append("Pinged SCA Test Utility Service on: "); - // get operating system info - rc.append(sp.getProperty("os.name")); - rc.append(", " + sp.getProperty("os.version")); - // get network info - rc.append(" - " + InetAddress.getLocalHost().toString()); - } catch (Exception e) { - System.out.println("\nException preparing system infomation for ping service reply\n" + e.toString()); - e.printStackTrace(); - } - return rc.toString(); - } - - public void asyncping() { - - StringBuffer rc = new StringBuffer(); - - try { - // get a systems property object - Properties sp = System.getProperties(); - rc.append("Pinged SCA Test Utility Service on: "); - // get operating system info - rc.append(sp.getProperty("os.name")); - rc.append(", " + sp.getProperty("os.version")); - // get network info - rc.append(" - " + InetAddress.getLocalHost().toString()); - } catch (Exception e) { - System.out.println("\nException preparing system infomation for ping service reply\n" + e.toString()); - e.printStackTrace(); - } - // utilCallBack.pingCallBack(rc.toString()); - } - - public int echo_int(int input) { - int local; - local = input; - return local; - } - - public short echo_short(short input) { - short local; - local = input; - return local; - } - - public long echo_long(long input) { - long local; - local = input; - return local; - } - - public float echo_float(float input) { - float local; - local = input; - return local; - } - - public double echo_double(double input) { - double local; - local = input; - return local; - } - - public boolean echo_boolean(boolean input) { - boolean local; - local = input; - return local; - } - - public char echo_char(char input) { - char local; - local = input; - return local; - } - - public String echo_String(String input) { - String local; - local = input; - return local; - } - - public BigDecimal echo_BigDecimal(BigDecimal input) { - BigDecimal local; - local = input; - return local; - } - - public BigInteger echo_BigInteger(BigInteger input) { - BigInteger local; - local = input; - return local; - } - - public Vector echo_Vector(Vector input) { - Vector local; - local = input; - return local; - } - - public GregorianCalendar echo_GregorianCalendar(GregorianCalendar input) { - GregorianCalendar local; - local = input; - return local; - } - -} diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility-system.composite b/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility-system.composite deleted file mode 100644 index 7126b78572..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility-system.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.
--->
-<!--
- Tuscany system configuration.
-
- $Rev$ $Date$
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:t="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
- name="system">
-
- <include name="default-system"
- scdlResource="META-INF/tuscany/default-system.composite" />
- - <component name="httpserver"> - <t:implementation.system class="org.apache.tuscany.service.jetty.JettyServiceImpl" /> - <property name="httpPort">8081</property> - </component> -
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility.composite b/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility.composite deleted file mode 100644 index 4d3d9bc523..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility.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" xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- xmlns:v="http://www.osoa.org/xmlns/sca/values/1.0" - xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0"
- name="bindingsutility">
-
- <!-- dbsdo:import.sdo location="wsdl/testutility.wsdl" / -->
-
- <service name="SCATestUtilityWSService">
- <interface.wsdl interface="http://scatestutil.scabeta1fvt#wsdl.interface(SCATestUtilityService)"
- wsdli:wsdlLocation="http://scatestutil.scabeta1fvt wsdl/testutility.wsdl" />
- <reference>SCATestUtilityWSServiceComponent</reference>
- <binding.ws endpoint="http://scatestutil.scabeta1fvt#wsdl.endpoint(SCATestUtilityService/SCATestUtilityServiceSoapPort)"
- location="wsdl/testutility.wsdl" uri="testutil" />
- </service>
-
- <component name="SCATestUtilityWSServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.util.SCATestUtilityServiceImpl" />
- </component>
-</composite>
-
diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/resources/wsdl/testutility.wsdl b/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/resources/wsdl/testutility.wsdl deleted file mode 100644 index 32d9050a61..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/main/resources/wsdl/testutility.wsdl +++ /dev/null @@ -1,704 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT 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://scatestutil.scabeta1fvt" xmlns:impl="http://scatestutil.scabeta1fvt"
- xmlns:tns="http://scatestutil.scabeta1fvt" xmlns:tns2="http://xml.apache.org/xml-soap" xmlns:tns3="http://util.java"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="testutility"> - <wsdl:types> - - <schema elementFormDefault="qualified" targetNamespace="http://scatestutil.scabeta1fvt"
- xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns2="http://xml.apache.org/xml-soap"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <import namespace="http://xml.apache.org/xml-soap" /> - <element name="pingResponse"> - <complexType> - <sequence> - <element name="pingReturn" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="asyncping"> - <complexType> - <sequence /> - </complexType> - </element> - <element name="asyncpingResponse"> - <complexType> - <sequence /> - </complexType> - </element> - <element name="echo_int"> - <complexType> - <sequence> - <element name="input" type="xsd:int" /> - </sequence> - </complexType> - </element> - <element name="echo_intResponse"> - <complexType> - <sequence> - <element name="echo_intReturn" type="xsd:int" /> - </sequence> - </complexType> - </element> - <element name="echo_short"> - <complexType> - <sequence> - <element name="input" type="xsd:short" /> - </sequence> - </complexType> - </element> - <element name="echo_shortResponse"> - <complexType> - <sequence> - <element name="echo_shortReturn" type="xsd:short" /> - </sequence> - </complexType> - </element> - <element name="echo_long"> - <complexType> - <sequence> - <element name="input" type="xsd:long" /> - </sequence> - </complexType> - </element> - <element name="echo_longResponse"> - <complexType> - <sequence> - <element name="echo_longReturn" type="xsd:long" /> - </sequence> - </complexType> - </element> - <element name="echo_float"> - <complexType> - <sequence> - <element name="input" type="xsd:float" /> - </sequence> - </complexType> - </element> - <element name="echo_floatResponse"> - <complexType> - <sequence> - <element name="echo_floatReturn" type="xsd:float" /> - </sequence> - </complexType> - </element> - <element name="echo_double"> - <complexType> - <sequence> - <element name="input" type="xsd:double" /> - </sequence> - </complexType> - </element> - <element name="echo_doubleResponse"> - <complexType> - <sequence> - <element name="echo_doubleReturn" type="xsd:double" /> - </sequence> - </complexType> - </element> - <element name="echo_boolean"> - <complexType> - <sequence> - <element name="input" type="xsd:boolean" /> - </sequence> - </complexType> - </element> - <element name="echo_booleanResponse"> - <complexType> - <sequence> - <element name="echo_booleanReturn" type="xsd:boolean" /> - </sequence> - </complexType> - </element> - <element name="echo_char"> - <complexType> - <sequence> - <element name="input" type="tns2:char" /> - </sequence> - </complexType> - </element> - <element name="echo_charResponse"> - <complexType> - <sequence> - <element name="echo_charReturn" type="tns2:char" /> - </sequence> - </complexType> - </element> - <element name="echo_String"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="echo_StringResponse"> - <complexType> - <sequence> - <element name="echo_StringReturn" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - <element name="echo_BigDecimal"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:decimal" /> - </sequence> - </complexType> - </element> - <element name="echo_BigDecimalResponse"> - <complexType> - <sequence> - <element name="echo_BigDecimalReturn" minOccurs="0" type="xsd:decimal" /> - </sequence> - </complexType> - </element> - <element name="echo_BigInteger"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:integer" /> - </sequence> - </complexType> - </element> - <element name="echo_BigIntegerResponse"> - <complexType> - <sequence> - <element name="echo_BigIntegerReturn" minOccurs="0" type="xsd:integer" /> - </sequence> - </complexType> - </element> - <element name="echo_Vector"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="tns2:Vector" /> - </sequence> - </complexType> - </element> - <element name="echo_VectorResponse"> - <complexType> - <sequence> - <element name="echo_VectorReturn" minOccurs="0" type="tns2:Vector" /> - </sequence> - </complexType> - </element> - <element name="echo_GregorianCalendar"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:anyType" /> - </sequence> - </complexType> - </element> - <element name="echo_GregorianCalendarResponse"> - <complexType> - <sequence> - <element name="echo_GregorianCalendarReturn" minOccurs="0" type="xsd:anyType" /> - </sequence> - </complexType> - </element> - <element name="ping"> - <complexType> - <sequence> - <element name="input" minOccurs="0" type="xsd:string" /> - </sequence> - </complexType> - </element> - </schema> - <schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <simpleType name="char"> - <restriction base="xsd:string"> - <length value="1" /> - </restriction> - </simpleType> - <complexType name="Vector"> - <sequence> - <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:anyType" /> - </sequence> - </complexType> - </schema> - </wsdl:types> - - <wsdl:message name="echo_StringRequest"> - <wsdl:part element="tns:echo_String" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_shortResponse"> - <wsdl:part element="tns:echo_shortResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="asyncpingRequest"> - <wsdl:part element="tns:asyncping" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="asyncpingResponse"> - <wsdl:part element="tns:asyncpingResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_doubleResponse"> - <wsdl:part element="tns:echo_doubleResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_BigDecimalResponse"> - <wsdl:part element="tns:echo_BigDecimalResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_shortRequest"> - <wsdl:part element="tns:echo_short" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_BigIntegerRequest"> - <wsdl:part element="tns:echo_BigInteger" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_VectorRequest"> - <wsdl:part element="tns:echo_Vector" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="pingResponse"> - <wsdl:part element="tns:pingResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_charResponse"> - <wsdl:part element="tns:echo_charResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_VectorResponse"> - <wsdl:part element="tns:echo_VectorResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_longRequest"> - <wsdl:part element="tns:echo_long" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_doubleRequest"> - <wsdl:part element="tns:echo_double" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_BigDecimalRequest"> - <wsdl:part element="tns:echo_BigDecimal" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_GregorianCalendarRequest"> - <wsdl:part element="tns:echo_GregorianCalendar" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_floatResponse"> - <wsdl:part element="tns:echo_floatResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_booleanRequest"> - <wsdl:part element="tns:echo_boolean" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_booleanResponse"> - <wsdl:part element="tns:echo_booleanResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_StringResponse"> - <wsdl:part element="tns:echo_StringResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_floatRequest"> - <wsdl:part element="tns:echo_float" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_GregorianCalendarResponse"> - <wsdl:part element="tns:echo_GregorianCalendarResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_intResponse"> - <wsdl:part element="tns:echo_intResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_longResponse"> - <wsdl:part element="tns:echo_longResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_charRequest"> - <wsdl:part element="tns:echo_char" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="pingRequest"> - <wsdl:part element="tns:ping" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_intRequest"> - <wsdl:part element="tns:echo_int" name="parameters" /> - - </wsdl:message> - - <wsdl:message name="echo_BigIntegerResponse"> - <wsdl:part element="tns:echo_BigIntegerResponse" name="parameters" /> - - </wsdl:message> - - <wsdl:portType name="SCATestUtilityService"> - <wsdl:operation name="ping"> - <wsdl:input message="tns:pingRequest" name="pingRequest" /> - - <wsdl:output message="tns:pingResponse" name="pingResponse" /> - - </wsdl:operation> - - <wsdl:operation name="asyncping"> - <wsdl:input message="tns:asyncpingRequest" name="asyncpingRequest" /> - - <wsdl:output message="tns:asyncpingResponse" name="asyncpingResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_int"> - <wsdl:input message="tns:echo_intRequest" name="echo_intRequest" /> - - <wsdl:output message="tns:echo_intResponse" name="echo_intResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_short"> - <wsdl:input message="tns:echo_shortRequest" name="echo_shortRequest" /> - - <wsdl:output message="tns:echo_shortResponse" name="echo_shortResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_long"> - <wsdl:input message="tns:echo_longRequest" name="echo_longRequest" /> - - <wsdl:output message="tns:echo_longResponse" name="echo_longResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_float"> - <wsdl:input message="tns:echo_floatRequest" name="echo_floatRequest" /> - - <wsdl:output message="tns:echo_floatResponse" name="echo_floatResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_double"> - <wsdl:input message="tns:echo_doubleRequest" name="echo_doubleRequest" /> - - <wsdl:output message="tns:echo_doubleResponse" name="echo_doubleResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_boolean"> - <wsdl:input message="tns:echo_booleanRequest" name="echo_booleanRequest" /> - - <wsdl:output message="tns:echo_booleanResponse" name="echo_booleanResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_char"> - <wsdl:input message="tns:echo_charRequest" name="echo_charRequest" /> - - <wsdl:output message="tns:echo_charResponse" name="echo_charResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_String"> - <wsdl:input message="tns:echo_StringRequest" name="echo_StringRequest" /> - - <wsdl:output message="tns:echo_StringResponse" name="echo_StringResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_BigDecimal"> - <wsdl:input message="tns:echo_BigDecimalRequest" name="echo_BigDecimalRequest" /> - - <wsdl:output message="tns:echo_BigDecimalResponse" name="echo_BigDecimalResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_BigInteger"> - <wsdl:input message="tns:echo_BigIntegerRequest" name="echo_BigIntegerRequest" /> - - <wsdl:output message="tns:echo_BigIntegerResponse" name="echo_BigIntegerResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_Vector"> - <wsdl:input message="tns:echo_VectorRequest" name="echo_VectorRequest" /> - - <wsdl:output message="tns:echo_VectorResponse" name="echo_VectorResponse" /> - - </wsdl:operation> - - <wsdl:operation name="echo_GregorianCalendar"> - <wsdl:input message="tns:echo_GregorianCalendarRequest" name="echo_GregorianCalendarRequest" /> - - <wsdl:output message="tns:echo_GregorianCalendarResponse" name="echo_GregorianCalendarResponse" /> - - </wsdl:operation> - - </wsdl:portType> - - <wsdl:binding name="SCATestUtilityServiceSoapBinding" type="tns:SCATestUtilityService"> - <!-- <wsaw:UsingAddressing wsdl:required="false" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"/> --> - - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - - <wsdl:operation name="ping"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="pingRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="pingResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="asyncping"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="asyncpingRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="asyncpingResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_int"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_intRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_intResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_short"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_shortRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_shortResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_long"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_longRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_longResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_float"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_floatRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_floatResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_double"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_doubleRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_doubleResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_boolean"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_booleanRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_booleanResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_char"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_charRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_charResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_String"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_StringRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_StringResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_BigDecimal"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_BigDecimalRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_BigDecimalResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_BigInteger"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_BigIntegerRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_BigIntegerResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_Vector"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_VectorRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_VectorResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - <wsdl:operation name="echo_GregorianCalendar"> - <wsdlsoap:operation soapAction="" /> - - <wsdl:input name="echo_GregorianCalendarRequest"> - <wsdlsoap:body use="literal" /> - - </wsdl:input> - - <wsdl:output name="echo_GregorianCalendarResponse"> - <wsdlsoap:body use="literal" /> - - </wsdl:output> - - </wsdl:operation> - - </wsdl:binding> - - <wsdl:service name="SCATestUtilityService"> - <wsdl:port binding="tns:SCATestUtilityServiceSoapBinding" name="SCATestUtilityServiceSoapPort"> - <wsdlsoap:address location="http://localhost:8081/services/SCATestUtilityWSService" /> - - </wsdl:port> - - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java b/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java deleted file mode 100644 index 66246fc006..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.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.util; - - -import java.io.IOException; -import java.net.Socket; - -import org.apache.tuscany.api.SCARuntime; - -import junit.framework.TestCase; - -public class SCATestUtilityServerTestCase extends TestCase { - - @Override - protected void setUp() throws Exception { - SCARuntime.start("bindingsutility-system.composite", "bindingsutility.composite"); - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8081); - } - - @Override - protected void tearDown() throws Exception { - SCARuntime.stop(); - } - -} diff --git a/tags/java/sca/1.0/itest/old/bindings/pom.xml b/tags/java/sca/1.0/itest/old/bindings/pom.xml deleted file mode 100644 index 853eca8e35..0000000000 --- a/tags/java/sca/1.0/itest/old/bindings/pom.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. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-itest</artifactId> - <version>1.0-incubating</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <modelVersion>4.0.0</modelVersion> - <version>1.0-incubating</version> - <artifactId>bindingstest</artifactId> - <packaging>pom</packaging> - <name>SCA FVT Test Tool Suite</name> - - - <modules> - <module>bindingscomposite</module> - <module>bindingsutility</module> - <module>bindingsclient</module> - </modules> -</project> diff --git a/tags/java/sca/1.0/itest/old/conversations/pom.xml b/tags/java/sca/1.0/itest/old/conversations/pom.xml deleted file mode 100644 index 289c5e1423..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/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>1.0-incubating</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>itest-conversations</artifactId> - <name>Apache Tuscany SCA Conversations Integration Tests</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.0-incubating</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.0-incubating</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalCallback.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalCallback.java deleted file mode 100644 index 640ec22a4f..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalCallback.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.conversational;
-
-import org.osoa.sca.annotations.Conversational;
-import org.osoa.sca.annotations.EndsConversation;
-import org.osoa.sca.annotations.Remotable;
-
-
-/**
- * The callback interface used when testing caonversational callbacks
- *
- * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $
- */
-@Remotable
-@Conversational
-public interface ConversationalCallback {
-
- public void init();
-
- public void destroy();
-
- public void initializeCount(int count);
-
- public void incrementCount();
-
- public int retrieveCount();
-
- public void businessException() throws Exception;
-
- @EndsConversation
- public String endConversation();
-
-}
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalClient.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalClient.java deleted file mode 100644 index dbe51bcbea..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalClient.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.conversational;
-
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * The client for the conversational itest. Is implemented by clients
- * offering both stateless and stateful callbacks
- *
- * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $
- */
-
-@Remotable
-public interface ConversationalClient {
-
- public int runConversationFromInjectedReference();
- public int runConversationFromServiceReference();
- public int runConversationWithUserDefinedConversationId();
- public String runConversationCheckUserDefinedConversationId();
- public int runConversationCheckingScope();
- public int runConversationWithCallback();
- public int runConversationHavingPassedReference();
- public String runConversationBusinessException();
- public String runConversationBusinessExceptionCallback();
- public int runConversationCallingEndedConversation();
- public int runConversationCallingEndedConversationCallback();
- public int runConversationAgeTimeout();
- public int runConversationIdleTimeout();
- public int runConversationPrincipleError();
-
-}
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalReferenceClient.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalReferenceClient.java deleted file mode 100644 index 8f008fa711..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalReferenceClient.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.conversational;
-
-import org.osoa.sca.CallableReference;
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * The client that calls into an existing conversation by accepting
- * a reference to that conversation
- *
- * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $
- */
-
-@Remotable
-public interface ConversationalReferenceClient {
-
- public void incrementCount(CallableReference<ConversationalService> conversationalService);
-
-}
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalService.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalService.java deleted file mode 100644 index 546382cfd1..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalService.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.itest.conversational;
-
-import org.osoa.sca.annotations.Callback;
-import org.osoa.sca.annotations.Conversational;
-import org.osoa.sca.annotations.EndsConversation;
-import org.osoa.sca.annotations.Remotable;
-
-
-/**
- * The service interface used when testing conversations
- *
- * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $
- */
-@Remotable
-@Conversational
-@Callback(ConversationalCallback.class)
-public interface ConversationalService {
-
- public void init();
-
- public void destroy();
-
- public void initializeCount(int count);
-
- public void incrementCount();
-
- public int retrieveCount();
-
- public void businessException() throws Exception;
-
- public void initializeCountCallback(int count);
-
- public void incrementCountCallback();
-
- public int retrieveCountCallback();
-
- public void businessExceptionCallback() throws Exception;
-
- @EndsConversation
- public String endConversation();
-
- public String endConversationCallback();
-
-}
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationAgeComponentImpl.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationAgeComponentImpl.java deleted file mode 100644 index 9deef312ac..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationAgeComponentImpl.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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.osoa.sca.annotations.ConversationAttributes; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(ConversationalService.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxAge="1 seconds") -public class ConversationAgeComponentImpl implements ConversationalService { - - private int count; - - public void businessException() throws Exception { - } - - public void businessExceptionCallback() throws Exception { - } - - public void destroy() { - } - - public String endConversation() { - return null; - } - - public String endConversationCallback() { - return null; - } - - public void incrementCount() { - } - - public void incrementCountCallback() { - } - - public void init() { - } - - public void initializeCount(int count) { - this.count = count; - } - - public void initializeCountCallback(int count) { - } - - public int retrieveCount() { - return count; - } - - public int retrieveCountCallback() { - return 0; - } - -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java deleted file mode 100644 index 1196b6ac0d..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.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.conversational.impl; - -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(ConversationIdService.class) -@Scope("CONVERSATION") -public class ConversationIdComponentImpl implements ConversationIdService { - - @ConversationID - public String cid; - - private String setterCid; - - public String getCIDField() { - return cid; - } - public String getCIDSetter() { - return setterCid; - } - - - @ConversationID - public void setCID(String cid) { - this.setterCid = cid; - } -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.java deleted file mode 100644 index 11d5ea186b..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.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.itest.conversational.impl; - -import org.osoa.sca.annotations.Conversational; - -@Conversational -public interface ConversationIdService { - - String getCIDField(); - String getCIDSetter(); -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationMaxIdleComponentImpl.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationMaxIdleComponentImpl.java deleted file mode 100644 index 1272c7ab7f..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationMaxIdleComponentImpl.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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.osoa.sca.annotations.ConversationAttributes; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(ConversationalService.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxIdleTime="1 seconds") -public class ConversationMaxIdleComponentImpl implements ConversationalService { - - private int count; - - public void businessException() throws Exception { - } - - public void businessExceptionCallback() throws Exception { - } - - public void destroy() { - } - - public String endConversation() { - return null; - } - - public String endConversationCallback() { - return null; - } - - public void incrementCount() { - } - - public void incrementCountCallback() { - } - - public void init() { - } - - public void initializeCount(int count) { - this.count = count; - } - - public void initializeCountCallback(int count) { - } - - public int retrieveCount() { - return count; - } - - public int retrieveCountCallback() { - return 0; - } - -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulImpl.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulImpl.java deleted file mode 100644 index 4e2c721040..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulImpl.java +++ /dev/null @@ -1,249 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * 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.conversational.impl;
-
-import org.apache.tuscany.sca.itest.conversational.ConversationalCallback;
-import org.apache.tuscany.sca.itest.conversational.ConversationalClient;
-import org.apache.tuscany.sca.itest.conversational.ConversationalReferenceClient;
-import org.apache.tuscany.sca.itest.conversational.ConversationalService;
-import org.osoa.sca.ComponentContext;
-import org.osoa.sca.ServiceReference;
-import org.osoa.sca.annotations.Context;
-import org.osoa.sca.annotations.ConversationAttributes;
-import org.osoa.sca.annotations.Destroy;
-import org.osoa.sca.annotations.Init;
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
-
-/**
- * The client for the conversational itest which presents a stateful
- * callback interface
- *
- * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $
- */
-
-@Service(interfaces={ConversationalClient.class})
-@Scope("CONVERSATION")
-@ConversationAttributes(maxAge="10 minutes",
- maxIdleTime="5 minutes",
- singlePrincipal=false)
-public class ConversationalClientStatefulImpl implements ConversationalClient, ConversationalCallback {
-
- @Context
- protected ComponentContext componentContext;
-
- @Reference
- protected ConversationalService conversationalService;
-
- @Reference
- protected ConversationalReferenceClient conversationalReferenceClient;
-
- private int clientCount = 0;
- private int callbackCount = 0;
-
-
- // a static member variable that records the number of times this service is called
- public static StringBuffer calls = new StringBuffer();
-
- // From ConversationalClient
- public int runConversationFromInjectedReference(){
- calls.append("runConversationFromInjectedReference,");
- conversationalService.initializeCount(1);
- conversationalService.incrementCount();
- clientCount = conversationalService.retrieveCount();
- conversationalService.endConversation();
-
- return clientCount;
- }
- public int runConversationFromServiceReference(){
- calls.append("runConversationFromServiceReference,");
- ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
- "conversationalService");
- ConversationalService callableReference = serviceReference.getService();
-
- callableReference.initializeCount(1);
- callableReference.incrementCount();
- clientCount = callableReference.retrieveCount();
- callableReference.endConversation();
-
- serviceReference.getConversation().end();
-
- return clientCount;
- }
- public int runConversationWithUserDefinedConversationId(){
- calls.append("runConversationWithUserDefinedConversationId,");
- ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
- "conversationalService");
- serviceReference.setConversationID("MyConversation1");
-
- ConversationalService callableReference = serviceReference.getService();
-
- callableReference.initializeCount(1);
- callableReference.incrementCount();
- clientCount = callableReference.retrieveCount();
- callableReference.endConversation();
-
- serviceReference.getConversation().end();
-
- return clientCount;
- }
- public String runConversationCheckUserDefinedConversationId(){
- calls.append("runConversationCheckUserDefinedConversationId,");
- ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
- "conversationalService");
- serviceReference.setConversationID("MyConversation2");
-
- ConversationalService callableReference = serviceReference.getService();
-
- callableReference.initializeCount(1);
- callableReference.incrementCount();
- clientCount = callableReference.retrieveCount();
- return callableReference.endConversation();
-
- }
- public int runConversationCheckingScope(){
- calls.append("runConversationCheckingScope,");
- // run a conversation
- return runConversationFromInjectedReference();
-
- // test will then use a static method to find out how many times
- // init/destroy were called
- }
- public int runConversationWithCallback(){
- calls.append("runConversationWithCallback,");
- callbackCount = 2;
- conversationalService.initializeCountCallback(1);
- conversationalService.incrementCountCallback();
- clientCount = conversationalService.retrieveCountCallback();
- conversationalService.endConversationCallback();
-
- return clientCount;
- }
- public int runConversationHavingPassedReference(){
- calls.append("runConversationHavingPassedReference,");
- ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
- "conversationalService");
- ConversationalService callableReference = serviceReference.getService();
-
- callableReference.initializeCount(1);
- callableReference.incrementCount();
- conversationalReferenceClient.incrementCount(serviceReference);
- clientCount = callableReference.retrieveCount();
- callableReference.endConversation();
-
- serviceReference.getConversation().end();
-
- return clientCount;
- }
- public String runConversationBusinessException(){
- calls.append("runConversationbusinessException,");
- try {
- conversationalService.initializeCount(1);
- conversationalService.businessException();
- clientCount = conversationalService.retrieveCount();
- conversationalService.endConversation();
- } catch(Exception ex) {
- return ex.getMessage();
- }
-
- return "No Exception Returned";
- }
-
- public String runConversationBusinessExceptionCallback(){
- calls.append("runConversationbusinessExceptionCallback,");
- try {
- conversationalService.initializeCountCallback(1);
- conversationalService.businessExceptionCallback();
- clientCount = conversationalService.retrieveCountCallback();
- conversationalService.endConversationCallback();
- } catch(Exception ex) {
- return ex.getMessage();
- }
-
- return "No Exception Returned";
- }
-
- public int runConversationCallingEndedConversation(){
- calls.append("runConversationCallingEndedConversation,");
- conversationalService.initializeCount(1);
- conversationalService.endConversation();
- return conversationalService.retrieveCount();
- }
-
- public int runConversationCallingEndedConversationCallback(){
- calls.append("runConversationCallingEndedConversationCallback,");
- conversationalService.initializeCountCallback(1);
- conversationalService.endConversationCallback();
- return conversationalService.retrieveCountCallback();
- }
-
- public int runConversationAgeTimeout(){
- calls.append("runConversationAgeTimeout,");
- // done in other testing
- return clientCount;
- }
- public int runConversationIdleTimeout(){
- calls.append("runConversationIdleTimeout,");
- // done in other testing
- return clientCount;
- }
- public int runConversationPrincipleError(){
- calls.append("runConversationPrincipleError,");
- // TODO - when policy framework is done
- return clientCount;
- }
-
-
- // From ConversationalCallback
- @Init
- public void init(){
- calls.append("init,");
- }
-
- @Destroy
- public void destroy(){
- calls.append("destroy,");
- }
-
- public void initializeCount(int count){
- calls.append("initializeCount,");
- callbackCount += count;
- }
-
- public void incrementCount(){
- calls.append("incrementCount,");
- callbackCount++;
- }
-
- public int retrieveCount(){
- calls.append("retrieveCount,");
- return callbackCount;
- }
-
- public void businessException() throws Exception {
- throw new Exception("Business Exception");
- }
-
- public String endConversation(){
- calls.append("endConversation,");
- return null;
- }
-
-}
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatelessImpl.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatelessImpl.java deleted file mode 100644 index 1470c699c0..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatelessImpl.java +++ /dev/null @@ -1,243 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * 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.conversational.impl;
-
-import org.apache.tuscany.sca.itest.conversational.ConversationalCallback;
-import org.apache.tuscany.sca.itest.conversational.ConversationalClient;
-import org.apache.tuscany.sca.itest.conversational.ConversationalReferenceClient;
-import org.apache.tuscany.sca.itest.conversational.ConversationalService;
-import org.osoa.sca.ComponentContext;
-import org.osoa.sca.ServiceReference;
-import org.osoa.sca.annotations.Context;
-import org.osoa.sca.annotations.Destroy;
-import org.osoa.sca.annotations.Init;
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
-
-/**
- * The client for the conversational itest which presents a stateful
- * callback interface
- *
- * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $
- */
-
-@Service(interfaces={ConversationalClient.class})
-public class ConversationalClientStatelessImpl implements ConversationalClient, ConversationalCallback {
-
- @Context
- protected ComponentContext componentContext;
-
- @Reference
- protected ConversationalService conversationalService;
-
- @Reference
- protected ConversationalReferenceClient conversationalReferenceClient;
-
- private int clientCount = 0;
- private int callbackCount = 0;
-
- // a static member variable that records the number of times this service is called
- public static StringBuffer calls = new StringBuffer();
-
- // From ConversationalClient
- public int runConversationFromInjectedReference(){
- calls.append("runConversationFromInjectedReference,");
- conversationalService.initializeCount(1);
- conversationalService.incrementCount();
- clientCount = conversationalService.retrieveCount();
- conversationalService.endConversation();
-
- return clientCount;
- }
- public int runConversationFromServiceReference(){
- calls.append("runConversationFromServiceReference,");
- ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
- "conversationalService");
- ConversationalService callableReference = serviceReference.getService();
-
- callableReference.initializeCount(1);
- callableReference.incrementCount();
- clientCount = callableReference.retrieveCount();
- callableReference.endConversation();
-
- serviceReference.getConversation().end();
-
- return clientCount;
- }
- public int runConversationWithUserDefinedConversationId(){
- calls.append("runConversationWithUserDefinedConversationId,");
- ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
- "conversationalService");
- ConversationalService callableReference = serviceReference.getService();
-
- callableReference.initializeCount(1);
- callableReference.incrementCount();
- clientCount = callableReference.retrieveCount();
- callableReference.endConversation();
-
- serviceReference.getConversation().end();
-
- return clientCount;
- }
- public String runConversationCheckUserDefinedConversationId(){
- calls.append("runConversationCheckUserDefinedConversationId,");
- ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
- "conversationalService");
- serviceReference.setConversationID("MyConversation2");
-
- ConversationalService callableReference = serviceReference.getService();
-
- callableReference.initializeCount(1);
- callableReference.incrementCount();
- clientCount = callableReference.retrieveCount();
- return callableReference.endConversation();
-
- }
- public int runConversationCheckingScope(){
- calls.append("runConversationCheckingScope,");
- // run a conversation
- return runConversationFromInjectedReference();
-
- // test will then use a static method to find out how many times
- // init/destroy were called
- }
- public int runConversationWithCallback(){
- calls.append("runConversationWithCallback,");
- conversationalService.initializeCountCallback(1);
- conversationalService.incrementCountCallback();
- clientCount = conversationalService.retrieveCountCallback();
- conversationalService.endConversationCallback();
-
- return clientCount;
- }
-
- public int runConversationHavingPassedReference(){
- calls.append("runConversationHavingPassedReference,");
- ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
- "conversationalService");
- ConversationalService callableReference = serviceReference.getService();
-
- callableReference.initializeCount(1);
- callableReference.incrementCount();
- conversationalReferenceClient.incrementCount(serviceReference);
- clientCount = callableReference.retrieveCount();
- callableReference.endConversation();
-
- serviceReference.getConversation().end();
-
- return clientCount;
- }
-
- public String runConversationBusinessException(){
- calls.append("runConversationbusinessException,");
- try {
- conversationalService.initializeCount(1);
- conversationalService.businessException();
- clientCount = conversationalService.retrieveCount();
- conversationalService.endConversation();
- } catch(Exception ex) {
- return ex.getMessage();
- }
-
- return "No Exception Returned";
- }
-
- public String runConversationBusinessExceptionCallback(){
- calls.append("runConversationbusinessExceptionCallback,");
- try {
- conversationalService.initializeCountCallback(1);
- conversationalService.businessExceptionCallback();
- clientCount = conversationalService.retrieveCountCallback();
- conversationalService.endConversationCallback();
- } catch(Exception ex) {
- return ex.getMessage();
- }
-
- return "No Exception Returned";
- }
-
- public int runConversationCallingEndedConversation(){
- calls.append("runConversationCallingEndedConversation,");
- conversationalService.initializeCount(1);
- conversationalService.endConversation();
- return conversationalService.retrieveCount();
- }
-
- public int runConversationCallingEndedConversationCallback(){
- calls.append("runConversationCallingEndedConversationCallback,");
- conversationalService.initializeCountCallback(1);
- conversationalService.endConversationCallback();
- return conversationalService.retrieveCountCallback();
- }
-
- public int runConversationAgeTimeout(){
- calls.append("runConversationAgeTimeout,");
- // done in other testing
- return clientCount;
- }
- public int runConversationIdleTimeout(){
- calls.append("runConversationIdleTimeout,");
- // done in other testing
- return clientCount;
- }
- public int runConversationPrincipleError(){
- calls.append("runConversationPrincipleError,");
- // TODO - when policy framework is done
- return clientCount;
- }
-
-
- // From ConversationalCallback
- @Init
- public void init(){
- calls.append("init,");
-
- }
-
- @Destroy
- public void destroy(){
- calls.append("destroy,");
-
- }
-
- public void initializeCount(int count){
- calls.append("initializeCount,");
- callbackCount = 0;
- }
-
- public void incrementCount(){
- calls.append("incrementCount,");
- callbackCount++;
- }
-
- public int retrieveCount(){
- calls.append("retrieveCount,");
- return callbackCount;
- }
-
- public void businessException() throws Exception {
- throw new Exception("Business Exception");
- }
-
- public String endConversation(){
- calls.append("endConversation,");
- return null;
- }
-
-}
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalReferenceClientImpl.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalReferenceClientImpl.java deleted file mode 100644 index 8fe7c5b6ba..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalReferenceClientImpl.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.conversational.impl;
-
-import org.apache.tuscany.sca.itest.conversational.ConversationalReferenceClient;
-import org.apache.tuscany.sca.itest.conversational.ConversationalService;
-import org.osoa.sca.CallableReference;
-import org.osoa.sca.annotations.Service;
-
-/**
- * A client component that accepts a reference to an ongoing conversation
- * and takes part in that conversation
- *
- * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $
- */
-
-@Service(interfaces={ConversationalReferenceClient.class})
-public class ConversationalReferenceClientImpl implements ConversationalReferenceClient{
-
- public void incrementCount(CallableReference<ConversationalService> conversationalService){
- ConversationalService callableReference = conversationalService.getService();
-
- callableReference.incrementCount();
- }
-
-
-}
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulImpl.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulImpl.java deleted file mode 100644 index efcbdff06f..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulImpl.java +++ /dev/null @@ -1,117 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * 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.conversational.impl;
-
-import org.apache.tuscany.sca.itest.conversational.ConversationalCallback;
-import org.apache.tuscany.sca.itest.conversational.ConversationalService;
-import org.osoa.sca.annotations.Callback;
-import org.osoa.sca.annotations.ConversationAttributes;
-import org.osoa.sca.annotations.ConversationID;
-import org.osoa.sca.annotations.Destroy;
-import org.osoa.sca.annotations.Init;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
-
-
-/**
- * The service used when testing stateful conversations
- *
- * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $
- */
-@Service(ConversationalService.class)
-@Scope("CONVERSATION")
-@ConversationAttributes(maxAge="10 minutes",
- maxIdleTime="5 minutes",
- singlePrincipal=false)
-public class ConversationalServiceStatefulImpl implements ConversationalService {
-
- @ConversationID
- protected String conversationId;
-
- @Callback
- protected ConversationalCallback conversationalCallback;
-
- // local count - accumulates during the conversation
- private int count = 0;
-
- // a static member variable that records the number of times this service is called
- public static StringBuffer calls = new StringBuffer();
-
- @Init
- public void init(){
- calls.append("init,");
- }
-
- @Destroy
- public void destroy(){
- calls.append("destroy,");
- }
-
- public void initializeCount(int count){
- calls.append("initializeCount,");
- this.count = count;
- }
-
- public void incrementCount(){
- calls.append("incrementCount,");
- count++;
- }
-
- public int retrieveCount(){
- calls.append("retrieveCount,");
- return count;
- }
-
- public void businessException() throws Exception {
- throw new Exception("Business Exception");
- }
-
- public void initializeCountCallback(int count){
- calls.append("initializeCountCallback,");
- this.count = count;
- conversationalCallback.initializeCount(count);
- }
-
- public void incrementCountCallback(){
- calls.append("incrementCountCallback,");
- count++;
- conversationalCallback.incrementCount();
- }
-
- public int retrieveCountCallback(){
- calls.append("retrieveCountCallback,");
- return conversationalCallback.retrieveCount();
- }
-
- public void businessExceptionCallback() throws Exception {
- calls.append("businessExceptionCallback,");
- conversationalCallback.businessException();
- }
-
- public String endConversation(){
- calls.append("endConversation,");
- count = 0;
- return conversationId;
- }
-
- public String endConversationCallback(){
- calls.append("endConversationCallback,");
- return conversationalCallback.endConversation();
- }
-}
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessImpl.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessImpl.java deleted file mode 100644 index dca0596b87..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessImpl.java +++ /dev/null @@ -1,121 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * 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.conversational.impl;
-
-import java.util.HashMap;
-
-import org.apache.tuscany.sca.itest.conversational.ConversationalCallback;
-import org.apache.tuscany.sca.itest.conversational.ConversationalService;
-import org.osoa.sca.annotations.Callback;
-import org.osoa.sca.annotations.ConversationID;
-import org.osoa.sca.annotations.Destroy;
-import org.osoa.sca.annotations.Init;
-import org.osoa.sca.annotations.Service;
-
-
-/**
- * The service used when testing stateful conversations
- *
- * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $
- */
-@Service(ConversationalService.class)
-public class ConversationalServiceStatelessImpl implements ConversationalService {
-
- @ConversationID
- protected String conversationId;
-
- @Callback
- protected ConversationalCallback conversationalCallback;
-
- // static area in which to hold conversational data
- private static HashMap<String, Integer> conversationalState = new HashMap<String, Integer>();
-
- // a static member variable that records the number of times this service is called
- public static StringBuffer calls = new StringBuffer();
-
- @Init
- public void init(){
- calls.append("init,");
- }
-
- @Destroy
- public void destroy(){
- calls.append("destroy,");
- }
-
- public void initializeCount(int count){
- calls.append("initializeCount,");
- Integer conversationalCount = new Integer(count);
- conversationalState.put(conversationId, conversationalCount);
- }
-
- public void incrementCount(){
- calls.append("incrementCount,");
- Integer conversationalCount = conversationalState.get(conversationId);
- conversationalCount++;
- conversationalState.put(conversationId, conversationalCount);
- }
-
- public int retrieveCount(){
- calls.append("retrieveCount,");
- Integer count = conversationalState.get(conversationId);
- if (count != null){
- return count.intValue();
- } else {
- return -999;
- }
- }
-
- public void businessException() throws Exception {
- throw new Exception("Business Exception");
- }
-
- public void initializeCountCallback(int count){
- calls.append("initializeCountCallback,");
- initializeCount(count);
- conversationalCallback.initializeCount(count);
- }
-
- public void incrementCountCallback(){
- calls.append("incrementCountCallback,");
- incrementCount();
- conversationalCallback.incrementCount();
- }
-
- public int retrieveCountCallback(){
- calls.append("retrieveCountCallback,");
- return conversationalCallback.retrieveCount();
- }
-
- public void businessExceptionCallback() throws Exception {
- calls.append("businessExceptionCallback,");
- conversationalCallback.businessException();
- }
-
- public String endConversation(){
- calls.append("endConversation,");
- conversationalState.remove(conversationId);
- return conversationId;
- }
-
- public String endConversationCallback(){
- calls.append("endConversationCallback,");
- return conversationalCallback.endConversation();
- }
-}
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessScope.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessScope.java deleted file mode 100644 index b1332833bb..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessScope.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.itest.conversational.impl; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Service; - -@Service(ConversationalService.class) -public class ConversationalServiceStatelessScope implements ConversationalService { - - @ConversationID - protected String cid; - - static Map<String, Integer> state = new HashMap<String, Integer>(); - - public void destroy() { - // TODO Auto-generated method stub - - } - - public String endConversation() { - state.remove(cid); - return cid; - } - - public String endConversationCallback() { - // TODO Auto-generated method stub - return null; - - } - - public void incrementCount() { - state.put(cid, Integer.valueOf(state.get(cid)+1)); - } - - public void businessException() throws Exception { - throw new Exception("Business Exception"); - } - - public void incrementCountCallback() { - // TODO Auto-generated method stub - - } - - public void init() { - // TODO Auto-generated method stub - - } - - public void initializeCount(int count) { - state.put(cid, Integer.valueOf(count)); - } - - public void initializeCountCallback(int count) { - // TODO Auto-generated method stub - - } - - public void businessExceptionCallback() throws Exception { - throw new Exception("Business Exception"); - } - - public int retrieveCount() { - return state.get(cid); - } - - public int retrieveCountCallback() { - // TODO Auto-generated method stub - return 0; - } - -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherService.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherService.java deleted file mode 100644 index 90c674c6ac..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherService.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.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -@Remotable -@Conversational -/** - * - */ -public interface AnotherService { - - public void setService(ServiceReference aServiceReference); - public void add(int anInt); - public int getCount(); - -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherServiceImpl.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherServiceImpl.java deleted file mode 100644 index 027109787a..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherServiceImpl.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.test; - -import junit.framework.Assert; - -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AnotherService.class) -@Scope("CONVERSATION") - -public class AnotherServiceImpl implements AnotherService { - - // This is a simple pass-thru service used to test propogation - // of ServiceReference and maintenance of Session state. - - private ServiceReference aServiceReference; - - public void add(int anInt) { - - Assert.assertNotNull("AnotherServiceImpl - add ", aServiceReference); - ((ConversationsService) aServiceReference).add(anInt); - - } - - - public void initializeCount() { - - Assert.assertNotNull("AnotherServiceImpl - initializeCount ", aServiceReference); - ((ConversationsService) aServiceReference).initializeCount(); - - } - - - public void setService(ServiceReference aRef) { - - Assert.assertNotNull("AnotherServiceImpl - setService ", aRef); - aServiceReference = aRef; - - } - - - public int getCount() { - - Assert.assertNotNull("AnotherServiceImpl - getCount ", aServiceReference); - return ((ConversationsService) aServiceReference).getLocalCount(); - } - - -} - diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsCallback.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsCallback.java deleted file mode 100644 index 18e935e089..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsCallback.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.test; - -import org.osoa.sca.annotations.Conversational; - -@Conversational -/** - * - * - */ -public interface ConversationsCallback { - - public void callBackMessage(String aString); - public void callBackIncrement(String aString); - public void callBackEndSession(); - -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient.java deleted file mode 100644 index ff677db74d..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient.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.test; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -@Remotable -@Conversational -public interface ConversationsClient { - - public void run(); - public int count(); - -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient2.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient2.java deleted file mode 100644 index 389b1f4d93..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient2.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.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -@Remotable -@Conversational -public interface ConversationsClient2 { - public String getDateTime(); - - -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClientImpl.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClientImpl.java deleted file mode 100644 index 54a437e66a..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClientImpl.java +++ /dev/null @@ -1,496 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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 java.io.File; -import java.text.DateFormat; - -import junit.framework.Assert; - -import org.osoa.sca.ComponentContext; -import org.osoa.sca.ConversationEndedException; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.ConversationAttributes; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(interfaces={ConversationsClient.class,ConversationsClient2.class}) - - -@Scope("CONVERSATION") -@ConversationAttributes(maxIdleTime="10 minutes", - singlePrincipal=false) - - -public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback { - - @Reference - protected ConversationsService aService; - @Reference - protected AnotherService anotherService; - @Reference - protected ConversationsLifeCycleService aLifeCycleService; - @Context - protected ComponentContext myContext; - @ConversationID - protected String conversationID; - - private Object monitor = new Object(); - private int count=0; - private String message; - private String initialState; - private int initialCount = 56; - private String dateTime; - private final static String markerFileName = "target/testConversations_test3_marker"; - - public ConversationsClientImpl() { - System.out.println("xxxxxxxxxx"); - } - - public void run() { - - // This tests various aspects of session lifecycle and maintenance of session state. - // None of these test are working due to various issues. - - /* test0() - This test verifies annotations and API's for ConversationID. - */ - test0(); // - Tuscany-1001. - - /* test1() - Test stateful callbacks. Verify that the client�s state is maintained throughout the execution of - all callback methods. - */ - test1(); // This test is working for MODULE scope. Cant claim succcess because it needs Conversation scope. - - /* test2() - Test each method of starting a session. Test @Init. - */ - test2(); // Tuscany-965, Tuscany-1001 - - /* test3() - Test each method of ending a session. Test @Destroy. - */ - test3(); // Tuscany-965, Tuscany-1001 - - /* test4() - Pass an existing service reference with an active session to another service. Verify the session is maintained - */ - test4(); // Tuscany-964, Tuscant-1001 - - /* test5() - Call the createServiceReferenceForSession() API to get a service reference for the active session. - Pass the service reference to another service. Verify the session is maintained. - */ - test5(); - - /* test6() - * Allow a session to timeout. - */ - test6(); // Tuscany-965, Tuscany-1001 - - - return; - } - - private void test0() - { - - // Verify that conversationID was injected. - Assert.assertNotNull("test0 - conversationID injected", conversationID); - System.out.println("ConversationID: " + conversationID); - - // - // The client may access the ConversationID by calling getConversationID on a Service Reference. - // This also verifies a session was created during injection of this Service Reference. - // - // TODO: this fails as the cid is null as a conversation has not been started yet (which seems expected to me) -// ServiceReference<ConversationsService> aServiceserviceRef = myContext.getServiceReference(ConversationsService.class, "aService"); -// System.out.println("aServices cid: " + aServiceserviceRef.getConversationID()); -// Assert.assertNotNull("test0 - ConversationID from service reference", aServiceserviceRef.getConversationID()); - - //FIXME Port to the 1.0 spec API - //Object aLifeCycleServicesSessionID =((ServiceReference)aLifeCycleService).getSessionID(); - //Assert.assertNotNull("test0 - ConversationID from LifeCycleService service reference", aLifeCycleServicesSessionID); - - // This will verify the @Init() is working for a session created during injection. See test2(). - aLifeCycleService.knockKnock("Hello"); - - } - - private void test1() - { - - // - // This test verifies that the state of the client is preserved across method calls. Each - // call to the service results in 2 callbacks. One to increment a count and the other to set a string. - // At the end of the test the count should equal 5 and the string should be set. Also the original strings - // values should be preserved. - // - // - initialState = "Initial State"; - - int numCalls = 0; - - for(int i=0; i < 10; i++) - { - aService.knockKnock("Knock Knock " + ++numCalls); - } - - // I want to drive multiple callbacks and then give them time to complete. Don't want to - // force serialization. After 20 seconds check the assertions. - - synchronized(monitor) - { - try - { - monitor.wait(2000L); - } - catch (Exception ex) - {ex.printStackTrace();} - } - - // Here we test for the expected state of several different variables. State needs to be maintained - // across method calls to the service. If the same client instance is used then the state should match - // the following assertions. - - // instance variable count should equal the number of calls to the backend service. count is incremented - // during callback processing. - Assert.assertEquals("Conversations - Test1 count", numCalls, count); - // The returned message should be like the following. - Assert.assertEquals("Conversations - Test1 message", true, message.startsWith("Who's There")); - // any initial state set prior to running the callbacks should be maintained. - Assert.assertEquals("Conversations - Test1 initialState", "Initial State", initialState); - Assert.assertEquals("Conversations - Test1 initialCount", 56, initialCount); - - return; - - } - - private void test2() - { - - // Verify the various methods to create a new Session. - // Sesssions can be started: - // - // 1) When a service reference is injected into a client. This is verified in test0(). - // 2) By the client calling newSession() API with and without a ConversationID. - // - // Verify init() is called prior to any business methods. This is performed in the Service when any - // business methos is called. - - Assert.assertNotNull("current composite context",myContext); - - // This tests creating a conversational session. And that @Init is run prior to business method. - ServiceReference aServRef = null; - //FIXME Port to the 1.0 spec API - //aServRef = myContext.newSession("ConversationsLifeCycleService"); -// Assert.assertNotNull("Conversations - Test2 Service Reference 1 not returned", aServRef); - - //FIXME Port to the 1.0 spec API - //Get the session ID. - //Object aConversationID = aServRef.getSessionID(); - ConversationsLifeCycleService aConversationsLifeCycleService = (ConversationsLifeCycleService) aServRef; - aConversationsLifeCycleService.knockKnock("Hello"); - - //Create a new session this time specifying a session ID. Verify the seesion id is what was specified. - //FIXME Port to the 1.0 spec API - //aServRef = myContext.newSession("ConversationsLifeCycleService","Test2-12345"); - Assert.assertNotNull("Conversations - Test2 Service Reference 2 not returned", aServRef); - //FIXME Port to the 1.0 spec API - //Get the session ID. - //Object aConversationID2 = aServRef.getSessionID(); - //Assert.assertEquals("Conversations - Test2 Session not created with specified ConversationID", "Test2-12345", aConversationID2); - aConversationsLifeCycleService = (ConversationsLifeCycleService) aServRef; - aConversationsLifeCycleService.knockKnock("Hello"); - - //FIXME Port to the 1.0 spec API - //Assert.assertNotSame("Conversations - Test2 sessions are not different", aConversationID, aConversationID2); - - } - - private void test3() - { - - // Note: The @EndSesion and @EndsConversation anotations are not implemented. - // So #1 an #2 cannot be done. - - // - // Verify the various methods to end a session. - // Sesssions can be ended: - // - // 1) Server operation annotated with @EndsConversation. - // 2) Server operation calls an @EndSession annotated callback method. - // 3) Servers conversation lifetime times out. This is test6() so its not implimented in the test3 method. - // 4) The client calls ServiceReference.endSession(); - // - // Verify @Destroy annotated method get called after completion of the business - // method that called the endSession. - // - - ConversationsLifeCycleService aConversationsLifeCycleService; -//FIXME Port to the 1.0 spec API -// Object aConversationID; - Assert.assertNotNull("current composite context",myContext); - ServiceReference aServRef; - this.removeMarkerFile(); - - // - // test3 variation #1 - Cannot be done annotation not implimented yet. 12/15/2006 - // - - //FIXME Port to the 1.0 spec API - //aServRef = myContext.newSession("ConversationsLifeCycleService"); - aServRef = null; - Assert.assertNotNull("Conversations - Test3-1 Service Reference not returned", aServRef); - - aConversationsLifeCycleService = (ConversationsLifeCycleService) aServRef; - aConversationsLifeCycleService.knockKnock("Hello"); - //FIXME Port to the 1.0 spec API - //aConversationID = aServRef.getSessionID(); - //Assert.assertNotNull("Conversations - Test3-1 ConversationID not found", aConversationID); - - //Call the business method annotated with @EndsConversation. - aConversationsLifeCycleService.endThisSession(); // This should also drive @Destroy method. - - // Verify session has ended. The ConversationID should be null; - //FIXME Port to the 1.0 spec API - //aConversationID = aServRef.getSessionID(); - //Assert.assertNull("Conversations - Test3-1 session not null after endSession()", aConversationID); - - // Verify Destroy was run. The baxckend service creates a marker file when @Destroy annotated method is run. - Assert.assertEquals("Conversations - Test3-1 @Destroy method not invoked", true, this.isMarkerFilePresent()); - this.removeMarkerFile(); - - // - // test3 variation #2 - Cannot be done annotation not implimented yet. 12/15/2006 - // - - //FIXME Port to the 1.0 spec API - //aServRef = myContext.newSession("ConversationsLifeCycleService"); - Assert.assertNotNull("Conversations - Test3-2 Service Reference not returned", aServRef); - - aConversationsLifeCycleService = (ConversationsLifeCycleService) aServRef; - aConversationsLifeCycleService.knockKnock("Hello"); - //FIXME Port to the 1.0 spec API - //aConversationID = aServRef.getSessionID(); - //Assert.assertNotNull("Conversations - Test3-2 ConversationID not found", aConversationID); - - //Call the business method that will invoke my @EndSession callback method. - aConversationsLifeCycleService.endThisSessionUsingCallback(); // This should also drive @Destroy method. - - // Verify session has ended. The ConversationID should be null; - //FIXME Port to the 1.0 spec API - //aConversationID = aServRef.getSessionID(); - //Assert.assertNull("Conversations - Test3-2 session not null after endSession()", aConversationID); - - // Verify Destroy was run. The baxckend service creates a marker file when @Destroy annotated method is run. - Assert.assertEquals("Conversations - Test3-2 @Destroy method not invoked", true, this.isMarkerFilePresent()); - this.removeMarkerFile(); - - // - // test3 variation #4 - Client calls endSession() - // - - //FIXME Port to the 1.0 spec API - //aServRef = myContext.newSession("ConversationsLifeCycleService"); - aServRef = null; - Assert.assertNotNull("Conversations - Test3-4 Service Reference not returned", aServRef); - - aConversationsLifeCycleService = (ConversationsLifeCycleService) aServRef; - aConversationsLifeCycleService.knockKnock("Hello"); - //FIXME Port to the 1.0 spec API - //aConversationID = aServRef.getSessionID(); - //Assert.assertNotNull("Conversations - Test3-4 ConversationID not found", aConversationID); - - //Call the endSession() API on the Service Reference. - //FIXME Port to the 1.0 spec API - //aServRef.endSession(); // This should also drive @Destroy method. - - // Verify session has ended. The ConversationID should be null; - //FIXME Port to the 1.0 spec API - //aConversationID = aServRef.getSessionID(); - //Assert.assertNull("Conversations - Test3-4 session not null after endSession()", aConversationID); - - // Verify Destroy was run. The baxckend service creates a marker file when @Destroy annotated method is run. - Assert.assertEquals("Conversations - Test3-4 @Destroy method not invoked", true, this.isMarkerFilePresent()); - this.removeMarkerFile(); - } - - public void test4() - { - - // - // This test uses the injected active session for the ConversationsService. It starts a conversation - // in this method building up state with a counter. It then passes this reference to another backend service adding - // additional state. It then returns and adds more state using original service and then performs the Assertions. - // - - aService.initializeCount(); - aService.add(1); - anotherService.setService((ServiceReference)aService); - anotherService.add(1); - anotherService.add(1); - aService.add(1); - aService.add(1); - int count = anotherService.getCount(); - - Assert.assertEquals("test4 - ConversationsClientImpl ", 5, count); - - return; - } - - - public void test5() - { - - // The first test verifies that the createServiceReferenceForSession(this) API is functioning. - // This is done in the backend serviced as it needs a single interface defined. The 2nd test - // uses the variant of this API when > 1 interfaces are implemented. - // - // The 2nd test obtains a service reference for myself and passes that reference to a backend service. - // The backend service then invokes the count() method on my service reference. It then returns - // the count that it retrieved. The test then asserts that the count returned from the backend - // service matches the client services internal state. - // - - Assert.assertNotNull("current composite context",myContext); - - boolean result = aService.createServiceReferenceForSelf(); - System.out.println("Laa: returned from createServiceReferenceForSelf() " + result); - Assert.assertEquals("test5 - createServiceReferenceForSelf",true,result); - - count = 6; - int returnCount = 0; - //FIXME Port to the 1.0 spec API - //ServiceReference myServiceReference = myContext.createServiceReferenceForSession(this,"ConversationsClient2"); - ServiceReference myServiceReference = null; - Assert.assertNotNull("test5 - createServiceReferenceForSession - myContext.createServiceReferenceForSession(this,ConversationsClient);", myServiceReference); - returnCount = aService.getCount(myServiceReference); - - Assert.assertEquals("test5 - createServiceReferenceForSession(this,ConversationsClient2)",count,returnCount); - String aRemoteDateTime = aService.getDateTime(myServiceReference); - Assert.assertEquals("test5 - createServiceReferenceForSession(this,ConversationsClient2 - dateTime)", dateTime, aRemoteDateTime); - - return; - } - - public void test6() - { - - // - // Create a session and allow it to timeout and verify that it did. - // Invoking a business method on a service that has timed out should result in - // a SessionEndedException. - // - - Assert.assertNotNull("current composite context",myContext); - - // This tests creating a conversational session. This service has a maxAge="5 seconds". - ServiceReference aServRef; - //FIXME Port to the 1.0 spec API - //aServRef = myContext.newSession("ConversationsLifeCycleService"); - aServRef = null; - Assert.assertNotNull("Conversations - Test6 Service Reference not returned", aServRef); - - // Run a business method. - ConversationsLifeCycleService aConversationsLifeCycleService = (ConversationsLifeCycleService) aServRef; - aConversationsLifeCycleService.knockKnock("Hello"); - - // - // wait 10 seconds so session will time out. - // - try { - Thread.sleep(10000L); - } - catch (InterruptedException ex) - { - ex.printStackTrace(); - } - - // Run a busineess method after timeout period has elapsed. - boolean sessionEnded = false; - try - { - aConversationsLifeCycleService.knockKnock("Hello"); - } - catch (ConversationEndedException sex) - { - sessionEnded = true; - } - - Assert.assertEquals("Conversations - Test6 Session did not timeout ", true, sessionEnded); - - return; - } - - - public synchronized void callBackIncrement(String aString) { - - count++; - System.out.println("Laa: callBackIncrement invoked on client. count = " + count); - - } - - public synchronized void callBackMessage(String aString) { - - message = aString; - System.out.println("Laa: callBackIMessage invoked on client. message = " + message); - - } - - // @EndSession - This is for test3() variation #2. - public void callBackEndSession() { - - System.out.println("Laa: callBackEndSession method invoked on client."); - - } - - public int count() - { - return this.count; - } - - public String getDateTime() { - - dateTime = DateFormat.getDateTimeInstance().toString(); - return dateTime; - - } - - private void removeMarkerFile() - { - // Make sure the marker file is not present before starting the test. - File aFile = new File(markerFileName); - if (aFile.exists()) - aFile.delete(); - } - - private boolean isMarkerFilePresent() - { - File aFile = new File(markerFileName); - return aFile.exists(); - } - - - -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleService.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleService.java deleted file mode 100644 index 26dfcd9a38..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleService.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.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -@Remotable -@Callback(ConversationsCallback.class) -@Conversational - -/** - * - */ -public interface ConversationsLifeCycleService { - - public String knockKnock(String aString); - public void endThisSession(); - public void endThisSessionUsingCallback(); - -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleServiceImpl.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleServiceImpl.java deleted file mode 100644 index 7f38e356f6..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleServiceImpl.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.test; - -import java.io.File; - -import junit.framework.Assert; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.ConversationAttributes; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(ConversationsLifeCycleService.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxAge="5 seconds") - -// This is a short-lived conversational service. - -public class ConversationsLifeCycleServiceImpl implements ConversationsLifeCycleService { - - @Callback - protected ConversationsCallback callback; - - private String state = "NOT READY"; - private final static String markerFileName = "target/testConversations_test3_marker"; - - - public String knockKnock(String aString) { - - // Prior to any business methods being invoked the state must have been set to READY using the @Init. - System.out.println("ConversationsLifeCycleServiceImpl.knockKnock - State = " + state); - Assert.assertEquals("ConversationsLifeCycleServiceImpl.knockKnock - not in READY state ", "READY", state); - - return "Who's There!"; - } - - @Init - public void init() - { - state = "READY"; - System.out.println("ConversationsLifeCycleServiceImpl.init()"); - } - - - @Destroy - public void destroy() - { - state = "DESTROYED"; - - File aFile = new File(markerFileName); - try - { - aFile.createNewFile(); - } - catch (Exception ex) - { - System.out.println("Error Creating " + markerFileName); - ex.printStackTrace(); - } - System.out.println("ConversationsLifeCycleServiceImpl.destroy()"); - } - -// @EndsConversation - public void endThisSession() { - //This method will end the current session by annotation. - System.out.println("ConversationsLifeCycleServiceImpl.endThisSession()"); - - } - - public void endThisSessionUsingCallback() { - - //This method will end the current session by a callback method annotated with @EndSession. - callback.callBackEndSession(); - System.out.println("ConversationsLifeCycleServiceImpl.endThisSessionUsingCallback()"); - } - -} - diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsService.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsService.java deleted file mode 100644 index f878e22bf8..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsService.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.test; - -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -@Remotable -@Callback(ConversationsCallback.class) -@Conversational - -/** - * - */ -public interface ConversationsService { - - public void knockKnock(String aString); - public void add(int anInt); - public void initializeCount(); - public int getCount(ServiceReference aServiceReference); - public int getLocalCount(); - public String getDateTime(ServiceReference aServiceReference); - public boolean createServiceReferenceForSelf(); - -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsServiceImpl.java b/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsServiceImpl.java deleted file mode 100644 index 45fc68308b..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsServiceImpl.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.osoa.sca.ComponentContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(ConversationsService.class) -@Scope("CONVERSATION") - -public class ConversationsServiceImpl implements ConversationsService { - - @Context - protected ComponentContext context; - - @Callback - protected ConversationsCallback callback; - private int count=0; - - public void knockKnock(String aString) { - - try - { - count++; - //System.out.println("ConversationsServiceImpl message received: " + aString); - callback.callBackMessage("Who's There " + count); - callback.callBackIncrement("Add one please"); - //System.out.println("ConversationsServiceImpl responses sent"); - return; - } - catch (Exception ex) - { - ex.printStackTrace(); - } - - } - - public int getCount(ServiceReference aServiceReference) - { - - // - // Invoke a method on the service reference and return back the result. - // - - int count=0; - try - { - count = ((ConversationsClient) aServiceReference).count(); - } - catch (Exception ex) - { - ex.printStackTrace(); - } - return count; - - } - - public int getLocalCount() - { - - // - // Return my localc instance count. This is used for test4. - // - - return count; - - } - - public String getDateTime(ServiceReference aServiceReference) - { - - // - // Invoke a method on the service reference and return back the result. - // - - String dateTime; - dateTime = ((ConversationsClient2) aServiceReference).getDateTime(); - return dateTime; - - } - - public void add(int anInt) { - - count +=anInt; - - } - - public void initializeCount() { - - count =0; - - } - - public boolean createServiceReferenceForSelf() { - - // This is done here because we need to test getting a ServiceReference - // from a component that implements a single interface. The client in this test - // impliments 2 interfaces to test the variant of this that takes interface name as an argumnet. - - boolean aBoolean = false; - - ServiceReference myServiceReference = null; - - try - { - myServiceReference = context.createSelfReference(ConversationsService.class); - System.out.println("Laa: Created Service Reference for Session:" + myServiceReference); - } - catch (Exception ex) - { - ex.printStackTrace(); - } - - - if (myServiceReference != null) - { - aBoolean = true; - System.out.println("Laa: Service Reference is not null"); - } - - return aBoolean; - } - - -} - diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/resources/ConversationAge.composite b/tags/java/sca/1.0/itest/old/conversations/src/main/resources/ConversationAge.composite deleted file mode 100644 index abd1c35ced..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/resources/ConversationAge.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"
- name="ConversationalIdTest">
-
- <component name="ConversationAgeComponent">
- <implementation.java class="org.apache.tuscany.sca.itest.conversational.impl.ConversationAgeComponentImpl"/>
- </component>
-
- <component name="ConversationIdleComponent">
- <implementation.java class="org.apache.tuscany.sca.itest.conversational.impl.ConversationMaxIdleComponentImpl"/>
- </component>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/resources/ConversationsTest.composite b/tags/java/sca/1.0/itest/old/conversations/src/main/resources/ConversationsTest.composite deleted file mode 100644 index 93b44c260f..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/resources/ConversationsTest.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 - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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://conversations" - name="ConversationsTest"> - - <component name="ConversationsClient"> - <implementation.java class="org.apache.tuscany.sca.test.ConversationsClientImpl"/> - <reference name="aService" target="ConversationsService"/> - <reference name="anotherService" target="AnotherService"/> - <reference name="aLifeCycleService" target="ConversationLifeCycleService"/> - </component> - - <component name="ConversationsService"> - <implementation.java class="org.apache.tuscany.sca.test.ConversationsServiceImpl"/> - </component> - - <component name="AnotherService"> - <implementation.java class="org.apache.tuscany.sca.test.AnotherServiceImpl"/> - </component> - - <component name="ConversationLifeCycleService"> - <implementation.java class="org.apache.tuscany.sca.test.ConversationsLifeCycleServiceImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/resources/conversationId.composite b/tags/java/sca/1.0/itest/old/conversations/src/main/resources/conversationId.composite deleted file mode 100644 index e61eb08194..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/resources/conversationId.composite +++ /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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- name="ConversationalIdTest">
-
- <component name="ConversationIdComponent">
- <implementation.java class="org.apache.tuscany.sca.itest.conversational.impl.ConversationIdComponentImpl"/>
- </component>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/main/resources/conversational.composite b/tags/java/sca/1.0/itest/old/conversations/src/main/resources/conversational.composite deleted file mode 100644 index 43259f67c3..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/main/resources/conversational.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://conversations"
- name="ConversationalITest">
-
- <component name="ConversationalStatelessClientStatelessService">
- <implementation.java class="org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatelessImpl"/>
- <reference name="conversationalReferenceClient" target="ConversationalReferenceClient"/>
- <reference name="conversationalService" target="ConversationalServiceStatelessSL"/>
- </component>
-
- <component name="ConversationalStatelessClientStatefulService">
- <implementation.java class="org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatelessImpl"/>
- <reference name="conversationalReferenceClient" target="ConversationalReferenceClient"/>
- <reference name="conversationalService" target="ConversationalServiceStateful"/>
- </component>
-
- <component name="ConversationalStatefulClientStatelessService">
- <implementation.java class="org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatefulImpl"/>
- <reference name="conversationalReferenceClient" target="ConversationalReferenceClient"/>
- <reference name="conversationalService" target="ConversationalServiceStatelessSL"/>
- </component>
-
- <component name="ConversationalStatefulClientStatefulService">
- <implementation.java class="org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatefulImpl"/>
- <reference name="conversationalReferenceClient" target="ConversationalReferenceClient"/>
- <reference name="conversationalService" target="ConversationalServiceStateful"/>
- </component>
-
- <component name="ConversationalReferenceClient">
- <implementation.java class="org.apache.tuscany.sca.itest.conversational.impl.ConversationalReferenceClientImpl"/>
- </component>
-
- <component name="ConversationalServiceStateful">
- <implementation.java class="org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatefulImpl"/>
- </component>
-
- <component name="ConversationalServiceStateless">
- <implementation.java class="org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatelessScope"/>
- </component>
-
- <component name="ConversationalServiceStatelessSL">
- <implementation.java class="org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatelessImpl"/>
- </component>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTestCase.java b/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTestCase.java deleted file mode 100644 index 1138d2e1f0..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTestCase.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 org.apache.tuscany.sca.itest.conversational; - - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.itest.conversational.impl.ConversationIdService; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -public class ConversationIdTestCase { - - private SCADomain domain; - - @Before - public void setUp() throws Exception { - domain = SCADomain.newInstance("conversationId.composite"); - - } - - @After - public void tearDown() throws Exception { - if (domain != null) { - domain.close(); - } - } - - @Test - public void testConversationId() { - ConversationIdService service = - domain.getService(ConversationIdService.class, "ConversationIdComponent"); - Assert.assertNotNull(service.getCIDField()); - Assert.assertNotNull(service.getCIDSetter()); - } - -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java b/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java deleted file mode 100644 index d7c6a0ed41..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.conversational; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.osoa.sca.ConversationEndedException; - -public class ConversationalAgeTestCase { - - private SCADomain domain; - - @Before - public void setUp() throws Exception { - System.setProperty("org.apache.tuscany.sca.core.scope.ConversationalScopeContainer.ReaperInterval", "2"); - domain = SCADomain.newInstance("ConversationAge.composite"); - - } - - @After - public void tearDown() throws Exception { - System.clearProperty("org.apache.tuscany.sca.core.scope.ConversationalScopeContainer.ReaperInterval"); - if (domain != null) { - domain.close(); - } - } - - @Test - public void testMaxAge() throws InterruptedException { - - ConversationalService conversationalService = - domain.getService(ConversationalService.class, "ConversationAgeComponent"); - - Assert.assertEquals(0, conversationalService.retrieveCount()); - conversationalService.initializeCount(42); - Assert.assertEquals(42, conversationalService.retrieveCount()); - Assert.assertEquals(42, conversationalService.retrieveCount()); - Thread.sleep(3100); - Assert.assertEquals(0, conversationalService.retrieveCount()); - } - - @Test - public void testAgeExpired() throws InterruptedException { - - ConversationalService conversationalService = - domain.getService(ConversationalService.class, "ConversationAgeComponent"); - - Assert.assertEquals(0, conversationalService.retrieveCount()); - conversationalService.initializeCount(42); - Assert.assertEquals(42, conversationalService.retrieveCount()); - Assert.assertEquals(42, conversationalService.retrieveCount()); - Thread.sleep(1100); - try { - Assert.assertEquals(0, conversationalService.retrieveCount()); - Assert.fail(); - } catch (ConversationEndedException e) { - // expected - } - } - - @Test - public void testMaxIdle() throws InterruptedException { - - ConversationalService conversationalService = - domain.getService(ConversationalService.class, "ConversationIdleComponent"); - - Assert.assertEquals(0, conversationalService.retrieveCount()); - conversationalService.initializeCount(42); - Assert.assertEquals(42, conversationalService.retrieveCount()); - Assert.assertEquals(42, conversationalService.retrieveCount()); - Thread.sleep(3100); - Assert.assertEquals(0, conversationalService.retrieveCount()); - } - -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalJ2SETestCase.java b/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalJ2SETestCase.java deleted file mode 100644 index 8480e04028..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalJ2SETestCase.java +++ /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. - */ - -package org.apache.tuscany.sca.itest.conversational; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -public class ConversationalJ2SETestCase { - - private SCADomain domain; - - @Before - public void setUp() throws Exception { - domain = SCADomain.newInstance("conversational.composite"); - - } - - @After - public void tearDown() throws Exception { - if (domain != null) { - domain.close(); - } - } - - @Test - public void testStatefulConversation() { - ConversationalService conversationalService = - domain.getService(ConversationalService.class, "ConversationalServiceStateful"); - - conversationalService.initializeCount(1); - Assert.assertEquals(1, conversationalService.retrieveCount()); - conversationalService.incrementCount(); - Assert.assertEquals(2, conversationalService.retrieveCount()); - conversationalService.endConversation(); - - Assert.assertEquals(0, conversationalService.retrieveCount()); - - conversationalService.initializeCount(4); - Assert.assertEquals(4, conversationalService.retrieveCount()); - conversationalService.incrementCount(); - Assert.assertEquals(5, conversationalService.retrieveCount()); - conversationalService.endConversation(); - - } - - @Test - public void testStatelessConversation() { - ConversationalService conversationalService = - domain.getService(ConversationalService.class, "ConversationalServiceStateless"); - - conversationalService.initializeCount(1); - Assert.assertEquals(1, conversationalService.retrieveCount()); - conversationalService.incrementCount(); - Assert.assertEquals(2, conversationalService.retrieveCount()); - conversationalService.endConversation(); - - conversationalService.initializeCount(4); - Assert.assertEquals(4, conversationalService.retrieveCount()); - conversationalService.incrementCount(); - Assert.assertEquals(5, conversationalService.retrieveCount()); - conversationalService.endConversation(); - - } -} diff --git a/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalTestCase.java b/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalTestCase.java deleted file mode 100644 index 245f0a5597..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalTestCase.java +++ /dev/null @@ -1,322 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * 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.conversational;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatefulImpl;
-import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatelessImpl;
-import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatefulImpl;
-import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatelessImpl;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ConversationalTestCase {
-
- private SCADomain domain;
- private ConversationalClient conversationalStatelessClientStatelessService;
- private ConversationalClient conversationalStatelessClientStatefulService;
- private ConversationalClient conversationalStatefulClientStatelessService;
- private ConversationalClient conversationalStatefulClientStatefulService;
-
- @Before
- public void setUp() throws Exception {
- domain = SCADomain.newInstance("conversational.composite");
-
- conversationalStatelessClientStatelessService = domain.getService(ConversationalClient.class,
- "ConversationalStatelessClientStatelessService");
-
- conversationalStatelessClientStatefulService = domain.getService(ConversationalClient.class,
- "ConversationalStatelessClientStatefulService");
-
- conversationalStatefulClientStatelessService = domain.getService(ConversationalClient.class,
- "ConversationalStatefulClientStatelessService");
-
- conversationalStatefulClientStatefulService = domain.getService(ConversationalClient.class,
- "ConversationalStatefulClientStatefulService");
-
-
- // reset the place where we record the sequence of calls passing
- // through each component instance
- ConversationalServiceStatelessImpl.calls = new StringBuffer();
- ConversationalServiceStatefulImpl.calls = new StringBuffer();
- ConversationalClientStatelessImpl.calls = new StringBuffer();
- ConversationalClientStatefulImpl.calls = new StringBuffer();
-
- }
-
- @After
- public void tearDown() throws Exception {
- domain.close();
- }
-
- // stateless client stateful service tests
- // =======================================
- @Test
- public void testStatelessStatefulConversationFromInjectedReference() {
- int count = conversationalStatelessClientStatefulService.runConversationFromInjectedReference();
- Assert.assertEquals(2, count);
- }
-
- @Test
- public void testStatelessStatefulConversationFromServiceReference() {
- int count = conversationalStatelessClientStatefulService.runConversationFromServiceReference();
- Assert.assertEquals(2, count);
- }
-
- @Test
- public void testStatelessStatefulConversationWithUserDefinedConversationId() {
- int count = conversationalStatelessClientStatefulService.runConversationWithUserDefinedConversationId();
- Assert.assertEquals(2, count);
- }
-
- @Test
- public void testStatelessStatefulConversationCheckUserDefinedConversationId() {
- String conversationId = conversationalStatelessClientStatefulService.runConversationCheckUserDefinedConversationId();
- Assert.assertEquals("MyConversation2", conversationId);
- }
-
- @Test
- public void testStatelessStatefulConversationCheckingScope() {
- conversationalStatelessClientStatefulService.runConversationCheckingScope();
- Assert.assertEquals("init,initializeCount,incrementCount,retrieveCount,endConversation,destroy,",
- ConversationalServiceStatefulImpl.calls.toString());
- }
-
- @Test
- public void testStatelessStatefulConversationWithCallback() {
- int count = conversationalStatelessClientStatefulService.runConversationWithCallback();
- Assert.assertEquals(0, count);
-
- Assert.assertEquals("init,runConversationWithCallback,init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,destroy,",
- ConversationalClientStatelessImpl.calls.toString());
- }
-
- //@Test
- public void testStatelessStatefulConversationHavingPassedReference() {
- int count = conversationalStatelessClientStatefulService.runConversationHavingPassedReference();
- Assert.assertEquals(3, count);
- }
-
- @Test
- public void testStatelessStatefulConversationBusinessException() {
- String message = conversationalStatelessClientStatefulService.runConversationBusinessException();
- Assert.assertEquals("Business Exception", message);
- }
-
- @Test
- public void testStatelessStatefulConversationBusinessExceptionCallback() {
- String message = conversationalStatelessClientStatefulService.runConversationBusinessExceptionCallback();
- Assert.assertEquals("Business Exception", message);
- }
-
- @Test
- public void testStatelessStatefulConversationCallingEndedConversation() {
- int count = conversationalStatelessClientStatefulService.runConversationCallingEndedConversation();
- Assert.assertEquals(0, count);
- }
-
- @Test
- public void testStatelessStatefulConversationCallingEndedConversationCallback() {
- int count = conversationalStatelessClientStatefulService.runConversationCallingEndedConversationCallback();
- Assert.assertEquals(0, count);
- }
-
- // stateless client stateless service tests
- // ========================================
- @Test
- public void testStatelessStatelessConversationFromInjectedReference() {
- int count = conversationalStatelessClientStatelessService.runConversationFromInjectedReference();
- Assert.assertEquals(2, count);
- }
-
- @Test
- public void testStatelessStatelessConversationFromServiceReference() {
- int count = conversationalStatelessClientStatelessService.runConversationFromServiceReference();
- Assert.assertEquals(2, count);
- }
-
- @Test
- public void testStatelessStatelessConversationWithUserDefinedConversationId() {
- int count = conversationalStatelessClientStatelessService.runConversationWithUserDefinedConversationId();
- Assert.assertEquals(2, count);
- }
- @Test
- public void testStatelessStatelessConversationCheckUserDefinedConversationId() {
- String conversationId = conversationalStatelessClientStatelessService.runConversationCheckUserDefinedConversationId();
- Assert.assertEquals("MyConversation2", conversationId);
- }
-
- @Test
- public void testStatelessStatelessConversationCheckingScope() {
- conversationalStatelessClientStatelessService.runConversationCheckingScope();
- Assert.assertEquals("init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,",
- ConversationalServiceStatelessImpl.calls.toString());
- }
-
- @Test
- public void testStatelessStatelessConversationWithCallback() {
- int count = conversationalStatelessClientStatelessService.runConversationWithCallback();
- Assert.assertEquals(0, count);
-
- Assert.assertEquals("init,runConversationWithCallback,init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,destroy,",
- ConversationalClientStatelessImpl.calls.toString());
- }
- //@Test
- public void testStatelessStatelessConversationHavingPassedReference() {
- int count = conversationalStatelessClientStatelessService.runConversationHavingPassedReference();
- Assert.assertEquals(3, count);
- }
-
- @Test
- public void testStatelessStatelessConversationCallingEndedConversation() {
- int count = conversationalStatelessClientStatelessService.runConversationCallingEndedConversation();
- Assert.assertEquals(-999, count);
- }
-
- @Test
- public void testStatelessStatelessConversationCallingEndedConversationCallback() {
- int count = conversationalStatelessClientStatelessService.runConversationCallingEndedConversationCallback();
- Assert.assertEquals(0, count);
- }
-
- // stateful client stateful service tests
- // ======================================
- @Test
- public void testStatefulStatefulConversationFromInjectedReference() {
- int count = conversationalStatefulClientStatefulService.runConversationFromInjectedReference();
- Assert.assertEquals(2, count);
- }
-
- @Test
- public void testStatefulStatefulConversationFromServiceReference() {
- int count = conversationalStatefulClientStatefulService.runConversationFromServiceReference();
- Assert.assertEquals(2, count);
- }
-
- @Test
- public void testStatefulStatefulConversationWithUserDefinedConversationId() {
- int count = conversationalStatefulClientStatefulService.runConversationWithUserDefinedConversationId();
- Assert.assertEquals(2, count);
- }
-
- @Test
- public void testStatefulStatefulConversationCheckUserDefinedConversationId() {
- String conversationId = conversationalStatefulClientStatefulService.runConversationCheckUserDefinedConversationId();
- Assert.assertEquals("MyConversation2", conversationId);
- }
-
- @Test
- public void testStatefulStatefulConversationCheckingScope() {
- conversationalStatefulClientStatefulService.runConversationCheckingScope();
- Assert.assertEquals("init,initializeCount,incrementCount,retrieveCount,endConversation,destroy,",
- ConversationalServiceStatefulImpl.calls.toString());
- }
-
- @Test
- public void testStatefulStatefulConversationWithCallback() {
- int count = conversationalStatefulClientStatefulService.runConversationWithCallback();
- Assert.assertEquals(4, count);
-
- Assert.assertEquals("init,runConversationWithCallback,initializeCount,incrementCount,retrieveCount,endConversation,destroy,",
- ConversationalClientStatefulImpl.calls.toString());
- }
-
- //@Test
- public void testStatefulStatefulConversationHavingPassedReference() {
- int count = conversationalStatefulClientStatefulService.runConversationHavingPassedReference();
- Assert.assertEquals(3, count);
- }
-
- @Test
- public void testStatefulStatefulConversationCallingEndedConversation() {
- int count = conversationalStatefulClientStatefulService.runConversationCallingEndedConversation();
- Assert.assertEquals(0, count);
- }
-
- @Test
- public void testStatefulStatefulConversationCallingEndedConversationCallback() {
- int count = conversationalStatefulClientStatefulService.runConversationCallingEndedConversationCallback();
- Assert.assertEquals(0, count);
- }
-
- // stateful client stateless service tests
- // =======================================
- @Test
- public void testStatefulStatelessConversationFromInjectedReference() {
- int count = conversationalStatefulClientStatelessService.runConversationFromInjectedReference();
- Assert.assertEquals(2, count);
- }
-
- @Test
- public void testStatefulStatelessConversationFromServiceReference() {
- int count = conversationalStatefulClientStatelessService.runConversationFromServiceReference();
- Assert.assertEquals(2, count);
- }
-
- @Test
- public void testStatefulStatelessConversationWithUserDefinedConversationId() {
- int count = conversationalStatefulClientStatelessService.runConversationWithUserDefinedConversationId();
- Assert.assertEquals(2, count);
- }
-
- @Test
- public void testStatefulStatelessConversationCheckUserDefinedConversationId() {
- String conversationId = conversationalStatefulClientStatelessService.runConversationCheckUserDefinedConversationId();
- Assert.assertEquals("MyConversation2", conversationId);
- }
-
- @Test
- public void testStatefulStatelessConversationCheckingScope() {
- conversationalStatefulClientStatelessService.runConversationCheckingScope();
- Assert.assertEquals("init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,",
- ConversationalServiceStatelessImpl.calls.toString());
- }
-
- @Test
- public void testStatefulStatelessConversationWithCallback() {
- int count = conversationalStatefulClientStatelessService.runConversationWithCallback();
- Assert.assertEquals(4, count);
-
- Assert.assertEquals("init,runConversationWithCallback,initializeCount,incrementCount,retrieveCount,endConversation,destroy,",
- ConversationalClientStatefulImpl.calls.toString());
- }
-
- //@Test
- public void testStatefulStatelessConversationHavingPassedReference() {
- int count = conversationalStatefulClientStatelessService.runConversationHavingPassedReference();
- Assert.assertEquals(3, count);
- }
-
- @Test
- public void testStatefulStatelessConversationCallingEndedConversation() {
- int count = conversationalStatefulClientStatelessService.runConversationCallingEndedConversation();
- Assert.assertEquals(-999, count);
- }
-
- @Test
- public void testStatefulStatelessConversationCallingEndedConversationCallback() {
- int count = conversationalStatefulClientStatelessService.runConversationCallingEndedConversationCallback();
- Assert.assertEquals(0, count);
- }
-
-}
diff --git a/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/test/ConversationsTestCaseFIXME.java b/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/test/ConversationsTestCaseFIXME.java deleted file mode 100644 index fdbb1f9dca..0000000000 --- a/tags/java/sca/1.0/itest/old/conversations/src/test/java/org/apache/tuscany/sca/test/ConversationsTestCaseFIXME.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.test; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -//FIXME Fix this test case -public class ConversationsTestCaseFIXME extends TestCase { - - private SCADomain domain; - private ConversationsClient aConversationsClient; - - public void testConversations() { - aConversationsClient.run(); - } - - @Override - protected void setUp() throws Exception { - domain = SCADomain.newInstance("ConversationsTest.composite"); - - aConversationsClient = - domain.getService(ConversationsClient.class, - "ConversationsClient/ConversationsClient"); - - } - - @Override - protected void tearDown() throws Exception { - domain.close(); - } - -} diff --git a/tags/java/sca/1.0/itest/old/interop-xsq-client/pom.xml b/tags/java/sca/1.0/itest/old/interop-xsq-client/pom.xml deleted file mode 100644 index c31cce8fc3..0000000000 --- a/tags/java/sca/1.0/itest/old/interop-xsq-client/pom.xml +++ /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. ---> -<project> - <parent> - <groupId>org.apache.tuscany.testing</groupId> - <artifactId>tuscany-interop-clients</artifactId> - <version>0.1-integration-incubating-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - <artifactId>interop-client-webserviceXSQ</artifactId> - <packaging>jar</packaging> - <name>Tuscany Interop Testing - Clients - webserviceXSQ</name> - <properties> - <ws.type>axis2</ws.type> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <forkMode>always</forkMode> - <argLine>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=3720,server=y,suspend=y</argLine> - </configuration> - </plugin> - </plugins> - </build> - - - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca.services.idl</groupId> - <artifactId>tuscany-wsdl</artifactId> - <version>${sca.version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - - - -</project> diff --git a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/main/resources/META-INF/README.txt b/tags/java/sca/1.0/itest/old/interop-xsq-client/src/main/resources/META-INF/README.txt deleted file mode 100644 index 9b26d1690a..0000000000 --- a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/main/resources/META-INF/README.txt +++ /dev/null @@ -1,35 +0,0 @@ -Apache Tuscany M1 build (May, 2006) -=================================== - -http://incubator.apache.org/tuscany/ - -Tuscany is an effort undergoing incubation at the Apache Software Foundation -(ASF), sponsored by the Web Services PMC. - -Incubation is required of all newly accepted projects until a further review -indicates that the infrastructure, communications, and decision making process -have stabilized in a manner consistent with other successful ASF projects. - -While incubation status is not necessarily a reflection of the completeness or -stability of the code, it does indicate that the project has yet to be fully -endorsed by the ASF. - - -Support -------- - -Any problem with this release can be reported to the Tuscany mailing list -or in the JIRA issue tracker. - -Mailing list subscription: - tuscany-dev-subscribe@ws.apache.org - -Jira: - http://issues.apache.org/jira/browse/Tuscany - - -Thank you for using Tuscany! - - -The Tuscany Team. - diff --git a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/java/interop/ClientTestCase.java b/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/java/interop/ClientTestCase.java deleted file mode 100644 index f2a7b198a1..0000000000 --- a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/java/interop/ClientTestCase.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package interop; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.apache.tuscany.test.SCATestCase; -import org.osoa.sca.CompositeContext; -import org.osoa.sca.CurrentCompositeContext; - -/** - * This client program shows how to create an SCA runtime, start it, locate a - * simple HelloWorld service component and invoke it. - */ -public class ClientTestCase extends SCATestCase { - private Object serviceProxy; - - // old tc - // public void testGetQuote() throws ConfigurationException, - // SecurityException, NoSuchMethodException, IllegalArgumentException, - // IllegalAccessException, InvocationTargetException { - // - // TuscanyRuntime tuscany = new TuscanyRuntime("getQuote", null); - // tuscany.start(); - // ModuleContext moduleContext = CurrentModuleContext.getContext(); - // - // Object serviceProxy = moduleContext.locateService("webserviceXSQ"); - // Method m = serviceProxy.getClass().getMethod("GetQuote", new Class[] { - // String.class }); - // - // String sqResponse = (String) m.invoke(serviceProxy, "IBM"); - // - // assertTrue(sqResponse.startsWith("<StockQuotes><Stock><Symbol>IBM</Symbol>")); - // - // tuscany.stop(); - // } - - public void testGetQuote() throws IllegalArgumentException, IllegalAccessException, - InvocationTargetException, SecurityException, NoSuchMethodException { - Method m = serviceProxy.getClass().getMethod("GetQuote", new Class[] {String.class}); - - String sqResponse = (String)m.invoke(serviceProxy, "IBM"); - - assertTrue(sqResponse.startsWith("<StockQuotes><Stock><Symbol>IBM</Symbol>")); - - } - - @Override - protected void setUp() throws Exception { - setApplicationSCDL(getClass(), "META-INF/sca/test.scdl"); - - addExtension("test.exts", getClass().getClassLoader() - .getResource("META-INF/tuscany/test-extensions.scdl")); - - super.setUp(); - CompositeContext compositeContext = CurrentCompositeContext.getContext(); - serviceProxy = compositeContext.locateService(Object.class, "webserviceXSQ"); - } - -} diff --git a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/sca/test.scdl b/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/sca/test.scdl deleted file mode 100644 index 22b3b90623..0000000000 --- a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/sca/test.scdl +++ /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" - xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" - name="composite.webserviceXSQ"> - <dbsdo:import.sdo xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0" location="wsdl/sq.wsdl"/> - - <reference name="webserviceXSQ"> - <interface.wsdl interface="http://www.webserviceX.NET/#wsdl.interface(StockQuoteSoap)" wsdli:wsdlLocation="http://www.webserviceX.NET/ wsdl/sq.wsdl" /> - <binding.ws endpoint="http://www.webserviceX.NET/#wsdl.endpoint(StockQuote/StockQuoteSoap)" - location="wsdl/sq.wsdl" /> - </reference> - -</composite> diff --git a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/binding.axis2.scdl b/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/binding.axis2.scdl deleted file mode 100644 index fb208f56ab..0000000000 --- a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/binding.axis2.scdl +++ /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. ---> -<!-- Axis2 based WebService binding extension --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT" - name="org.apache.tuscany.binding.axis2.WebServiceBinding"> - - <dependency xmlns="http://tuscany.apache.org/xmlns/1.0-SNAPSHOT"> - <group>axis2</group> - <name>axis2-kernel</name> - <version>SNAPSHOT</version> - </dependency> - - <component name="webservice.bindingLoader"> - <system:implementation.system class="org.apache.tuscany.binding.axis2.WebServiceBindingLoader"/> - </component> - - <component name="webservice.axis2.bindingBuilder"> - <system:implementation.system class="org.apache.tuscany.binding.axis2.Axis2BindingBuilder"/> - </component> - -</composite> diff --git a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.axiom.scdl b/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.axiom.scdl deleted file mode 100644 index e4fe956e61..0000000000 --- a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.axiom.scdl +++ /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://www.osoa.org/xmlns/sca/1.0" xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
- name="org.apache.tuscany.databinding.Axiom">
-
- <component name="databinding.axiom">
- <system:implementation.system class="org.apache.tuscany.databinding.axiom.AxiomDataBinding" />
- </component>
-
- <!-- Transformers -->
- <component name="transformer.XMLStreamReader2OMElement">
- <system:implementation.system class="org.apache.tuscany.databinding.axiom.XMLStreamReader2OMElement" />
- </component>
-
- <component name="transformer.OMElement2XMLStreamReader">
- <system:implementation.system class="org.apache.tuscany.databinding.axiom.OMElement2XMLStreamReader" />
- </component>
-
- <component name="transformer.String2OMElement">
- <system:implementation.system class="org.apache.tuscany.databinding.axiom.String2OMElement" />
- </component>
-
- <component name="transformer.OMElement2String">
- <system:implementation.system class="org.apache.tuscany.databinding.axiom.OMElement2String" />
- </component>
-
- <component name="transformer.Object2OMElement">
- <system:implementation.system class="org.apache.tuscany.databinding.axiom.Object2OMElement" />
- </component>
-
- <component name="transformer.OMElement2Object">
- <system:implementation.system class="org.apache.tuscany.databinding.axiom.OMElement2Object" />
- </component>
-
-</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.sdo.scdl b/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.sdo.scdl deleted file mode 100644 index 61753384b4..0000000000 --- a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.sdo.scdl +++ /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. ---> -<!-- - import.sdo configuration - - $Rev: 431086 $ $Date: 2006-08-12 13:58:17 -0700 (Sat, 12 Aug 2006) $ ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT" - name="org.apache.tuscany.databinding.sdo"> - - <!-- import.sdo element loader implementations --> - <component name="elementLoader.import.sdo"> - <system:implementation.system class="org.apache.tuscany.databinding.sdo.ImportSDOLoader"/> - </component> - - <component name="databinding.sdo"> - <system:implementation.system class="org.apache.tuscany.databinding.sdo.SDODataBinding" /> - </component> - - <component name="transformer.DataObject2String"> - <system:implementation.system class="org.apache.tuscany.databinding.sdo.DataObject2String"/> - </component> - <component name="transformer.DataObject2XMLStreamReader"> - <system:implementation.system class="org.apache.tuscany.databinding.sdo.DataObject2XMLStreamReader"/> - </component> - <component name="transformer.XMLDocument2String"> - <system:implementation.system class="org.apache.tuscany.databinding.sdo.XMLDocument2String"/> - </component> - <component name="transformer.String2DataObject"> - <system:implementation.system class="org.apache.tuscany.databinding.sdo.String2DataObject"/> - </component> - <component name="transformer.XMLDocument2XMLStreamReader"> - <system:implementation.system class="org.apache.tuscany.databinding.sdo.XMLDocument2XMLStreamReader"/> - </component> - <component name="transformer.XMLStreamReader2DataObject"> - <system:implementation.system class="org.apache.tuscany.databinding.sdo.XMLStreamReader2DataObject"/> - </component> - <component name="transformer.XMLStreamReader2XMLDocument"> - <system:implementation.system class="org.apache.tuscany.databinding.sdo.XMLStreamReader2XMLDocument"/> - </component> - -</composite> diff --git a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/interface.wsdl.scdl b/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/interface.wsdl.scdl deleted file mode 100644 index 84538dab8b..0000000000 --- a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/interface.wsdl.scdl +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<!-- - Default system configuration for the launcher environment. - - $Rev: 440894 $ $Date: 2006-09-06 15:52:01 -0700 (Wed, 06 Sep 2006) $ ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT" - name="org.apache.tuscany.idl.WSDL"> - - <dependency xmlns="http://tuscany.apache.org/xmlns/1.0-SNAPSHOT"> - <group>wsdl4j</group> - <name>wsdl4j</name> - <version>1.5.2</version> - </dependency> - <dependency xmlns="http://tuscany.apache.org/xmlns/1.0-SNAPSHOT"> - <group>org.apache.ws.commons</group> - <name>XmlSchema</name> - <version>SNAPSHOT</version> - </dependency> - - <component name="interface.wsdl.Loader"> - <system:implementation.system class="org.apache.tuscany.idl.wsdl.InterfaceWSDLLoader" /> - </component> - - <component name="wsdl.Registry"> - <system:implementation.system class="org.apache.tuscany.idl.wsdl.WSDLDefinitionRegistryImpl" initLevel="40" /> - </component> - - <component name="xmlSchema.registry"> - <system:implementation.system class="org.apache.tuscany.idl.wsdl.XMLSchemaRegistryImpl" initLevel="35" /> - </component> - - <component name="interface.wsdl.Introspector"> - <system:implementation.system class="org.apache.tuscany.idl.wsdl.InterfaceWSDLIntrospectorImpl" initLevel="40" /> - </component> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/test-extensions.scdl b/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/test-extensions.scdl deleted file mode 100644 index 355b663a1b..0000000000 --- a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/test-extensions.scdl +++ /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" xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
- name="test.extensions">
-
- <include name="org.apache.tuscany.databinding.axiom" scdlLocation="databinding.axiom.scdl"/>
- <include name="org.apache.tuscany.databinding.sdo" scdlLocation="databinding.sdo.scdl"/>
- <include name="org.apache.tuscany.interface.wsdl" scdlLocation="interface.wsdl.scdl"/>
- <include name="org.apache.tuscany.binding.axis2" scdlLocation="binding.axis2.scdl"/>
-
-
-</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/wsdl/sq.wsdl b/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/wsdl/sq.wsdl deleted file mode 100644 index 0408a60297..0000000000 --- a/tags/java/sca/1.0/itest/old/interop-xsq-client/src/test/resources/wsdl/sq.wsdl +++ /dev/null @@ -1,142 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" - xmlns:tns="http://www.webserviceX.NET/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" - xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://www.webserviceX.NET/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - <wsdl:types> - <s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET/"> - <s:element name="GetQuote"> - <s:complexType> - <s:sequence> - <s:element minOccurs="0" maxOccurs="1" name="symbol" type="s:string" /> - </s:sequence> - </s:complexType> - - </s:element> - <s:element name="GetQuoteResponse"> - <s:complexType> - <s:sequence> - <s:element minOccurs="0" maxOccurs="1" name="GetQuoteResult" type="s:string" /> - </s:sequence> - </s:complexType> - </s:element> - <s:element name="string" nillable="true" type="s:string" /> - - </s:schema> - </wsdl:types> - <wsdl:message name="GetQuoteSoapIn"> - <wsdl:part name="parameters" element="tns:GetQuote" /> - </wsdl:message> - <wsdl:message name="GetQuoteSoapOut"> - <wsdl:part name="parameters" element="tns:GetQuoteResponse" /> - </wsdl:message> - <wsdl:message name="GetQuoteHttpGetIn"> - - <wsdl:part name="symbol" type="s:string" /> - </wsdl:message> - <wsdl:message name="GetQuoteHttpGetOut"> - <wsdl:part name="Body" element="tns:string" /> - </wsdl:message> - <wsdl:message name="GetQuoteHttpPostIn"> - <wsdl:part name="symbol" type="s:string" /> - </wsdl:message> - <wsdl:message name="GetQuoteHttpPostOut"> - - <wsdl:part name="Body" element="tns:string" /> - </wsdl:message> - <wsdl:portType name="StockQuoteSoap"> - <wsdl:operation name="GetQuote"> - <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Get Stock quote for a company Symbol</documentation> - <wsdl:input message="tns:GetQuoteSoapIn" /> - <wsdl:output message="tns:GetQuoteSoapOut" /> - </wsdl:operation> - - </wsdl:portType> - <wsdl:portType name="StockQuoteHttpGet"> - <wsdl:operation name="GetQuote"> - <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Get Stock quote for a company Symbol</documentation> - <wsdl:input message="tns:GetQuoteHttpGetIn" /> - <wsdl:output message="tns:GetQuoteHttpGetOut" /> - </wsdl:operation> - </wsdl:portType> - - <wsdl:portType name="StockQuoteHttpPost"> - <wsdl:operation name="GetQuote"> - <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Get Stock quote for a company Symbol</documentation> - <wsdl:input message="tns:GetQuoteHttpPostIn" /> - <wsdl:output message="tns:GetQuoteHttpPostOut" /> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="StockQuoteSoap" type="tns:StockQuoteSoap"> - - <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> - <wsdl:operation name="GetQuote"> - <soap:operation soapAction="http://www.webserviceX.NET/GetQuote" style="document" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - - </wsdl:operation> - </wsdl:binding> - <wsdl:binding name="StockQuoteHttpGet" type="tns:StockQuoteHttpGet"> - <http:binding verb="GET" /> - <wsdl:operation name="GetQuote"> - <http:operation location="/GetQuote" /> - <wsdl:input> - <http:urlEncoded /> - </wsdl:input> - - <wsdl:output> - <mime:mimeXml part="Body" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:binding name="StockQuoteHttpPost" type="tns:StockQuoteHttpPost"> - <http:binding verb="POST" /> - <wsdl:operation name="GetQuote"> - <http:operation location="/GetQuote" /> - - <wsdl:input> - <mime:content type="application/x-www-form-urlencoded" /> - </wsdl:input> - <wsdl:output> - <mime:mimeXml part="Body" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="StockQuote"> - - <wsdl:port name="StockQuoteSoap" binding="tns:StockQuoteSoap"> - <soap:address location="http://www.webservicex.net/stockquote.asmx" /> - </wsdl:port> - <wsdl:port name="StockQuoteHttpGet" binding="tns:StockQuoteHttpGet"> - <http:address location="http://www.webservicex.net/stockquote.asmx" /> - </wsdl:port> - <wsdl:port name="StockQuoteHttpPost" binding="tns:StockQuoteHttpPost"> - <http:address location="http://www.webservicex.net/stockquote.asmx" /> - </wsdl:port> - - </wsdl:service> -</wsdl:definitions> diff --git a/tags/java/sca/1.0/itest/old/spec-api/pom.xml b/tags/java/sca/1.0/itest/old/spec-api/pom.xml deleted file mode 100644 index b95650c9d9..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/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>1.0-incubating</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-spec-api</artifactId>
- <name>Apache Tuscany SCA Spec API Integration Tests</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.0-incubating</version>
- </dependency>
- - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.0-incubating</version> - <scope>runtime</scope> - </dependency> - </dependencies>
-</project>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/BasicService.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/BasicService.java deleted file mode 100644 index ba9dd59c46..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/BasicService.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.test.spec;
-
-public interface BasicService {
-
- int negate(int theInt);
- int delegateNegate(int theInt);
-
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MathService.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MathService.java deleted file mode 100644 index 0f46725adf..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MathService.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.test.spec;
-
-public interface MathService {
-
- int negate(int theInt);
-
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java deleted file mode 100644 index 7fe9fa4909..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.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.spec;
-
-import org.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface MyListService {
- String[] getHolidays();
-
- String getYear();
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java deleted file mode 100644 index a381fc62dc..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.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.spec;
-
-import org.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface MyListServiceByYear {
- //FIXME renaming method due to TUSCANY-1173. Original name getHolidays
- String[] getHolidaysByYear(int year);
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java deleted file mode 100644 index fbb2161df3..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/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.test.spec;
-
-import java.util.Date;
-
-public interface MyService extends SCAComponentService {
- Date nextHoliday();
-
- String getLocation();
-
- String getYear();
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java deleted file mode 100644 index 98490c4e3d..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.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.test.spec;
-
-import java.util.Date;
-
-import org.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface MyServiceByDate {
- //FIXME renaming method due to TUSCANY-1173. Original name nextHoliday
- Date nextHolidayByDate(Date date);
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java deleted file mode 100644 index 6a4cfc1f79..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.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.test.spec;
-
-public interface MyTotalService extends MyListService, MyListServiceByYear, MyService, MyServiceByDate {
-
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java deleted file mode 100644 index c2d107ef28..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.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.test.spec;
-
-
-public interface SCAComponentService {
- String getComponentName();
-
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/BasicServiceImpl.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/BasicServiceImpl.java deleted file mode 100644 index 083307234a..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/BasicServiceImpl.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.spec.impl;
-
-import org.apache.tuscany.sca.test.spec.BasicService;
-import org.apache.tuscany.sca.test.spec.MathService;
-import org.osoa.sca.ComponentContext;
-import org.osoa.sca.annotations.Context;
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
-
-@Service(BasicService.class)
-public class BasicServiceImpl implements BasicService {
-
- @Context
- protected ComponentContext context;
-
- //The reference anntation is used in lieu of a component type definition
- //This makes the call to getService redundant since the reference is injected
- //but it serves the purpose to demonstrate that getService is working.
- @Reference
- protected MathService mathServiceReference;
-
- public int negate(int theInt) {
- return -theInt;
- }
-
- public int delegateNegate(int theInt) {
- mathServiceReference = context.getService(MathService.class, "mathServiceReference");
- return mathServiceReference.negate(theInt);
- }
-
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MathServiceImpl.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MathServiceImpl.java deleted file mode 100644 index d3dc1585fc..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MathServiceImpl.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.test.spec.impl;
-
-import org.apache.tuscany.sca.test.spec.MathService;
-import org.osoa.sca.annotations.Service;
-
-@Service(MathService.class)
-public class MathServiceImpl implements MathService {
-
- public int negate(int theInt) {
- return -theInt;
- }
-
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java deleted file mode 100644 index 5170c32cd2..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.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.test.spec.impl;
-
-import java.util.List;
-
-import org.apache.tuscany.sca.test.spec.MyListService;
-import org.apache.tuscany.sca.test.spec.MyListServiceByYear;
-import org.osoa.sca.annotations.Property;
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
-
-
-@Service(interfaces = {MyListService.class, MyListServiceByYear.class})
-public class MyListServiceImpl implements MyListService, MyListServiceByYear {
-
- // This is multiplicity=1:n
- @Reference(name = "myListServiceList", required = false)
- public List<MyListService> myListServicesList;
-
- // This is multiplicity=0:n
- @Reference(name = "myListServiceArray", required = false)
- public MyListService[] myListServicesArray;
-
- @Property(name = "serviceYear")
- protected String year = "2006";
-
- public String[] getHolidays() {
- return getHolidaysByYear(new Integer(year).intValue());
- }
-
- public String[] getHolidaysByYear(int year) {
- MyListService myService;
- if (myListServicesList != null) {
- for (int i = 0; i < myListServicesList.size(); i++) {
- myService = myListServicesList.get(i);
- if (new Integer(myService.getYear()).intValue() == year) {
- return myService.getHolidays();
- }
- }
- }
- if (myListServicesArray != null) {
- for (int i = 0; i < myListServicesArray.length; i++) {
- myService = myListServicesArray[i];
- if (new Integer(myService.getYear()).intValue() == year) {
- return myService.getHolidays();
- }
- }
- }
- return null;
- }
-
- public String getYear() {
- return year;
- }
-
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java deleted file mode 100644 index b81c2c2120..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.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.test.spec.impl;
-
-import java.util.Date;
-
-import org.apache.tuscany.sca.test.spec.MyListService;
-import org.apache.tuscany.sca.test.spec.MyListServiceByYear;
-import org.apache.tuscany.sca.test.spec.MyService;
-import org.apache.tuscany.sca.test.spec.MyServiceByDate;
-import org.osoa.sca.annotations.ComponentName;
-import org.osoa.sca.annotations.Destroy;
-import org.osoa.sca.annotations.Init;
-import org.osoa.sca.annotations.Property;
-import org.osoa.sca.annotations.Service;
-
-
-@Service(interfaces = {MyService.class, MyServiceByDate.class, MyListService.class, MyListServiceByYear.class})
-public class MyServiceImpl implements MyService, MyServiceByDate, MyListService, MyListServiceByYear {
- static String[][] holidays =
- {
- {"2006/01/02", "2006/05/29", "2006/07/03", "2006/07/04", "2006/09/04", "2006/11/23", "2006/11/23",
- "2006/11/24", "2006/12/25"},
- {"2007/01/01", "2007/05/28", "2007/07/04", "2007/09/03", "2007/11/22", "2007/11/23", "2007/12/25"}};
-
- @Property(name = "location")
- protected String location = "RTP";
-
- @Property(name = "year")
- protected String year = "2006";
-
- @ComponentName
- private String componentName;
-
- public MyServiceImpl() {
- //System.out.println("creating service instance...");
- }
-
- public Date nextHoliday() {
-
- return nextHolidayByDate(new Date());
- }
-
- @SuppressWarnings("deprecation")
- public Date nextHolidayByDate(Date today) {
- Date d1;
- String[] days = getHolidays();
- for (int j = 0; j < days.length; j++) {
- d1 = new Date(days[j]);
- if (d1.after(today))
- return d1;
- }
- return null;
- }
-
- public String[] getHolidaysByYear(int year) {
- int index = year - 2006;
- if (index >= 0 && index < holidays.length)
- return holidays[index];
- return null;
- }
-
- public String[] getHolidays() {
-
- Integer theYear;
- if (year == null || year.length() == 0)
- theYear = new Integer("2006");
- else
- theYear = new Integer(year);
-
- return getHolidaysByYear(theYear.intValue());
- }
-
- @Init
- public void start() {
- //System.out.println("Start service..");
- }
-
- @Destroy
- public void stop() {
- //System.out.println("Stop service..");
- }
-
- public String getComponentName() {
- return componentName;
- }
-
- public String getLocation() {
- return location;
- }
-
- public String getYear() {
- return year;
- }
-
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java b/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java deleted file mode 100644 index 11767522d6..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.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.test.spec.impl;
-
-import java.util.Date;
-
-import org.apache.tuscany.sca.test.spec.MyListService;
-import org.apache.tuscany.sca.test.spec.MyListServiceByYear;
-import org.apache.tuscany.sca.test.spec.MyService;
-import org.apache.tuscany.sca.test.spec.MyServiceByDate;
-import org.apache.tuscany.sca.test.spec.MyTotalService;
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
-
-
-@Service(MyTotalService.class)
-public class MyTotalServiceImpl implements MyTotalService {
-
- // This is multiplicity=1:1
- @Reference(required = true)
- public MyListService myListService;
-
- // default required==true so it is 1:1
- @Reference
- public MyListServiceByYear myListServiceByYear = new MyServiceImpl();
-
- // default required==true so it is 1:1
- @Reference
- public MyService myService;
-
- // This is multiplicity=0:1
- @Reference(required = false)
- public MyServiceByDate myServiceByDate = new MyServiceImpl();
-
- public String[] getHolidays() {
- return myListService.getHolidays();
- }
-
- public String[] getHolidaysByYear(int year) {
- return myListServiceByYear.getHolidaysByYear(year);
- }
-
- public String getComponentName() {
- return myService.getComponentName();
- }
-
- public Date nextHolidayByDate(Date date) {
- return myServiceByDate.nextHolidayByDate(date);
- }
-
- public String getLocation() {
- return myService.getLocation();
- }
-
- public String getYear() {
- return myService.getYear();
- }
-
- public Date nextHoliday() {
- return myService.nextHoliday();
- }
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/BasicService.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/BasicService.composite deleted file mode 100644 index d650c8ab42..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/BasicService.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://www.osoa.org/xmlns/sca/1.0"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="BasicServiceComposite">
-
- <component name="BasicServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.BasicServiceImpl"/>
- <reference name="mathServiceReference" target="MathServiceComponent"/>
- </component>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/CompositeTest.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/CompositeTest.composite deleted file mode 100644 index 7a5f05b552..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/CompositeTest.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://foo"
- xmlns:foo="http://foo"
- name="CompositeTest">
-
- <include name="foo:myTotalService"></include>
- <include name="foo:myListService"></include>
- <include name="foo:mySimpleServiceInRecursive">foo:mySimpleServiceInRecursive</include>
- <include name="foo:myServiceInRecursive">foo:myServiceInRecursive</include>
- <include name="foo:mySimpleServiceInRecursive2">foo:mySimpleServiceInRecursive2</include>
- <include name="foo:myTotalServiceInRecursive">foo:myTotalServiceInRecursive</include>
- <include name="foo:myTotalServiceInRecursiveForReferenceOverride">foo:myTotalServiceInRecursiveForReferenceOverride</include>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/MathService.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/MathService.composite deleted file mode 100644 index 59f8fa6981..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/MathService.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"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="MathServiceComposite">
-
- <component name="MathServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MathServiceImpl"/>
- </component>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myListService.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myListService.composite deleted file mode 100644 index 1f0cd97fb4..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myListService.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:foo="http://foo"
- targetNamespace="http://foo"
- name="myListService">
-
- <component name="MyNewListService">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyListServiceImpl"/>
- <reference name="myListServiceList" target="MyNCService/MyListService"/>
- <reference name="myListServiceArray" target="MyListServiceFor2006/MyListService"/>
- <property name="serviceYear">2007</property>
- </component>
-
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myServiceInComposite.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myServiceInComposite.composite deleted file mode 100644 index 518cb295f9..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myServiceInComposite.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"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="myServiceInComposite">
-
- <service name="MyService" promote="MyServiceComponent/MyService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </service>
-
-
- <service name="MyListService" promote="MyServiceComponent/MyListService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/>
- </service>
-
-
- <service name="MyListServiceByYear" promote="MyServiceComponent/MyListServiceByYear">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/>
- </service>
-
-
- <service name="MyServiceByDate" promote="MyServiceComponent/MyServiceByDate">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyServiceByDate"/>
- </service>
-
- <component name="MyServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
- <property name="location">CARY</property>
- <property name="year">2007</property>
- </component>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myServiceInRecursive.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myServiceInRecursive.composite deleted file mode 100644 index f9f7615ec5..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myServiceInRecursive.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"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="myServiceInRecursive">
-
- <service name="MyServiceInRecursiveMyService" promote="MyServiceInRecursive/MyService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </service>
-
-
- <service name="MyServiceInRecursiveMyListService" promote="MyServiceInRecursive/MyListService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/>
- </service>
-
-
- <service name="MyServiceInRecursiveMyListServiceByYear" promote="MyServiceInRecursive/MyListServiceByYear">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/>
- </service>
-
-
- <service name="MyServiceInRecursiveMyServiceByDate" promote="MyServiceInRecursive/MyServiceByDate">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyServiceByDate"/>
- </service>
-
-
- <component name="MyServiceInRecursive">
- <implementation.composite name="foo:myServiceInComposite"/>
- </component>
-
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/mySimpleService.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/mySimpleService.composite deleted file mode 100644 index b1ecaced45..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/mySimpleService.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://www.osoa.org/xmlns/sca/1.0"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="mySimpleService">
-
- <service name="MyService" promote="MyServiceComponent/MyService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </service>
-
- <component name="MyServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
- <property name="location">CARY</property>
- <property name="year">2007</property>
- </component>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive.composite deleted file mode 100644 index 662d67612d..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive.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"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="mySimpleServiceInRecursive">
-
- <service name="MySimpleService" promote="MySimpleServiceInRecursive/MyService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </service>
-
-
- <service name="MySimpleServiceNo" promote="MySimpleServiceInRecursive/MyService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </service>
-
- <service name="MySimpleServiceMay" promote="MySimpleServiceInRecursive/MyService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </service>
-
- <service name="MySimpleServiceMust" promote="MySimpleServiceInRecursive/MyService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </service>
-
- <component name="MySimpleServiceInRecursive">
- <implementation.composite name="foo:mySimpleService"/>
- </component>
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive2.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive2.composite deleted file mode 100644 index e059c5b46f..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive2.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"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="mySimpleServiceInRecursive2">
-
- <service name="MySimpleService2Default" promote="MySimpleServiceInRecursiveComponent/MySimpleService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </service>
-
- <service name="MySimpleService2No" promote="MySimpleServiceInRecursiveComponent/MySimpleServiceNo">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </service>
-
- <service name="MySimpleService2May" promote="MySimpleServiceInRecursiveComponent/MySimpleServiceMay">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </service>
-
- <service name="MySimpleService2Must" promote="MySimpleServiceInRecursiveComponent/MySimpleServiceMust">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </service>
-
- <component name="MySimpleServiceInRecursiveComponent">
- <implementation.composite name="foo:mySimpleServiceInRecursive"/>
- </component>
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalService.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalService.composite deleted file mode 100644 index f9076f6811..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalService.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"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="myTotalService">
-
- <include name="foo:myservice">foo:myservice</include>
-
- <component name="MyTotalService">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/>
- <reference name="myService" target="MyNCService/MyService"/>
- <reference name="myListService" target="MyNCService/MyListService"/>
- <reference name="myListServiceByYear" target="MyNCService/MyListServiceByYear"/>
- </component>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalServiceInComposite.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalServiceInComposite.composite deleted file mode 100644 index af41baf277..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalServiceInComposite.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"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="myTotalServiceInComposite">
-
- <service name="MyTotalService" promote="MyTotalServiceComponent">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
- </service>
-
- <component name="MyTotalServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/>
- </component>
-
- <reference name="MyServiceRef" promote="MyTotalServiceComponent/myService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </reference>
-
- <reference name="MyListServiceRef" promote="MyTotalServiceComponent/myListService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/>
- </reference>
-
- <reference name="MyListServiceByYearRef" promote="MyTotalServiceComponent/myListServiceByYear">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/>
- </reference>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite deleted file mode 100644 index e802b469d0..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT 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:foo="http://foo"
- targetNamespace="http://foo"
- name="myTotalServiceInCompositeForReferenceOverride">
-
- <service name="MyTotalServiceNo" promote="MyTotalServiceComponentNo">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
- </service>
-
- <component name="MyTotalServiceComponentNo">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/>
- <reference name="myService"/>
- <reference name="myListService"/>
- <reference name="myListServiceByYear"/>
- </component>
-
- <reference name="MyServiceRefNo" promote="MyTotalServiceComponentNo/myService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </reference>
-
- <reference name="MyListServiceRefNo" promote="MyTotalServiceComponentNo/myListService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/>
- </reference>
-
- <reference name="MyListServiceByYearRefNo" promote="MyTotalServiceComponentNo/myListServiceByYear">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/>
- </reference>
-
- <service name="MyTotalServiceMay" promote="MyTotalServiceComponentMay">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
- </service>
-
- <component name="MyTotalServiceComponentMay">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/>
- </component>
-
- <reference name="MyServiceRefMay" promote="MyTotalServiceComponentMay/myService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </reference>
-
- <reference name="MyListServiceRefMay" promote="MyTotalServiceComponentMay/myListService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/>
- </reference>
-
- <reference name="MyListServiceByYearRefMay" promote="MyTotalServiceComponentMay/myListServiceByYear">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/>
- </reference>
-
- <service name="MyTotalServiceMust" promote="MyTotalServiceComponentMust">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
- </service>
-
- <component name="MyTotalServiceComponentMust">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/>
- </component>
-
- <reference name="MyServiceRefMust" promote="MyTotalServiceComponentMust/myService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
- </reference>
-
- <reference name="MyListServiceRefMust" promote="MyTotalServiceComponentMust/myListService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/>
- </reference>
-
- <reference name="MyListServiceByYearRefMust" promote="MyTotalServiceComponentMust/myListServiceByYear">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/>
- </reference>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalServiceInRecursive.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalServiceInRecursive.composite deleted file mode 100644 index a69c4cedd4..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalServiceInRecursive.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"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="myTotalServiceInRecursive">
-
- <component name="MyServiceInComposite">
- <implementation.composite name="foo:myServiceInComposite"/>
- </component>
-
- <component name="MyTotalServiceFromRecursive">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/>
- <reference name="myService" target="MyServiceInComposite/MyService"/>
- <reference name="myListService" target="MyServiceInComposite/MyListService"/>
- <reference name="myListServiceByYear" target="MyServiceInComposite/MyListServiceByYear"/>
- </component>
-
- <service name="MyTotalServiceInCompositeWithRecursiveUseService" promote="MyTotalServiceInCompositeWithRecursive">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
- </service>
-
- <service name="MyTotalServiceInCompositeWithComponentServiceUseService" promote="MyTotalServiceInCompositeWithComponentService">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
- </service>
-
- <component name="MyTotalServiceInCompositeWithRecursive">
- <implementation.composite name="foo:myTotalServiceInComposite"/>
- <reference name="MyServiceRef" target="MyServiceInComposite/MyService"/>
- <reference name="MyListServiceRef" target="MyServiceInComposite/MyListService"/>
- <reference name="MyListServiceByYearRef" target="MyServiceInComposite/MyListServiceByYear"/>
- </component>
-
- <component name="MyTotalServiceInCompositeWithComponentService">
- <implementation.composite name="foo:myTotalServiceInComposite"/>
- <reference name="MyServiceRef" target="MyServiceInComponent/MyService"/>
- <reference name="MyListServiceRef" target="MyServiceInComponent/MyListService"/>
- <reference name="MyListServiceByYearRef" target="MyServiceInComponent/MyListServiceByYear"/>
- </component>
-
- <component name="myTotalServiceInRecursive_MyServiceInComponent">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
- <property name="location">CARY</property>
- <property name="year">2007</property>
- </component>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite deleted file mode 100644 index 26033aad9f..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite +++ /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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="myTotalServiceInRecursiveForReferenceOverride">
-
- <service name="MyTotalServiceNo" promote="MyTotalServiceForReferenceComponent/MyTotalServiceNo">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
- </service>
-
- <service name="MyTotalServiceMay" promote="MyTotalServiceForReferenceComponent/MyTotalServiceMay">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
- </service>
-
- <service name="MyTotalServiceMust" promote="MyTotalServiceForReferenceComponent/MyTotalServiceMust">
- <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
- </service>
-
- <component name="MyTotalServiceForReferenceComponent">
- <implementation.composite name="foo:myTotalServiceInCompositeForReferenceOverride"/>
- <reference name="MyServiceRefNo" target="MyServiceInComponent/MyService"/>
- <reference name="MyListServiceRefNo" target="MyServiceInComponent/MyListService"/>
- <reference name="MyListServiceByYearRefNo" target="MyServiceInComponent/MyListServiceByYear"/>
- <reference name="MyServiceRefMay" target="MyServiceInComponent/MyService"/>
- <reference name="MyListServiceRefMay" target="MyServiceInComponent/MyListService"/>
- <reference name="MyListServiceByYearRefMay" target="MyServiceInComponent/MyListServiceByYear"/>
- <reference name="MyServiceRefMust" target="MyServiceInComponent/MyService"/>
- <reference name="MyListServiceRefMust" target="MyServiceInComponent/MyListService"/>
- <reference name="MyListServiceByYearRefMust" target="MyServiceInComponent/MyListServiceByYear"/>
- </component>
-
- <component name="myTotalServiceInRecursiveForReferenceOverride_MyServiceInComponent">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
- <property name="location">CARY</property>
- <property name="year">2007</property>
- </component>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myservice.composite b/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myservice.composite deleted file mode 100644 index 4b5972bcc1..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/main/resources/myservice.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://www.osoa.org/xmlns/sca/1.0"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="myservice">
-
- <component name="MyService">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
- </component>
-
- <component name="MyNCService">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
- <property name="location">NC</property>
- <property name="year">2007</property>
- </component>
-
- <component name="MyServiceByDate">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
- </component>
-
- <component name="MyListService">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
- </component>
-
- <component name="MyListServiceFor2006">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
- <property name="year">2006</property>
- </component>
-
- <component name="MyListServiceByYear">
- <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
- </component>
-
-</composite>
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentContextTestCase.java b/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentContextTestCase.java deleted file mode 100644 index 3f64202f13..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentContextTestCase.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.spec;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ComponentContextTestCase {
-
- private SCADomain domain;
-
- /**
- * Test description: Locate a service and invoke a method.
- */
- @Test
- public void simpleLocate() {
- BasicService service = domain.getService(BasicService.class, "BasicServiceComponent");
- assertEquals(-99, service.negate(99));
- }
-
- /**
- * Test description: Locate a service that will then locate another service
- * via a defined reference by means of:
- * ComponentContext.getService(Class<B>businessInterface, String referenceName);
- */
- @Test
- public void delegateViaDefinedReference() {
- BasicService service = domain.getService(BasicService.class, "BasicServiceComponent");
- assertEquals(-99, service.delegateNegate(99));
- }
-
- @Before
- public void init() throws Exception {
- domain = SCADomain.newInstance("http://localhost", "/", "BasicService.composite", "MathService.composite");
- }
-
- @After
- public void destroy() throws Exception {
- domain.close();
- }
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCaseFIXME.java b/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCaseFIXME.java deleted file mode 100644 index 6a96326fbf..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCaseFIXME.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.spec;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-public class ComponentServiceReferenceListTestCaseFIXME extends TestCase {
- private MyListService myListService;
- private MyListServiceByYear myListServiceByYear;
-
- private SCADomain domain;
-
- public void testDefaultProperty() {
- assertEquals("2007", myListService.getYear());
-
- }
-
- public void testDefaultService() {
- assertEquals(myListService.getHolidays()[0], myListServiceByYear.getHolidaysByYear(2007)[0]);
-
- }
-
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("CompositeTest.composite");
- myListService = domain.getService(MyListService.class, "MyNewListService");
- myListServiceByYear = domain.getService(MyListServiceByYear.class, "MyNewListService");
- }
-
- protected void tearDown() throws Exception {
- domain.close();
- }
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java b/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java deleted file mode 100644 index b5c6a0d7b5..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.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.spec;
-
-import java.util.Date;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-public class ComponentServiceReferenceTestCase extends TestCase {
- private MyTotalService myService;
- private SCADomain domain;
-
- public void testDefaultProperty() {
- assertEquals("NC", myService.getLocation());
- assertEquals("2007", myService.getYear());
-
- }
-
- public void testDefaultService() {
- assertNotSame(myService.nextHoliday(), myService.nextHolidayByDate(new Date()));
- assertEquals(myService.getHolidays()[0], myService.getHolidaysByYear(2007)[0]);
-
- }
-
- public void testContext() {
- //FIXME TUSCANY-1174 - Need support for @ComponentName
- /*
- assertNotNull("Service component name is null", myService.getComponentName());
- assertNotNull("service context is null", myService.getContext());
-
- System.out.println("Service component name :" + myService.getComponentName());
- System.out.println("service context :" + myService.getContext());
-
- test(context);
- */
- }
-
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("CompositeTest.composite");
- myService = domain.getService(MyTotalService.class, "MyTotalService");
- }
-
- protected void tearDown() throws Exception {
- domain.close();
- }
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java b/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java deleted file mode 100644 index d136530412..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.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.spec;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-
-import java.util.Date;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class ComponentTestCase {
- private static MyService myService;
- private static MyServiceByDate myServiceByDate;
- private static MyListService myListService;
- private static MyListServiceByYear myListServiceByYear;
- private static MyService myNCService;
- private static MyListService myListServiceFor2006;
-
- private static SCADomain domain;
-
- @Test
- public void testDefaultProperty() {
- assertEquals("RTP", myService.getLocation());
- assertEquals("2006", myService.getYear());
-
- }
-
- @Test
- public void testDefaultService() {
- assertEquals(myService.nextHoliday(), myServiceByDate.nextHolidayByDate(new Date()));
- assertEquals(myListService.getHolidays()[0], myListServiceByYear.getHolidaysByYear(2006)[0]);
-
- }
-
- @Test
- public void testOverrideProperty() {
- assertEquals("NC", myNCService.getLocation());
- assertEquals("2007", myNCService.getYear());
- }
-
- @Test
- public void testServiceWithOverrideProperty() {
- assertFalse(myNCService.nextHoliday() == myService.nextHoliday());
- assertEquals(myListServiceFor2006.getHolidays()[0], myListServiceByYear.getHolidaysByYear(2006)[0]);
-
- }
-
- @Test
- public void testContext() {
- //FIXME TUSCANY-1174 - Need support for @ComponentName
- /*
- assertNotNull("Service component name is null", myService.getComponentName());
- assertNotNull("service context is null", myService.getContext());
-
- System.out.println("Service component name :" + myService.getComponentName());
- System.out.println("service context :" + myService.getContext());
-
- test(context);
- */
- }
-
- @BeforeClass
- public static void init() throws Exception {
- domain = SCADomain.newInstance("CompositeTest.composite");
- myService = domain.getService(MyService.class, "MyService");
- myServiceByDate = domain.getService(MyServiceByDate.class, "MyServiceByDate");
- myListService = domain.getService(MyListService.class, "MyListService");
- myListServiceByYear = domain.getService(MyListServiceByYear.class, "MyListServiceByYear");
- myNCService = domain.getService(MyService.class, "MyNCService");
- myListServiceFor2006 = domain.getService(MyListService.class, "MyListServiceFor2006");
- }
-
- @AfterClass
- public static void destroy() throws Exception {
- domain.close();
- }
-
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTestCaseFIXME.java b/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTestCaseFIXME.java deleted file mode 100644 index 5e54b5dcfa..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTestCaseFIXME.java +++ /dev/null @@ -1,106 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * 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.spec;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-@SuppressWarnings("deprecation")
-public class CompositeOneService2LevelTestCaseFIXME extends TestCase {
- private MyService myService;
- private MyService myServiceDefault;
- private MyService myServiceNo;
- private MyService myServiceMay;
- private MyService myServiceMust;
-
- private SCADomain domain;
-
- public void testPropertyFromComponent() {
- assertEquals("CARY", myService.getLocation());
- assertEquals("2007", myService.getYear());
-
- }
-
- public void testPropertyFromServiceDefault() {
- assertEquals("CARY", myServiceDefault.getLocation());
- assertEquals("2007", myServiceDefault.getYear());
-
- }
-
- public void testServiceDefault() {
- assertEquals(myService.nextHoliday(), myServiceDefault.nextHoliday());
- }
-
- public void testPropertyFromServiceNo() {
- assertEquals("CARY", myServiceNo.getLocation());
- assertEquals("2007", myServiceNo.getYear());
-
- }
-
- public void testServiceNo() {
- assertEquals(myService.nextHoliday(), myServiceNo.nextHoliday());
- }
-
- public void testPropertyFromServiceMay() {
- assertEquals("CARY", myServiceMay.getLocation());
- assertEquals("2007", myServiceMay.getYear());
-
- }
-
- public void testServiceMay() {
- assertEquals(myService.nextHoliday(), myServiceMay.nextHoliday());
- }
-
- public void testPropertyFromServiceMust() {
- assertEquals("CARY", myServiceMust.getLocation());
- assertEquals("2007", myServiceMust.getYear());
-
- }
-
- public void testServiceMust() {
- assertEquals(myService.nextHoliday(), myServiceMust.nextHoliday());
- }
-
- public void testContext() {
- //FIXME TUSCANY-1174 - Need support for @ComponentName
- /*
- assertNotNull("Service component name is null", myService.getComponentName());
- assertNotNull("service context is null", myService.getContext());
-
- System.out.println("Service component name :" + myService.getComponentName());
- System.out.println("service context :" + myService.getContext());
-
- test(context);
- */
- }
-
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("CompositeTest.composite");
- myService = domain.getService(MyService.class, "MySimpleServiceInRecursiveComponent");
- myServiceDefault = domain.getService(MyService.class, "MySimpleServiceDefault");
- myServiceNo = domain.getService(MyService.class, "MySimpleServiceNo");
- myServiceMay = domain.getService(MyService.class, "MySimpleServiceMay");
- myServiceMust = domain.getService(MyService.class, "MySimpleServiceMust");
- }
-
- protected void tearDown() throws Exception {
- domain.close();
- }
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTestCase.java b/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTestCase.java deleted file mode 100644 index c29e9e72b3..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTestCase.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.test.spec;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-public class CompositeOneServiceTestCase extends TestCase {
- private MyService myService;
- private SCADomain domain;
-
- public void testOverrideProperty() {
- assertEquals("CARY", myService.getLocation());
- assertEquals("2007", myService.getYear());
-
- }
-
- public void testDefaultService() {
- assertNotNull(myService.nextHoliday());
- }
-
- public void testContext() {
- //FIXME TUSCANY-1174 - Need support for @ComponentName
- /*
- assertNotNull("Service component name is null", myService.getComponentName());
- assertNotNull("service context is null", myService.getContext());
-
- System.out.println("Service component name :" + myService.getComponentName());
- System.out.println("service context :" + myService.getContext());
-
- test(context);
- */
- }
-
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("CompositeTest.composite");
- myService = domain.getService(MyService.class, "MySimpleServiceInRecursive");
- }
-
- protected void tearDown() throws Exception {
- domain.close();
- }
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTestCase.java b/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTestCase.java deleted file mode 100644 index eb846ddb71..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTestCase.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.test.spec;
-
-import java.util.Date;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-public class CompositeServiceReferenceForRefOverrideTestCase extends TestCase {
- private MyTotalService myService1;
- private MyTotalService myService2;
- private MyTotalService myService3;
- private SCADomain domain;
-
- public void testPropertyWithServiceFromReferenceNo() {
- assertEquals("CARY", myService1.getLocation());
- assertEquals("2007", myService1.getYear());
- }
-
- public void testPropertyWithServiceFromReferenceMay() {
- assertEquals("CARY", myService2.getLocation());
- assertEquals("2007", myService2.getYear());
-
- }
-
- public void testPropertyWithServiceFromReferenceMust() {
- assertEquals("CARY", myService3.getLocation());
- assertEquals("2007", myService3.getYear());
- }
-
- public void testServiceFromReferenceNo() {
- System.out.println("nextHolday()" + myService1.nextHoliday());
- System.out.println("nextHolday(Date)" + myService1.nextHolidayByDate(new Date()));
- System.out.println("myService1.getHolidays()[0]" + myService1.getHolidays()[0]);
- System.out.println("myService1.getHolidays(2007)[0]" + myService1.getHolidaysByYear(2007)[0]);
- assertNotSame(myService1.nextHoliday(), myService1.nextHolidayByDate(new Date()));
- assertEquals(myService1.getHolidays()[0], myService1.getHolidaysByYear(2007)[0]);
- }
-
- public void testServiceFromReferenceMay() {
- assertEquals(myService2.getHolidays()[0], myService2.getHolidaysByYear(2007)[0]);
- assertNotSame(myService2.nextHoliday(), myService2.nextHolidayByDate(new Date()));
-
- }
-
- public void testServiceFromReferenceMust() {
- assertEquals(myService3.getHolidays()[0], myService3.getHolidaysByYear(2007)[0]);
- assertNotSame(myService3.nextHoliday(), myService3.nextHolidayByDate(new Date()));
-
- }
-
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("CompositeTest.composite");
- myService1 = domain.getService(MyTotalService.class, "MyTotalServiceNo");
- myService2 = domain.getService(MyTotalService.class, "MyTotalServiceMay");
- myService3 = domain.getService(MyTotalService.class, "MyTotalServiceMust");
- }
-
- protected void tearDown() throws Exception {
- domain.close();
- }
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTestCase.java b/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTestCase.java deleted file mode 100644 index 60ee8b2011..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTestCase.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 org.apache.tuscany.sca.test.spec;
-
-import java.util.Date;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-public class CompositeServiceReferenceTestCase extends TestCase {
- private MyTotalService myService1;
- private MyTotalService myService2;
- private MyTotalService myService3;
- private MyTotalService myService4;
- private MyTotalService myService5;
- private SCADomain domain;
-
- public void FIXMEtestPropertyWithServiceFromRecursive() {
- assertEquals("CARY", myService1.getLocation());
- assertEquals("2007", myService1.getYear());
- }
-
- public void testPropertyWithServiceInCompositeFromRecursive() {
- assertEquals("CARY", myService2.getLocation());
- assertEquals("2007", myService2.getYear());
-
- }
-
- public void testPropertyWithServiceInCompositeFromComponent() {
- assertEquals("CARY", myService3.getLocation());
- assertEquals("2007", myService3.getYear());
- }
-
- public void FIXMEtestServiceFromRecursive() {
- assertNotSame(myService1.nextHoliday(), myService1.nextHolidayByDate(new Date()));
- assertEquals(myService1.getHolidays()[0], myService1.getHolidaysByYear(2007)[0]);
-
- }
-
- public void testServiceReferenceFromRecursive() {
- assertEquals(myService2.getHolidays()[0], myService2.getHolidaysByYear(2007)[0]);
- assertNotSame(myService2.nextHoliday(), myService2.nextHolidayByDate(new Date()));
-
- }
-
- public void testServiceReferenceFromRecursiveUseService() {
- assertNotSame(myService4.nextHoliday(), myService4.nextHolidayByDate(new Date()));
- assertEquals(myService4.getHolidays()[0], myService4.getHolidaysByYear(2007)[0]);
- }
-
- public void testServiceReferenceFromComponent() {
- assertEquals(myService3.getHolidays()[0], myService3.getHolidaysByYear(2007)[0]);
- assertNotSame(myService3.nextHoliday(), myService3.nextHolidayByDate(new Date()));
-
- }
-
- public void testServiceReferenceFromComponentUseService() {
- assertNotSame(myService5.nextHoliday(), myService5.nextHolidayByDate(new Date()));
- assertEquals(myService5.getHolidays()[0], myService5.getHolidaysByYear(2007)[0]);
- }
-
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("CompositeTest.composite");
- myService1 = domain.getService(MyTotalService.class, "MyTotalServiceFromRecursive");
- myService2 = domain.getService(MyTotalService.class, "MyTotalServiceInCompositeWithRecursive");
- myService3 = domain.getService(MyTotalService.class, "MyTotalServiceInCompositeWithComponentService");
- myService4 = domain.getService(MyTotalService.class, "MyTotalServiceInCompositeWithRecursiveUseService");
- myService5 =
- domain.getService(MyTotalService.class, "MyTotalServiceInCompositeWithComponentServiceUseService");
- }
-
- protected void tearDown() throws Exception {
- domain.close();
- }
-}
diff --git a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTestCase.java b/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTestCase.java deleted file mode 100644 index d9c2a73f7e..0000000000 --- a/tags/java/sca/1.0/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTestCase.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.test.spec;
-
-import static junit.framework.Assert.assertEquals;
-
-import java.util.Date;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class CompositeTestCase {
- private static MyService myService;
- private static MyServiceByDate myServiceByDate;
- private static MyListService myListService;
- private static MyListServiceByYear myListServiceByYear;
-
- private static SCADomain domain;
-
- @Test
- public void testOverrideProperty() {
- assertEquals("CARY", myService.getLocation());
- assertEquals("2007", myService.getYear());
-
- }
-
- @Test
- public void testDefaultService() {
- assertEquals(myService.nextHoliday(), myServiceByDate.nextHolidayByDate(new Date()));
- assertEquals(myListService.getHolidays()[0], myListServiceByYear.getHolidaysByYear(2007)[0]);
-
- }
-
- @Test
- public void testContext() {
- // FIXME TUSCANY-1174 - Need support for @ComponentName
- /*
- * assertNotNull("Service component name is null",
- * myService.getComponentName()); assertNotNull("service context is
- * null", myService.getContext()); System.out.println("Service component
- * name :" + myService.getComponentName()); System.out.println("service
- * context :" + myService.getContext()); test(context);
- */
- }
-
- @BeforeClass
- public static void init() throws Exception {
- domain = SCADomain.newInstance("CompositeTest.composite");
- myService = domain.getService(MyService.class, "MyServiceInRecursiveMyService");
- myServiceByDate = domain.getService(MyServiceByDate.class, "MyServiceInRecursiveMyServiceByDate");
- myListService = domain.getService(MyListService.class, "MyServiceInRecursiveMyListService");
- myListServiceByYear = domain.getService(MyListServiceByYear.class,
- "MyServiceInRecursiveMyListServiceByYear");
- }
-
- @AfterClass
- public static void destroy() throws Exception {
- domain.close();
- }
-}
|