diff options
Diffstat (limited to '')
108 files changed, 8271 insertions, 0 deletions
diff --git a/branches/sca-java-0.99/itest/old/bindings/bindingsclient/pom.xml b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/pom.xml new file mode 100644 index 0000000000..396b677a1b --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/pom.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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>0.99-incubating-SNAPSHOT</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>0.99-incubating-SNAPSHOT</version> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.testing.bindingstest</groupId> + <artifactId>itest-bindings-bindingsutility</artifactId> + <version>0.99-incubating-SNAPSHOT</version> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-databinding-sdo</artifactId> + <version>0.99-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> + </dependencies> + +</project> diff --git a/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java new file mode 100644 index 0000000000..44801846f6 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/resources/bindingsclient.composite b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/resources/bindingsclient.composite new file mode 100644 index 0000000000..ca3ff6494e --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/resources/bindingsclient.composite @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/resources/wsdl/testtool.wsdl b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/resources/wsdl/testtool.wsdl new file mode 100644 index 0000000000..7dc608f063 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/resources/wsdl/testtool.wsdl @@ -0,0 +1,272 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/webapp/SCATestTool.jsp b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/webapp/SCATestTool.jsp new file mode 100644 index 0000000000..eb219e4cef --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/webapp/SCATestTool.jsp @@ -0,0 +1,130 @@ +<%--/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..fd58cb8b0e --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,31 @@ +<!-- + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java new file mode 100644 index 0000000000..6cc72c99a2 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java new file mode 100644 index 0000000000..b5f076b7e8 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java new file mode 100644 index 0000000000..0f6cb912a7 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/pom.xml b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/pom.xml new file mode 100644 index 0000000000..8e4f8cc4fb --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/pom.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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>0.99-incubating-SNAPSHOT</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>0.99-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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelper.java b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelper.java new file mode 100644 index 0000000000..efe30c4f4e --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelper.java @@ -0,0 +1,341 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelperException.java b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelperException.java new file mode 100644 index 0000000000..074fba8057 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelperException.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java new file mode 100644 index 0000000000..c55e22c905 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java new file mode 100644 index 0000000000..44e799a566 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java new file mode 100644 index 0000000000..67b7e8eb64 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServiceImpl.java b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServiceImpl.java new file mode 100644 index 0000000000..e207a23927 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServiceImpl.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java new file mode 100644 index 0000000000..0ceb553727 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite-system.composite b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite-system.composite new file mode 100644 index 0000000000..0b894bf701 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite-system.composite @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite.composite b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite.composite new file mode 100644 index 0000000000..9b2bb51b9c --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite.composite @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testtool.wsdl b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testtool.wsdl new file mode 100644 index 0000000000..870af6ac2e --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testtool.wsdl @@ -0,0 +1,272 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testutility.wsdl b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testutility.wsdl new file mode 100644 index 0000000000..32d9050a61 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testutility.wsdl @@ -0,0 +1,704 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java new file mode 100644 index 0000000000..727eb2332f --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingsutility/pom.xml b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/pom.xml new file mode 100644 index 0000000000..4bd098efcb --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/pom.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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>0.99-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>0.99-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/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java new file mode 100644 index 0000000000..664fb06930 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java new file mode 100644 index 0000000000..cd967e275a --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java new file mode 100644 index 0000000000..0ceb553727 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServiceImpl.java b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServiceImpl.java new file mode 100644 index 0000000000..e752e4d6e6 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServiceImpl.java @@ -0,0 +1,157 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility-system.composite b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility-system.composite new file mode 100644 index 0000000000..7126b78572 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility-system.composite @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility.composite b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility.composite new file mode 100644 index 0000000000..4d3d9bc523 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility.composite @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/resources/wsdl/testutility.wsdl b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/resources/wsdl/testutility.wsdl new file mode 100644 index 0000000000..32d9050a61 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/main/resources/wsdl/testutility.wsdl @@ -0,0 +1,704 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java new file mode 100644 index 0000000000..66246fc006 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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/branches/sca-java-0.99/itest/old/bindings/pom.xml b/branches/sca-java-0.99/itest/old/bindings/pom.xml new file mode 100644 index 0000000000..895a924bf9 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/bindings/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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>0.99-incubating-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <modelVersion>4.0.0</modelVersion> + <version>0.99-incubating-SNAPSHOT</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/branches/sca-java-0.99/itest/old/interop-soap-client/pom.xml b/branches/sca-java-0.99/itest/old/interop-soap-client/pom.xml new file mode 100644 index 0000000000..a333346545 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/pom.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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-webserviceInteropDoc</artifactId> + <packaging>jar</packaging> + <name>Tuscany Interop Testing - Clients - InteropDoc</name> + + <properties> + <ws.type>axis2</ws.type> + </properties> + + + <build> + <plugins> + <plugin> + <groupId>org.apache.tuscany.sdo</groupId> + <artifactId>tuscany-sdo-plugin</artifactId> + <version1.0-incubating</version> + <executions> + <execution> + <configuration> + <schemaFile>${basedir}/src/main/resources/wsdl/interopdoc.wsdl</schemaFile> + <noNotification>true</noNotification> + <noContainer>true</noContainer> + <noInterfaces>true</noInterfaces> + <noUnsettable>true</noUnsettable> + </configuration> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.tuscany.sca.extensions.axis2.plugins</groupId> + <artifactId>tuscany-plugin-wsdl2java</artifactId> + <version>${sca.version}</version> + <executions> + <execution> + <configuration> + <wsdlFile>${basedir}/src/main/resources/wsdl/interopdoc.wsdl</wsdlFile> + <javaPackage>org.soapinterop</javaPackage> + </configuration> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + </build> +</project> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/java/org/apache/tuscany/test/interop/client/LoopbackInteropDocServiceComponentImpl.java b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/java/org/apache/tuscany/test/interop/client/LoopbackInteropDocServiceComponentImpl.java new file mode 100644 index 0000000000..1b3a6a6c1d --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/java/org/apache/tuscany/test/interop/client/LoopbackInteropDocServiceComponentImpl.java @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.test.interop.client; + +import java.rmi.RemoteException; + +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; +import org.soapinterop.ComplexDocument; +import org.soapinterop.DocTestPortType; +import org.soapinterop.SimpleDocument1; +import org.soapinterop.SingleTag; + +/** + * This class implements the DocTest service component. + */ +@Service(DocTestPortType.class) +//FIXME workaround for JIRA TUSCANY-41 +@Scope("COMPOSITE") +public class LoopbackInteropDocServiceComponentImpl implements DocTestPortType { + + public ComplexDocument ComplexDocument(ComplexDocument param0) throws RemoteException { + return param0; + } + + public SimpleDocument1 SimpleDocument(SimpleDocument1 param4) throws RemoteException { + return param4; + } + + public SingleTag SingleTag(SingleTag param2) throws RemoteException { + return param2; + } +} diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/README.txt b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/README.txt new file mode 100644 index 0000000000..9b26d1690a --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/README.txt @@ -0,0 +1,35 @@ +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/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/sca/default.scdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/sca/default.scdl new file mode 100644 index 0000000000..d286a5137f --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/sca/default.scdl @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0"
+ name="interop.client">
+<!--
+ <import.sdo factory="org.soapinterop.SoapinteropFactory"/>
+ <import.wsdl wsdlLocation="wsdl/interopdoc.wsdl"/>
+ -->
+ <!-- import.sdo location="wsdl/interopdoc.wsdl" -->
+ <dbsdo:import.sdo factory="org.soapinterop.SoapinteropFactory"/>
+
+ <component name="LoopbackInteropDocService">
+ <implementation.java class="org.apache.tuscany.test.interop.client.LoopbackInteropDocServiceComponentImpl"/>
+ </component>
+
+ <reference name="RemoteInteropDocService">
+ <!-- interface.wsdl interface="http://soapinterop.org/#wsdl.interface(DocTestPortType)"/ -->
+ <interface.java interface="org.soapinterop.DocTestPortType"/>
+
+ <binding.ws endpoint="http://soapinterop.org/#wsdl.endpoint(interopDocSvc/interopDocPort)" location="wsdl/interopdoc.wsdl"/>
+ </reference>
+
+ <reference name="LocalHostInteropDocService">
+ <!-- interface.wsdl interface="http://soapinterop.org/#wsdl.interface(DocTestPortType)"/ -->
+ <interface.java interface="org.soapinterop.DocTestPortType"/>
+
+
+ <binding.ws endpoint="http://soapinterop.org/#wsdl.endpoint(interopDocSvc/interopDocPort)"
+ location="wsdl/interopdoc.wsdl"/>
+ </reference>
+
+</composite>
\ No newline at end of file diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/binding.axis2.scdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/binding.axis2.scdl new file mode 100644 index 0000000000..fb208f56ab --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/binding.axis2.scdl @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl new file mode 100644 index 0000000000..92a6be450f --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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> + + <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> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.sdo.scdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.sdo.scdl new file mode 100644 index 0000000000..61753384b4 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.sdo.scdl @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/interface.wsdl.scdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/interface.wsdl.scdl new file mode 100644 index 0000000000..84538dab8b --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/interface.wsdl.scdl @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl new file mode 100644 index 0000000000..bda64f749e --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 name="test.extensions" xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"> + <include name="org.apache.tuscany.interface.wsdl" scdlLocation="includes/interface.wsdl.scdl"/> + <include name="org.apache.tuscany.databinding.axiom" scdlLocation="includes/databinding.axiom.scdl"/> + <include name="org.apache.tuscany.databinding.sdo" scdlLocation="includes/databinding.sdo.scdl"/> + <include name="org.apache.tuscany.binding.axis2" scdlLocation="includes/binding.axis2.scdl"/> +</composite> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/wsdl/interopdoc.wsdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/wsdl/interopdoc.wsdl new file mode 100644 index 0000000000..89a8a2e3de --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/wsdl/interopdoc.wsdl @@ -0,0 +1,185 @@ +<?xml version="1.0"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + --> +<definitions name="InteropTestDoc" targetNamespace="http://soapinterop.org/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://soapinterop.org/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> + + <types> + + <xsd:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/" xmlns:interop="http://soapinterop.org/"> + + <xsd:element name="SingleTag"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="SingleTag" type="interop:SingleTag"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="SingleTag"/> + <xsd:element name="SingleTagResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="SingleTag" type="interop:SingleTag"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="SimpleDocument"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="SimpleDocument" type="interop:SimpleDocument"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:complexType name="SimpleDocument"> + <xsd:simpleContent> + <xsd:extension base="xsd:string"/> + </xsd:simpleContent> + </xsd:complexType> + <xsd:element name="SimpleDocumentResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="SimpleDocument" type="interop:SimpleDocument"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="ComplexDocument"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="ComplexDocument" type="interop:ComplexDocument"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:complexType name="ComplexDocument"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="simpleDoc" type="interop:ArrayOfSimpleDocument"/> + <xsd:element minOccurs="0" maxOccurs="1" name="child" type="interop:ChildDocument"/> + </xsd:sequence> + <xsd:attribute name="AnAttribute" type="xsd:string"/> + </xsd:complexType> + <xsd:complexType name="ArrayOfSimpleDocument"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="unbounded" name="SimpleDocument" nillable="true" type="interop:SimpleDocument"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="ChildDocument"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="childSimpleDoc" type="interop:ArrayOfSimpleDocument"/> + </xsd:sequence> + </xsd:complexType> + <xsd:element name="ComplexDocumentResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="ComplexDocument" type="interop:ComplexDocument"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + </xsd:schema> + + </types> + + <message name="SingleTagSoapIn"> + <part name="parameters" element="tns:SingleTag"/> + </message> + <message name="SingleTagSoapOut"> + <part name="outputDoc" element="tns:SingleTagResponse"/> + </message> + <message name="SimpleDocumentSoapIn"> + <part name="parameters" element="tns:SimpleDocument"/> + </message> + <message name="SimpleDocumentSoapOut"> + <part name="outputDoc" element="tns:SimpleDocumentResponse"/> + </message> + <message name="ComplexDocumentSoapIn"> + <part name="parameters" element="tns:ComplexDocument"/> + </message> + <message name="ComplexDocumentSoapOut"> + <part name="outputDoc" element="tns:ComplexDocumentResponse"/> + </message> + + <portType name="DocTestPortType"> + + <operation name="SingleTag"> + <input message="tns:SingleTagSoapIn"/> + <output message="tns:SingleTagSoapOut"/> + </operation> + <operation name="SimpleDocument"> + <input message="tns:SimpleDocumentSoapIn"/> + <output message="tns:SimpleDocumentSoapOut"/> + </operation> + <operation name="ComplexDocument"> + <input message="tns:ComplexDocumentSoapIn"/> + <output message="tns:ComplexDocumentSoapOut"/> + </operation> + + </portType> + + <binding name="doc_test_binding" type="tns:DocTestPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + + <operation name="SingleTag"> + <soap:operation soapAction="http://soapinterop.org/SingleTag"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + + <operation name="SimpleDocument"> + <soap:operation soapAction="http://soapinterop.org/SimpleDocument"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + + <operation name="ComplexDocument"> + <soap:operation soapAction="http://soapinterop.org/ComplexDocument"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + </binding> + + <service name="interopDocSvc"> + + <port name="interopDocPort" binding="tns:doc_test_binding"> + <soap:address location="http://www.whitemesa.net/interopdoc"/> + <!-- soap:address location="http://mssoapinterop.org/asmx/simple.asmx"/ --> + <!-- soap:address location="http://easysoap.sourceforge.net/cgi-bin/interopserver"/ --> + <!-- soap:address location="http://www.mssoapinterop.org/remoting/ServiceAllTypes.soap"/ --> + <http-conf:client xmlns:http-conf="http://celtix.objectweb.org/transports/http/configuration" + AllowChunking="false"/> + </port> + + </service> + +</definitions> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/test/java/org/apache/tuscany/test/interop/client/InteropDocClientTestCase.java b/branches/sca-java-0.99/itest/old/interop-soap-client/src/test/java/org/apache/tuscany/test/interop/client/InteropDocClientTestCase.java new file mode 100644 index 0000000000..6b74f04283 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/test/java/org/apache/tuscany/test/interop/client/InteropDocClientTestCase.java @@ -0,0 +1,155 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.test.interop.client; + +import java.rmi.RemoteException; + +import org.apache.tuscany.test.SCATestCase; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; +import org.soapinterop.ArrayOfSimpleDocument; +import org.soapinterop.ChildDocument; +import org.soapinterop.ComplexDocument; +import org.soapinterop.DocTestPortType; +import org.soapinterop.SimpleDocument; +import org.soapinterop.SimpleDocument1; +import org.soapinterop.SingleTag; + +import commonj.sdo.helper.DataFactory; + +public class InteropDocClientTestCase extends SCATestCase { + + private DataFactory dataFactory; + + private DocTestPortType interopDoc; + + public InteropDocClientTestCase(){}; + + public void testSingleTag() throws RemoteException { + + // Create the input + SingleTag input = (SingleTag) dataFactory.create(SingleTag.class); + + // Invoke the service + SingleTag output = interopDoc.SingleTag(input); + + // Test the results + assertNotNull(output); + + } + + public void testSimpleDocument() throws RemoteException { + + // Create the input + SimpleDocument1 input = (SimpleDocument1) dataFactory.create(SimpleDocument1.class); + input.setValue("123"); + + // Invoke the service + SimpleDocument1 output = interopDoc.SimpleDocument(input); + + // Test the results + assertNotNull(output); + assertEquals("123", output.getValue()); + + } + + public void testComplexDocument() throws RemoteException { + + // Create the input + ComplexDocument input = (ComplexDocument) dataFactory.create(ComplexDocument.class); + input.setAnAttribute("789"); + ChildDocument childDocument = (ChildDocument) dataFactory.create(ChildDocument.class); + SimpleDocument simpleDocument = (SimpleDocument) dataFactory.create(SimpleDocument.class); + ; + SimpleDocument1 simpleDocument1 = (SimpleDocument1) dataFactory.create(SimpleDocument1.class); + ; + simpleDocument.setSimpleDocument(simpleDocument1); + simpleDocument1.setValue("456"); + ArrayOfSimpleDocument arrayOfSimpleDocument = (ArrayOfSimpleDocument) dataFactory.create(ArrayOfSimpleDocument.class); + ; + arrayOfSimpleDocument.getSimpleDocument().add(simpleDocument1); + childDocument.setChildSimpleDoc(arrayOfSimpleDocument); + input.setChild(childDocument); + + // Invoke the service + ComplexDocument output = interopDoc.ComplexDocument(input); + + // Test the results + assertNotNull(output); + assertEquals("789", output.getAnAttribute()); + assertNotNull(output.getChild()); + assertNotNull(output.getChild().getChildSimpleDoc()); + + // FIXME Add more tests of the output document + + } + + protected void setUp() throws Exception { + + setApplicationSCDL(LoopbackInteropDocServiceComponentImpl.class, "META-INF/sca/default.scdl"); + + addExtension("test.extensions", getClass().getClassLoader().getResource("META-INF/tuscany/extensions/test-extensions.scdl")); + /* + addExtension("org.apache.tuscany.idl.wsdl.WSDLDefinitionRegistry", getClass().getClassLoader().getResource( + + "META-INF/tuscany/interface.wsdl.scdl")); + + addExtension("org.apache.tuscany.idl.wsdl.InterfaceWSDLIntrospector", getClass().getClassLoader().getResource( + "META-INF/tuscany/interface.wsdl.scdl")); + + + + addExtension("org.apache.tuscany.binding.axis2.WebServiceBinding", getClass().getClassLoader().getResource( + "META-INF/tuscany/binding.axis2.scdl")); + addExtension("org.apache.tuscany.databinding.sdo", getClass().getClassLoader().getResource("META-INF/tuscany/databinding.sdo.scdl")); + */ + super.setUp(); + + // Get the SDO DataFactory + dataFactory = DataFactory.INSTANCE; + + // Locate the service to test + interopDoc = locateInteropDocService(); + + } + + /** + * Locate the interop service to test + * + * @return + */ + protected DocTestPortType locateInteropDocService() { + String interopLocation = System.getProperty("interopLocation"); + + // Valid service names are: + // RemoteInteropDocService: the live interop Web Service + // LocalHostInteropDocService: the interop Web Service hosted by Tuscany on localhost + // LoopbackInteropDocServiceComponent: a dummy loopback service component + + // To specify the service name run mvn -interopLocation="Remote" + + if (interopLocation == null) + interopLocation = "Remote"; + + CompositeContext compositeContext = CurrentCompositeContext.getContext(); + + return (DocTestPortType) compositeContext.locateService(DocTestPortType.class, interopLocation + "InteropDocService"); + } + +} diff --git a/branches/sca-java-0.99/itest/old/interop-soap-round2-client/pom.xml b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/pom.xml new file mode 100644 index 0000000000..ab4c27ed68 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/pom.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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-webserviceSOAPRound2</artifactId> + <packaging>jar</packaging> + <name>Tuscany Interop Testing - Clients - SOAP Builders Round 2 Interop Test</name> + + <properties> + <ws.type>axis2</ws.type> + </properties> + + + <build> + <plugins> + <plugin> + <groupId>org.apache.tuscany.sdo</groupId> + <artifactId>tuscany-sdo-plugin</artifactId> + <version>1.0-incubating</version> + <executions> + <execution> + <configuration> + <schemaFile>${basedir}/src/main/resources/wsdl/interoptestdoclit.wsdl</schemaFile> + <noNotification>true</noNotification> + <noContainer>true</noContainer> + <noInterfaces>true</noInterfaces> + <noUnsettable>true</noUnsettable> + </configuration> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.tuscany.sca.extensions.axis2.plugins</groupId> + <artifactId>tuscany-plugin-wsdl2java</artifactId> + <version>1.0-incubating</version> + <executions> + <execution> + <configuration> + <wsdlFile>${basedir}/src/main/resources/wsdl/interoptestdoclit.wsdl</wsdlFile> + <javaPackage>org.soapinterop.wsdl.interop.test.doc.lit</javaPackage> + </configuration> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + </build> +</project> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/java/org/apache/tuscany/test/interop/client/InteropTestDocLit.java b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/java/org/apache/tuscany/test/interop/client/InteropTestDocLit.java new file mode 100644 index 0000000000..ca3031c646 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/java/org/apache/tuscany/test/interop/client/InteropTestDocLit.java @@ -0,0 +1,44 @@ +package org.apache.tuscany.test.interop.client; +import org.soapinterop.wsdl.interop.test.doc.lit.WSDLInteropTestDocLitPortType; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + +/** + * + * + */ +public class InteropTestDocLit { + private WSDLInteropTestDocLitPortType interopTestDocLitPortType =null; + /** + * @param args + */ + public static void main(String[] args) { + + + } + WSDLInteropTestDocLitPortType getInteropTestDocLitPortType() { + return interopTestDocLitPortType; + } + void setInteropTestDocLitPortType(WSDLInteropTestDocLitPortType interopTestDocLitPortType) { + this.interopTestDocLitPortType = interopTestDocLitPortType; + } + +} diff --git a/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/README.txt b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/README.txt new file mode 100644 index 0000000000..9b26d1690a --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/README.txt @@ -0,0 +1,35 @@ +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/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/sca/default.scdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/sca/default.scdl new file mode 100644 index 0000000000..0ed260399c --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/sca/default.scdl @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0" + name="InteropClient"> + + <dbsdo:import.sdo location="wsdl/interoptestdoclit.wsdl"/> + <dbsdo:import.sdo factory="org.soapinterop.xsd.XsdFactory"/> + + <reference name="RemoteInteropDocService"> +<!-- + <interface.wsdl interface="http://soapinterop.org/WSDLInteropTestDocLit#wsdl.interface(WSDLInteropTestDocLitPortType)"/> + <binding.ws port="http://soapinterop.org/WSDLInteropTestDocLit#wsdl.endpoint(WSDLInteropTestDocLitService/WSDLInteropTestDocLitPort)"/> +--> + + <interface.java interface="org.soapinterop.wsdl.interop.test.doc.lit.WSDLInteropTestDocLitPortType"/> + <binding.ws endpoint="http://soapinterop.org/WSDLInteropTestDocLit#wsdl.endpoint(WSDLInteropTestDocLitService/WSDLInteropTestDocLitPort)" + location="wsdl/interoptestdoclit.wsdl" /> + </reference> + +</composite>
\ No newline at end of file diff --git a/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/binding.axis2.scdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/binding.axis2.scdl new file mode 100644 index 0000000000..fb208f56ab --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/binding.axis2.scdl @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl new file mode 100644 index 0000000000..21df676937 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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> + + <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> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.sdo.scdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.sdo.scdl new file mode 100644 index 0000000000..61753384b4 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.sdo.scdl @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/interface.wsdl.scdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/interface.wsdl.scdl new file mode 100644 index 0000000000..84538dab8b --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/interface.wsdl.scdl @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl new file mode 100644 index 0000000000..1e8c3b1589 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 name="test.extensions" xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"> + <include name="org.apache.tuscany.interface.wsdl" scdlLocation="includes/interface.wsdl.scdl"/> + <include name="org.apache.tuscany.databinding.axiom" scdlLocation="includes/databinding.axiom.scdl"/> + <include name="org.apache.tuscany.databinding.sdo" scdlLocation="includes/databinding.sdo.scdl"/> + <include name="org.apache.tuscany.binding.axis2" scdlLocation="includes/binding.axis2.scdl"/> +</composite> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/wsdl/interoptestdoclit.wsdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/wsdl/interoptestdoclit.wsdl new file mode 100644 index 0000000000..e08039cedb --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/wsdl/interoptestdoclit.wsdl @@ -0,0 +1,155 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + --> +<definitions name="WSDLInteropTestDocLitService" + targetNamespace="http://soapinterop.org/WSDLInteropTestDocLit" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:tns="http://soapinterop.org/WSDLInteropTestDocLit" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsd1="http://soapinterop.org/xsd" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <types> + <schema targetNamespace="http://soapinterop.org/xsd" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + elementFormDefault="qualified"> + <complexType name="ArrayOfstring_literal"> + <sequence> + <element maxOccurs="unbounded" minOccurs="1" name="string" type="xsd:string"/> + </sequence> + </complexType> + <complexType name="SOAPStruct"> + <all> + <element name="varFloat" type="xsd:float"/> + <element name="varInt" type="xsd:int"/> + <element name="varString" type="xsd:string"/> + </all> + </complexType> + + <element name="echoStringParam" type="xsd:string"/> + + <element name="echoStringReturn" type="xsd:string"/> + <element name="echoStringArrayParam" type="xsd1:ArrayOfstring_literal"/> + + <element name="echoStringArrayReturn" type="xsd1:ArrayOfstring_literal"/> + + <element name="echoStructParam" type="xsd1:SOAPStruct"/> + + <element name="echoStructReturn" type="xsd1:SOAPStruct"/> + </schema> + </types> + <message name="echoString"> + <part element="xsd1:echoStringParam" name="a"/> + </message> + <message name="echoStringResponse"> + <part element="xsd1:echoStringReturn" name="result"/> + </message> + <message name="echoStringArray"> + <part element="xsd1:echoStringArrayParam" name="a"/> + </message> + <message name="echoStringArrayResponse"> + <part element="xsd1:echoStringArrayReturn" name="result"/> + </message> + <message name="echoStruct"> + <part element="xsd1:echoStructParam" name="a"/> + </message> + <message name="echoStructResponse"> + <part element="xsd1:echoStructReturn" name="result"/> + </message> + <message name="echoVoid"/> + <message name="echoVoidResponse"/> + + <portType name="WSDLInteropTestDocLitPortType"> + <operation name="echoString"> + <input message="tns:echoString" name="echoString"/> + <output message="tns:echoStringResponse" name="echoStringResponse"/> + </operation> + <operation name="echoStringArray"> + <input message="tns:echoStringArray" name="echoStringArray"/> + <output message="tns:echoStringArrayResponse" name="echoStringArrayResponse"/> + </operation> + <operation name="echoStruct"> + <input message="tns:echoStruct" name="echoStruct"/> + <output message="tns:echoStructResponse" name="echoStructResponse"/> + </operation> + <operation name="echoVoid"> + <input message="tns:echoVoid" name="echoVoid"/> + <output message="tns:echoVoidResponse" name="echoVoidResponse"/> + </operation> + </portType> + <binding name="WSDLInteropTestDocLitPortBinding" + type="tns:WSDLInteropTestDocLitPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoString"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoString"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStringResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + <operation name="echoStringArray"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoStringArray"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStringArrayResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + <operation name="echoStruct"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoStruct"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStructResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + <operation name="echoVoid"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoVoid"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoVoidResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + </binding> + <service name="WSDLInteropTestDocLitService"> + <port binding="tns:WSDLInteropTestDocLitPortBinding" + name="WSDLInteropTestDocLitPort"> + <soap:address + location="http://mssoapinterop.org/stkv3/wsdl/interopTestDocLit.wsdl"/> + <http-conf:client xmlns:http-conf="http://celtix.objectweb.org/transports/http/configuration" + AllowChunking="false"/> + </port> + </service> +</definitions> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java new file mode 100644 index 0000000000..da70d5b3a6 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java @@ -0,0 +1,133 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.test.interop.client; + +import java.rmi.RemoteException; +import java.util.Arrays; +import java.util.List; + +import org.apache.tuscany.test.SCATestCase; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; +import org.soapinterop.wsdl.interop.test.doc.lit.WSDLInteropTestDocLitPortType; +import org.soapinterop.xsd.ArrayOfstring_literal; +import org.soapinterop.xsd.SOAPStruct; +import org.soapinterop.xsd.XsdPackage; + +import commonj.sdo.helper.DataFactory; + +/** + * This test case is part of the tuscany interop tests. This is a reduced version of the SOAPBuilders InteropTest test, document/literal mode. This + * version has operations such as echoString, echoArrayOfString and echoStruct. + * + * <p> + * The WSDL for the external service used in this test case can be downloaded from http://www.mssoapinterop.org/stkV3/wsdl/InteropTestDocLit.wsdl. + * This is part of the WSDL interop test from Microsoft and more details aobout this test case are found at + * http://www.mssoapinterop.org/stkV3/wsdl/WSDLInterop-0118.htm + */ +public class InteropTestDocLitTestCase extends SCATestCase { + + private WSDLInteropTestDocLitPortType doc = null; + + private DataFactory dataFactory; + + + protected void setUp() throws Exception { + setApplicationSCDL(InteropTestDocLit.class, "META-INF/sca/default.scdl"); + addExtension("test.extensions", InteropTestDocLit.class.getClassLoader().getResource("META-INF/tuscany/extensions/test-extensions.scdl")); + + super.setUp(); + + // Get the SDO DataFactory + dataFactory = DataFactory.INSTANCE; + + // Locate the service to test + doc = locateInteropDocService(); + } + + /** + * Locate the interop service to test + * + * @return + */ + protected WSDLInteropTestDocLitPortType locateInteropDocService() { + + CompositeContext compositeContext = CurrentCompositeContext.getContext(); + return compositeContext.locateService(WSDLInteropTestDocLitPortType.class, "RemoteInteropDocService"); + + } + + /** + * test echo void + * + * @throws RemoteException + */ + public void testEchoVoid() throws RemoteException { + doc.echoVoid(); + assertTrue(true); + } + + /** + * test echo string + * + * @throws RemoteException + */ + public void testEchoString() throws RemoteException { + String input = "a test string"; + String output = doc.echoString(input); + assertEquals(input, output); + } + + /** + * test echo string + * + * @throws RemoteException + */ + public void testEchoStringArray() throws RemoteException { + + ArrayOfstring_literal input = (ArrayOfstring_literal) dataFactory.create(ArrayOfstring_literal.class); + List inStrings = Arrays.asList(new String[] { "petra", "sue" }); + input.set(XsdPackage.ARRAY_OFSTRING_LITERAL__STRING, inStrings); + + ArrayOfstring_literal output = doc.echoStringArray(input); + + List outStrings = output.getString(); + assertNotNull(outStrings); + assertEquals(2, outStrings.size()); + assertEquals("petra", outStrings.get(0)); + assertEquals("sue", outStrings.get(1)); + } + + /** + * test echo struct + * + * @throws RemoteException + */ + public void testEchoStruct() throws RemoteException { + SOAPStruct input = (SOAPStruct) dataFactory.create(SOAPStruct.class); + input.setVarInt(200); + input.setVarFloat(.002f); + input.setVarString("Hello"); + SOAPStruct output = doc.echoStruct(input); + assertEquals(input.getVarInt(), output.getVarInt()); + assertEquals(input.getVarFloat(), output.getVarFloat()); + assertEquals(input.getVarString(), output.getVarString()); + } + +} diff --git a/branches/sca-java-0.99/itest/old/interop-soap-service/pom.xml b/branches/sca-java-0.99/itest/old/interop-soap-service/pom.xml new file mode 100644 index 0000000000..1683319ad8 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-service/pom.xml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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-services</artifactId> + <version>0.1-integration-incubating-SNAPSHOT</version> + </parent> + + <modelVersion>4.0.0</modelVersion> + <artifactId>interop-service-webserviceInteropDoc</artifactId> + <packaging>war</packaging> + <name>Tuscany Interop Testing - Services - InteropDoc</name> + + <dependencies> + + <dependency> + <groupId>org.apache.tuscany.sca.runtime</groupId> + <artifactId>webapp</artifactId> + <version>${sca.version}</version> + <scope>runtime</scope> <!-- runtime is need for webapp integration to include jar --> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca.runtime</groupId> + <artifactId>webapp-host</artifactId> + <version>${sca.version}</version> + <scope>runtime</scope> <!-- runtime is need for webapp integration to include jar --> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca.services.idl</groupId> + <artifactId>tuscany-wsdl</artifactId> + <version>${sca.version}</version> + <scope>runtime</scope> <!-- runtime is need for webapp integration to include jar --> + </dependency> + + <dependency> + <groupId>org.apache.ws.commons.axiom</groupId> + <artifactId>axiom-api</artifactId> + <version>SNAPSHOT</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.apache.ws.commons.axiom</groupId> + <artifactId>axiom-impl</artifactId> + <version>SNAPSHOT</version> + <scope>runtime</scope> + </dependency> + + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.tuscany.sdo</groupId> + <artifactId>tuscany-sdo-plugin</artifactId> + <version>1.0-incubating</version> + <executions> + <execution> + <configuration> + <schemaFile>${basedir}/src/main/resources/wsdl/interopdoc.wsdl</schemaFile> + <noNotification>true</noNotification> + <noContainer>true</noContainer> + <noInterfaces>true</noInterfaces> + <noUnsettable>true</noUnsettable> + </configuration> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.tuscany.sca.extensions.axis2.plugins</groupId> + <artifactId>tuscany-plugin-wsdl2java</artifactId> + <version>${sca.version}</version> + <executions> + <execution> + <configuration> + <wsdlFile>${basedir}/src/main/resources/wsdl/interopdoc.wsdl</wsdlFile> + <javaPackage>org.soapinterop</javaPackage> + </configuration> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + +</project> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-service/src/main/java/org/apache/tuscany/test/interop/server/InteropDocServiceComponentImpl.java b/branches/sca-java-0.99/itest/old/interop-soap-service/src/main/java/org/apache/tuscany/test/interop/server/InteropDocServiceComponentImpl.java new file mode 100644 index 0000000000..c34941f43e --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-service/src/main/java/org/apache/tuscany/test/interop/server/InteropDocServiceComponentImpl.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.test.interop.server; + +import java.rmi.RemoteException; + +import org.osoa.sca.annotations.Service; +import org.soapinterop.ComplexDocument; +import org.soapinterop.DocTestPortType; +import org.soapinterop.SimpleDocument1; +import org.soapinterop.SingleTag; + +/** + * This class implements the HelloWorld service component. + */ +@Service(DocTestPortType.class) +public class InteropDocServiceComponentImpl implements DocTestPortType { + + public ComplexDocument ComplexDocument(ComplexDocument param2) throws RemoteException { + return param2; + } + + public SimpleDocument1 SimpleDocument(SimpleDocument1 param0) throws RemoteException { + return param0; + } + + public SingleTag SingleTag(SingleTag param4) throws RemoteException { + return param4; + } + +} diff --git a/branches/sca-java-0.99/itest/old/interop-soap-service/src/main/resources/wsdl/interopdoc.wsdl b/branches/sca-java-0.99/itest/old/interop-soap-service/src/main/resources/wsdl/interopdoc.wsdl new file mode 100644 index 0000000000..820c26ca34 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-service/src/main/resources/wsdl/interopdoc.wsdl @@ -0,0 +1,180 @@ +<?xml version="1.0"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + --> +<definitions name="InteropTestDoc" targetNamespace="http://soapinterop.org/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://soapinterop.org/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> + + <types> + + <xsd:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/" xmlns:interop="http://soapinterop.org/"> + + <xsd:element name="SingleTag"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="SingleTag" type="interop:SingleTag"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="SingleTag"/> + <xsd:element name="SingleTagResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="SingleTag" type="interop:SingleTag"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="SimpleDocument"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="SimpleDocument" type="interop:SimpleDocument"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:complexType name="SimpleDocument"> + <xsd:simpleContent> + <xsd:extension base="xsd:string"/> + </xsd:simpleContent> + </xsd:complexType> + <xsd:element name="SimpleDocumentResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="SimpleDocument" type="interop:SimpleDocument"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="ComplexDocument"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="ComplexDocument" type="interop:ComplexDocument"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:complexType name="ComplexDocument"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="simpleDoc" type="interop:ArrayOfSimpleDocument"/> + <xsd:element minOccurs="0" maxOccurs="1" name="child" type="interop:ChildDocument"/> + </xsd:sequence> + <xsd:attribute name="AnAttribute" type="xsd:string"/> + </xsd:complexType> + <xsd:complexType name="ArrayOfSimpleDocument"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="unbounded" name="SimpleDocument" nillable="true" type="interop:SimpleDocument"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="ChildDocument"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="childSimpleDoc" type="interop:ArrayOfSimpleDocument"/> + </xsd:sequence> + </xsd:complexType> + <xsd:element name="ComplexDocumentResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="ComplexDocument" type="interop:ComplexDocument"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + </xsd:schema> + + </types> + + <message name="SingleTagSoapIn"> + <part name="parameters" element="tns:SingleTag"/> + </message> + <message name="SingleTagSoapOut"> + <part name="outputDoc" element="tns:SingleTagResponse"/> + </message> + <message name="SimpleDocumentSoapIn"> + <part name="parameters" element="tns:SimpleDocument"/> + </message> + <message name="SimpleDocumentSoapOut"> + <part name="outputDoc" element="tns:SimpleDocumentResponse"/> + </message> + <message name="ComplexDocumentSoapIn"> + <part name="parameters" element="tns:ComplexDocument"/> + </message> + <message name="ComplexDocumentSoapOut"> + <part name="outputDoc" element="tns:ComplexDocumentResponse"/> + </message> + + <portType name="DocTestPortType"> + + <operation name="SingleTag"> + <input message="tns:SingleTagSoapIn"/> + <output message="tns:SingleTagSoapOut"/> + </operation> + <operation name="SimpleDocument"> + <input message="tns:SimpleDocumentSoapIn"/> + <output message="tns:SimpleDocumentSoapOut"/> + </operation> + <operation name="ComplexDocument"> + <input message="tns:ComplexDocumentSoapIn"/> + <output message="tns:ComplexDocumentSoapOut"/> + </operation> + + </portType> + + <binding name="doc_test_binding" type="tns:DocTestPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + + <operation name="SingleTag"> + <soap:operation soapAction="http://soapinterop.org/SingleTag"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + + <operation name="SimpleDocument"> + <soap:operation soapAction="http://soapinterop.org/SimpleDocument"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + + <operation name="ComplexDocument"> + <soap:operation soapAction="http://soapinterop.org/ComplexDocument"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + </binding> + + <service name="interopDocSvc"> + + <port name="interopDocPort" binding="tns:doc_test_binding"> + <soap:address location="http://www.whitemesa.net/interopdoc"/> + </port> + + </service> + +</definitions> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-service/src/main/webapp/META-INF/sca/default.scdl b/branches/sca-java-0.99/itest/old/interop-soap-service/src/main/webapp/META-INF/sca/default.scdl new file mode 100644 index 0000000000..3fbc73616e --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-service/src/main/webapp/META-INF/sca/default.scdl @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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="interop.server"> + + <import.sdo location="wsdl/interopdoc.wsdl"/> + <!-- import.wsdl wsdlLocation="wsdl/interopdoc.wsdl"/ --> + + <service name="InteropDocService"> + <!-- interface.wsdl interface="http://soapinterop.org/#wsdl.interface(DocTestPortType)"/ --> + <interface.java interface="org.soapinterop.DocTestPortType"/> + + <binding.ws endpoint="http://soapinterop.org/#wsdl.endpoint(interopDocSvc/interopDocPort)" + conformanceURIs="http://ws-i.org/profiles/basic/1.1" + location="wsdl/interopdoc.wsdl" + /> + + <reference>InteropDocServiceComponent/DocTestPortType</reference> + </service> + + <component name="InteropDocServiceComponent"> + <implementation.java class="org.apache.tuscany.test.interop.server.InteropDocServiceComponentImpl"/> + </component> + +</composite> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-service/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-0.99/itest/old/interop-soap-service/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..8cf95fb789 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-service/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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>Tuscany Interop Test Server</display-name> + + <context-param> + <param-name>systemScdlPath</param-name> + <param-value>/META-INF/sca/webapp.system.scdl</param-value> + </context-param> + + <context-param> + <param-name>applicationScdlPath</param-name> + <param-value>/META-INF/sca/default.scdl</param-value> + </context-param> + + <listener> + <listener-class>org.apache.tuscany.runtime.webapp.TuscanyContextListener</listener-class> + </listener> + + <servlet> + <servlet-name>TuscanyServlet</servlet-name> + <display-name>Tuscany Servlet</display-name> + <servlet-class>org.apache.tuscany.runtime.webapp.TuscanyServlet</servlet-class> + </servlet> + + <servlet-mapping> + <servlet-name>TuscanyServlet</servlet-name> + <url-pattern>/services/*</url-pattern> + </servlet-mapping> + +</web-app> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-service/t.bat b/branches/sca-java-0.99/itest/old/interop-soap-service/t.bat new file mode 100755 index 0000000000..0f83dedc37 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-service/t.bat @@ -0,0 +1,34 @@ + # Licensed to the Apache Software Foundation (ASF) under one + # or more contributor license agreements. See the NOTICE file + # distributed with this work for additional information + # regarding copyright ownership. The ASF licenses this file + # to you under the Apache License, Version 2.0 (the + # "License"); you may not use this file except in compliance + # with the License. You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, + # software distributed under the License is distributed on an + # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + # KIND, either express or implied. See the License for the + # specific language governing permissions and limitations + # under the License. + + +@echo off +pushd target +jar -xf ..\apache-tomcat-5.5.17.zip +popd +copy target\sample-helloworldws-1.0-SNAPSHOT.war target\apache-tomcat-5.5.17\webapps +rem pushd target\apache-tomcat-5.5.17\webapps +rem md sample-helloworldws-1.0-SNAPSHOT +rem cd sample-helloworldws-1.0-SNAPSHOT +rem jar -xf ..\sample-helloworldws-1.0-SNAPSHOT.war +pushd target\apache-tomcat-5.5.17\shared +rem jar -xf "%USERPROFILE%\.m2\repository\org\apache\tuscany\web\1.0-SNAPSHOT\web-1.0-SNAPSHOT-bin.zip" +jar -xf "%USERPROFILE%\.m2\repository\org\apache\tuscany\web\1.0-SNAPSHOT\web-1.0-SNAPSHOT-bin.zip" +popd +rem hack +mkdir target\apache-tomcat-5.5.17\shared\extension +copy target\apache-tomcat-5.5.17\shared\lib\axis2-1.0-SNAPSHOT.jar target\apache-tomcat-5.5.17\shared\extension diff --git a/branches/sca-java-0.99/itest/old/interop-xsq-client/pom.xml b/branches/sca-java-0.99/itest/old/interop-xsq-client/pom.xml new file mode 100644 index 0000000000..c31cce8fc3 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-xsq-client/pom.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-xsq-client/src/main/resources/META-INF/README.txt b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/main/resources/META-INF/README.txt new file mode 100644 index 0000000000..9b26d1690a --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/main/resources/META-INF/README.txt @@ -0,0 +1,35 @@ +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/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/java/interop/ClientTestCase.java b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/java/interop/ClientTestCase.java new file mode 100644 index 0000000000..f2a7b198a1 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/java/interop/ClientTestCase.java @@ -0,0 +1,77 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES 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/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/sca/test.scdl b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/sca/test.scdl new file mode 100644 index 0000000000..22b3b90623 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/sca/test.scdl @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/binding.axis2.scdl b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/binding.axis2.scdl new file mode 100644 index 0000000000..fb208f56ab --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/binding.axis2.scdl @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.axiom.scdl b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.axiom.scdl new file mode 100644 index 0000000000..e4fe956e61 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.axiom.scdl @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.sdo.scdl b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.sdo.scdl new file mode 100644 index 0000000000..61753384b4 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.sdo.scdl @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/interface.wsdl.scdl b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/interface.wsdl.scdl new file mode 100644 index 0000000000..84538dab8b --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/interface.wsdl.scdl @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/test-extensions.scdl b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/test-extensions.scdl new file mode 100644 index 0000000000..355b663a1b --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/test-extensions.scdl @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/wsdl/sq.wsdl b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/wsdl/sq.wsdl new file mode 100644 index 0000000000..0408a60297 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-xsq-client/src/test/resources/wsdl/sq.wsdl @@ -0,0 +1,142 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/pom.xml b/branches/sca-java-0.99/itest/old/spec-api/pom.xml new file mode 100644 index 0000000000..a082488bbd --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/pom.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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>0.99-incubating-SNAPSHOT</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>0.99-incubating-SNAPSHOT</version>
+ </dependency>
+ + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-java-runtime</artifactId> + <version>0.99-incubating-SNAPSHOT</version> + <scope>runtime</scope> + </dependency> + </dependencies>
+</project>
diff --git a/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/BasicService.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/BasicService.java new file mode 100644 index 0000000000..ba9dd59c46 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/BasicService.java @@ -0,0 +1,26 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MathService.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MathService.java new file mode 100644 index 0000000000..0f46725adf --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MathService.java @@ -0,0 +1,25 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java new file mode 100644 index 0000000000..7fe9fa4909 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java @@ -0,0 +1,28 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java new file mode 100644 index 0000000000..a381fc62dc --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java @@ -0,0 +1,27 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java new file mode 100644 index 0000000000..fbb2161df3 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java @@ -0,0 +1,29 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java new file mode 100644 index 0000000000..98490c4e3d --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java @@ -0,0 +1,29 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java new file mode 100644 index 0000000000..6a4cfc1f79 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java @@ -0,0 +1,23 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java new file mode 100644 index 0000000000..c2d107ef28 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java @@ -0,0 +1,25 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/BasicServiceImpl.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/BasicServiceImpl.java new file mode 100644 index 0000000000..083307234a --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/BasicServiceImpl.java @@ -0,0 +1,49 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MathServiceImpl.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MathServiceImpl.java new file mode 100644 index 0000000000..d3dc1585fc --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MathServiceImpl.java @@ -0,0 +1,31 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java new file mode 100644 index 0000000000..5170c32cd2 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java @@ -0,0 +1,73 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java new file mode 100644 index 0000000000..b81c2c2120 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java @@ -0,0 +1,112 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java new file mode 100644 index 0000000000..11767522d6 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java @@ -0,0 +1,78 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/BasicService.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/BasicService.composite new file mode 100644 index 0000000000..d650c8ab42 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/BasicService.composite @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/CompositeTest.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/CompositeTest.composite new file mode 100644 index 0000000000..7a5f05b552 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/CompositeTest.composite @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/MathService.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/MathService.composite new file mode 100644 index 0000000000..59f8fa6981 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/MathService.composite @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myListService.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myListService.composite new file mode 100644 index 0000000000..1f0cd97fb4 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myListService.composite @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myServiceInComposite.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myServiceInComposite.composite new file mode 100644 index 0000000000..518cb295f9 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myServiceInComposite.composite @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myServiceInRecursive.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myServiceInRecursive.composite new file mode 100644 index 0000000000..f9f7615ec5 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myServiceInRecursive.composite @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/mySimpleService.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/mySimpleService.composite new file mode 100644 index 0000000000..b1ecaced45 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/mySimpleService.composite @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive.composite new file mode 100644 index 0000000000..662d67612d --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive.composite @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive2.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive2.composite new file mode 100644 index 0000000000..e059c5b46f --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive2.composite @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalService.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalService.composite new file mode 100644 index 0000000000..f9076f6811 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalService.composite @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalServiceInComposite.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalServiceInComposite.composite new file mode 100644 index 0000000000..af41baf277 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalServiceInComposite.composite @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite new file mode 100644 index 0000000000..e802b469d0 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalServiceInRecursive.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalServiceInRecursive.composite new file mode 100644 index 0000000000..a69c4cedd4 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalServiceInRecursive.composite @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite new file mode 100644 index 0000000000..26033aad9f --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myservice.composite b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myservice.composite new file mode 100644 index 0000000000..4b5972bcc1 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/main/resources/myservice.composite @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentContextTestCase.java b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentContextTestCase.java new file mode 100644 index 0000000000..3f64202f13 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentContextTestCase.java @@ -0,0 +1,61 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCaseFIXME.java b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCaseFIXME.java new file mode 100644 index 0000000000..6a96326fbf --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCaseFIXME.java @@ -0,0 +1,50 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java new file mode 100644 index 0000000000..b5c6a0d7b5 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java @@ -0,0 +1,64 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java new file mode 100644 index 0000000000..d136530412 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java @@ -0,0 +1,98 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTestCaseFIXME.java b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTestCaseFIXME.java new file mode 100644 index 0000000000..5e54b5dcfa --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTestCaseFIXME.java @@ -0,0 +1,106 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTestCase.java b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTestCase.java new file mode 100644 index 0000000000..c29e9e72b3 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTestCase.java @@ -0,0 +1,60 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTestCase.java b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTestCase.java new file mode 100644 index 0000000000..eb846ddb71 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTestCase.java @@ -0,0 +1,80 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTestCase.java b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTestCase.java new file mode 100644 index 0000000000..60ee8b2011 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTestCase.java @@ -0,0 +1,92 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTestCase.java b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTestCase.java new file mode 100644 index 0000000000..d9c2a73f7e --- /dev/null +++ b/branches/sca-java-0.99/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTestCase.java @@ -0,0 +1,78 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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();
+ }
+}
|