You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sv...@apache.org on 2007/05/21 18:41:05 UTC

svn commit: r540200 [1/2] - in /incubator/tuscany/sandbox/svkrish: calculator-ws-service/ calculator-ws-service/src/ calculator-ws-service/src/main/ calculator-ws-service/src/main/java/ calculator-ws-service/src/main/java/calculator/ calculator-ws-serv...

Author: svkrish
Date: Mon May 21 09:40:54 2007
New Revision: 540200

URL: http://svn.apache.org/viewvc?view=rev&rev=540200
Log:
trying calculator ws and integrated calculator

Added:
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/build.xml
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/pom.xml
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/AddService.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/AddServiceImpl.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorClient.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorServer.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorService.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorServiceImpl.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/DivideService.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/DivideServiceImpl.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/MultiplyService.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/MultiplyServiceImpl.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/SubtractService.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/SubtractServiceImpl.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/resources/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/resources/calculatorws.composite
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/resources/wsdl/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/resources/wsdl/calculator.wsdl
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/test/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/test/java/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/test/java/calculator/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/test/java/calculator/CalculatorServerTestCase.java
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/work/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/work/null/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/work/null/localhost/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/work/null/localhost/_/
    incubator/tuscany/sandbox/svkrish/calculator-ws-service/work/null/localhost/_/SESSIONS.ser   (with props)
    incubator/tuscany/sandbox/svkrish/integrated-calculator/
    incubator/tuscany/sandbox/svkrish/integrated-calculator/README
    incubator/tuscany/sandbox/svkrish/integrated-calculator/build.xml
    incubator/tuscany/sandbox/svkrish/integrated-calculator/calculator.png   (with props)
    incubator/tuscany/sandbox/svkrish/integrated-calculator/calculator.svg
    incubator/tuscany/sandbox/svkrish/integrated-calculator/pom.xml
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/AddService.java
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/AddServiceImpl.java
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorClient.java
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorService.java
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorServiceImpl.java
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/DivideService.java
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/DivideServiceImpl.java
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/MultiplyService.java
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/MultiplyServiceImpl.java
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/SubtractService.java
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/SubtractServiceImpl.java
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/Calculator.composite
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/calculator/
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/calculator/AddServiceImpl.componentType
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/calculator/AddServiceImpl.js
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/calculator/DivideServiceImpl.componentType
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/calculator/DivideServiceImpl.groovy
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/calculator/MultiplyServiceImpl.componentType
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/calculator/MultiplyServiceImpl.py
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/calculator/SubtractServiceImpl.componentType
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/calculator/SubtractServiceImpl.rb
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/wsdl/
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/resources/wsdl/calculator.wsdl
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/test/
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/test/java/
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/test/java/calculator/
    incubator/tuscany/sandbox/svkrish/integrated-calculator/src/test/java/calculator/CalculatorTestCase.java

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/build.xml?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/build.xml (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/build.xml Mon May 21 09:40:54 2007
@@ -0,0 +1,72 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<project name="helloworld-ws-service" default="compile">
+    <property name="test.class" value="helloworld.HelloWorldServer" />
+	<property name="test.jar"   value="sample-helloworld-ws-service.jar" />
+	
+    <target name="init">
+        <mkdir dir="target/classes"/>
+    </target>
+	
+    <target name="compile" depends="init">
+        <javac srcdir="src/main/java"
+               destdir="target/classes"
+               debug="on"
+               source="1.5"
+               target="1.5">
+            <classpath>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </javac> 
+        <copy todir="target/classes">
+            <fileset dir="src/main/resources"/>
+        </copy>
+        <jar destfile="target/${test.jar}" basedir="target/classes">
+            <manifest>
+                <attribute name="Main-Class" value="${test.class}" /> 
+            </manifest>
+        </jar>    	
+    </target>	
+	
+    <target name="run-classes">
+        <java classname="${test.class}"
+              fork="true">
+            <classpath>
+                <pathelement path="target/classes"/>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </java>
+    </target>
+	
+    <target name="run">
+        <java classname="${test.class}"
+              fork="true">
+            <classpath>
+                <pathelement path="target/${test.jar}"/>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </java>    	
+    </target>
+	
+    <target name="clean">
+        <delete quiet="true" includeemptydirs="true">
+            <fileset dir="target"/>
+        </delete>
+    </target>
+</project>

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/pom.xml?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/pom.xml (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/pom.xml Mon May 21 09:40:54 2007
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT 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-samples</artifactId>
+        <version>0.90-incubating-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <artifactId>sample-calculator-ws-service</artifactId>
+    <name>Apache Tuscany Calculator Web Service Sample</name>
+
+    <repositories>
+       <repository>
+          <id>apache.incubator</id>
+          <url>http://people.apache.org/repo/m2-incubating-repository</url>
+       </repository>
+    </repositories>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>0.90-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>0.90-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>0.90-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-http-tomcat</artifactId>
+            <version>0.90-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+    
+    <build>
+       <finalName>${artifactId}</finalName>
+    </build>
+
+</project>

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/AddService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/AddService.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/AddService.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/AddService.java Mon May 21 09:40:54 2007
@@ -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 calculator;
+
+/**
+ * The Add service interface
+ */
+public interface AddService { 
+
+    double add(double n1, double n2);
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/AddServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/AddServiceImpl.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/AddServiceImpl.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/AddServiceImpl.java Mon May 21 09:40:54 2007
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+/**
+ * An implementation of the Add service
+ */
+public class AddServiceImpl implements AddService {
+
+    public double add(double n1, double n2) {
+        return n1 + n2;
+    }
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorClient.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorClient.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorClient.java Mon May 21 09:40:54 2007
@@ -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 calculator;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * This client program shows how to create an SCA runtime, start it,
+ * and locate and invoke a SCA component
+ */
+public class CalculatorClient {
+    public static void main(String[] args) throws Exception {
+
+        SCADomain scaDomain = SCADomain.newInstance("Calculator.composite");
+        
+        CalculatorService calculatorService = 
+            scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent");
+
+        // Calculate
+        System.out.println("3 + 2=" + calculatorService.add(3, 2));
+        System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
+        System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
+        System.out.println("3 / 2=" + calculatorService.divide(3, 2));
+
+        scaDomain.close();
+    }
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorServer.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorServer.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorServer.java Mon May 21 09:40:54 2007
@@ -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 calculator;
+
+import java.io.IOException;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * This server program shows how to create an SCA runtime, and start it which
+ * activates the helloworld Web service endpoint.
+ */
+public class CalculatorServer {
+
+    public static void main(String[] args) {
+
+        SCADomain scaDomain = SCADomain.newInstance("calculatorws.composite");
+
+        try {
+            System.out.println("Calculator server started (press enter to shutdown)");
+            System.in.read();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        scaDomain.close();
+        System.out.println("Calculator server stopped");
+    }
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorService.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorService.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorService.java Mon May 21 09:40:54 2007
@@ -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 calculator;
+
+import org.osoa.sca.annotations.Remotable;
+import org.osoa.sca.annotations.Service;
+
+
+/**
+ * The Calculator service interface.
+ */
+@Remotable
+@Service
+public interface CalculatorService {
+
+    double add(double n1, double n2);
+
+    double subtract(double n1, double n2);
+
+    double multiply(double n1, double n2);
+
+    double divide(double n1, double n2);
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorServiceImpl.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorServiceImpl.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/CalculatorServiceImpl.java Mon May 21 09:40:54 2007
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+
+/**
+ * An implementation of the Calculator service.
+ */ 
+@Service(CalculatorService.class)
+public class CalculatorServiceImpl implements CalculatorService {
+
+    private AddService addService;
+    private SubtractService subtractService;
+    private MultiplyService multiplyService;
+    private DivideService divideService = new DivideServiceImpl();
+
+    @Reference
+    public void setAddService(AddService addService) {
+        this.addService = addService;
+    }
+
+    @Reference
+    public void setSubtractService(SubtractService subtractService) {
+        this.subtractService = subtractService;
+    }
+
+    @Reference
+    public void setDivideService(DivideService divideService) {
+        this.divideService = divideService;
+    }
+
+    @Reference
+    public void setMultiplyService(MultiplyService multiplyService) {
+        this.multiplyService = multiplyService;
+    }
+
+    public double add(double n1, double n2) {
+        return addService.add(n1, n2);
+    }
+
+    public double subtract(double n1, double n2) {
+        return subtractService.subtract(n1, n2);
+    }
+
+    public double multiply(double n1, double n2) {
+        return multiplyService.multiply(n1, n2);
+    }
+
+    public double divide(double n1, double n2) {
+        return divideService.divide(n1, n2);
+    }
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/DivideService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/DivideService.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/DivideService.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/DivideService.java Mon May 21 09:40:54 2007
@@ -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 calculator;
+
+/**
+ * The divide service interface
+ */
+public interface DivideService {
+
+    double divide(double n1, double n2);
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/DivideServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/DivideServiceImpl.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/DivideServiceImpl.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/DivideServiceImpl.java Mon May 21 09:40:54 2007
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+/**
+ * An implementation of the Divide service.
+ */
+public class DivideServiceImpl implements DivideService {
+
+    public double divide(double n1, double n2) {
+        System.out.println("***************************************************");
+        System.out.println("Serviced a DIVIDE request for " +  n1 + " / " + n2);
+        System.out.println("***************************************************");
+        return n1 / n2;
+    }
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/MultiplyService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/MultiplyService.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/MultiplyService.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/MultiplyService.java Mon May 21 09:40:54 2007
@@ -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 calculator;
+
+/**
+ * The interface for the multiply service
+ */
+public interface MultiplyService {
+
+    double multiply(double n1, double n2);
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/MultiplyServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/MultiplyServiceImpl.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/MultiplyServiceImpl.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/MultiplyServiceImpl.java Mon May 21 09:40:54 2007
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+/**
+ * An implementation of the Multiply service.
+ */
+public class MultiplyServiceImpl implements MultiplyService {
+
+    public double multiply(double n1, double n2) {
+        return n1 * n2;
+    }
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/SubtractService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/SubtractService.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/SubtractService.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/SubtractService.java Mon May 21 09:40:54 2007
@@ -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 calculator;
+
+/**
+ * The interface for the multiply service
+ */
+public interface SubtractService {
+
+    double subtract(double n1, double n2);
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/SubtractServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/SubtractServiceImpl.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/SubtractServiceImpl.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/java/calculator/SubtractServiceImpl.java Mon May 21 09:40:54 2007
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+/**
+ * An implementation of the subtract service.
+ */
+public class SubtractServiceImpl implements SubtractService {
+
+    public double subtract(double n1, double n2) {
+        return n1 - n2;
+    }
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/resources/calculatorws.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/resources/calculatorws.composite?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/resources/calculatorws.composite (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/resources/calculatorws.composite Mon May 21 09:40:54 2007
@@ -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://calculator"
+	xmlns:cl="http://calculator"
+    name="calculatorws">
+
+    <component name="CalculatorServiceComponent">
+	    <service name="CalculatorService">
+	        <interface.wsdl interface="http://calculator#wsdl.interface(Calculator)" />
+	        <binding.ws />
+	    </service>
+        <implementation.java class="calculator.CalculatorServiceImpl" />
+    </component>
+
+</composite>

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/resources/wsdl/calculator.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/resources/wsdl/calculator.wsdl?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/resources/wsdl/calculator.wsdl (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/main/resources/wsdl/calculator.wsdl Mon May 21 09:40:54 2007
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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://calculator" xmlns:tns="http://calculator" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	name="calculator">
+
+    <wsdl:types>
+        <schema elementFormDefault="qualified" targetNamespace="http://calculator" xmlns="http://www.w3.org/2001/XMLSchema">
+			<!-- element name="value" type="double"/>
+            <element name="divide">
+                <complexType>
+                    <sequence>
+                        <element name="first" type="xsd:double"/>
+                        <element name="second" type="xsd:double"/>
+                    </sequence>
+                </complexType>
+            </element-->
+            
+            <element name="divide">
+                <complexType>
+                    <sequence>
+                        <element name="first" type="xsd:double"/>
+                        <element name="second" type="xsd:double"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="value">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="xsd:double"/>
+                    </sequence>
+                </complexType>
+            </element>
+            
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="request">
+        <wsdl:part element="tns:divide" name="parameters"/>
+    </wsdl:message>
+    <wsdl:message name="response">
+        <wsdl:part element="tns:value" name="parameters"/>
+    </wsdl:message>
+
+    <wsdl:portType name="Calculator">
+        <wsdl:operation name="divide">
+            <wsdl:input message="tns:request" name="request"/>
+            <wsdl:output message="tns:response" name="response"/>
+        </wsdl:operation>
+    </wsdl:portType>
+    
+    <wsdl:binding name="CalculatorSoapBinding" type="tns:Calculator">
+        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="divide">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="request">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="response">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    
+    <wsdl:service name="CalculatorService">
+        <wsdl:port binding="tns:CalculatorSoapBinding" name="CalculatorSoapPort">
+            <wsdlsoap:address location="http://localhost:8080/CalculatorServiceComponent"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/test/java/calculator/CalculatorServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/test/java/calculator/CalculatorServerTestCase.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/test/java/calculator/CalculatorServerTestCase.java (added)
+++ incubator/tuscany/sandbox/svkrish/calculator-ws-service/src/test/java/calculator/CalculatorServerTestCase.java Mon May 21 09:40:54 2007
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+import java.io.IOException;
+import java.net.Socket;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests that the helloworld server is available
+ */
+public class CalculatorServerTestCase {
+	
+    private SCADomain scaDomain;
+
+        @Before
+	public void startServer() throws Exception {
+            try {
+                scaDomain = SCADomain.newInstance("calculatorws.composite");
+            } catch ( Exception e )
+            { e.printStackTrace();}
+	}
+	
+	@Test
+	public void testPing() throws IOException {
+		new Socket("127.0.0.1", 8080);
+	}
+	
+	@After
+	public void stopServer() throws Exception {
+            scaDomain.close();
+	}
+
+}

Added: incubator/tuscany/sandbox/svkrish/calculator-ws-service/work/null/localhost/_/SESSIONS.ser
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/calculator-ws-service/work/null/localhost/_/SESSIONS.ser?view=auto&rev=540200
==============================================================================
Binary file - no diff available.

Propchange: incubator/tuscany/sandbox/svkrish/calculator-ws-service/work/null/localhost/_/SESSIONS.ser
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/tuscany/sandbox/svkrish/integrated-calculator/README
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/integrated-calculator/README?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/integrated-calculator/README (added)
+++ incubator/tuscany/sandbox/svkrish/integrated-calculator/README Mon May 21 09:40:54 2007
@@ -0,0 +1,88 @@
+Calculator Sample
+=================
+This sample implements a simple calculator using SCA components. 
+
+The README in the samples directory (the directory above this) provides 
+general instructions about building and running samples. Take a look there 
+first. 
+
+If you just want to run it to see what happens open a command prompt, navigate
+to this sample directory and do:
+
+ant run
+
+OR if you don't have ant, on Windows do
+
+java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient
+
+and on *nix do
+
+java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient
+
+Sample Overview
+---------------
+The sample provides a single calculator service with a default SCA (java) 
+binding. The CalculatorClient exercises this interface by calling add, 
+subtract, multiply and divide operations. This results in messages passing to 
+the appropriate components in the composite across the local wires.
+
+calculator/
+  src/
+    main/
+      java/
+        calculator/
+          CalculatorService.java  - the first component, calls +-/* as 
+                                    appropriate
+          AddService.java         - adds two numbers
+          SubtractService.java    - subtracts one number from another
+          MultipleService.java    - multiplies two numbers
+          DivideService.java      - divides one number by another
+          CalculatorClient.java   - starts the SCA Runtime and 
+                                    deploys the Calculator.composite. 
+                                    It then calls the deployed Calculator 
+                                    Components services
+      resources/
+        Calculator.composite      - the SCA assembly for this sample
+  calculator.png                  - a pictorial representation of the sample 
+                                    .composite file
+  build.xml                       - the Ant build file
+  pom.xml                         - the Maven build file        
+
+Building And Running The Sample Using Ant
+-----------------------------------------
+With the binary distribution the sample can be built and run using Ant as 
+follows
+
+cd calculator
+ant compile
+ant run
+
+You should see the following output from the run target.
+
+run:
+     [java] 3 + 2=5.0
+     [java] 3 - 2=1.0
+     [java] 3 * 2=6.0
+     [java] 3 / 2=1.5
+
+Building And Running The Sample Using Maven 
+-------------------------------------------
+With either the binary or source distributions the sample can be built and run 
+using Maven as follows. 
+
+cd calculator
+mvn
+
+You should see the following output from the test phase.
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running calculator.CalculatorTestCase
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+This shows that the Junit test cases have run successfully. 

Added: incubator/tuscany/sandbox/svkrish/integrated-calculator/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/integrated-calculator/build.xml?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/integrated-calculator/build.xml (added)
+++ incubator/tuscany/sandbox/svkrish/integrated-calculator/build.xml Mon May 21 09:40:54 2007
@@ -0,0 +1,72 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<project name="calculator" default="compile">
+    <property name="test.class" value="calculator.CalculatorClient" />
+	<property name="test.jar"   value="sample-calculator.jar" />
+	
+    <target name="init">
+        <mkdir dir="target/classes"/>
+    </target>
+	
+    <target name="compile" depends="init">
+        <javac srcdir="src/main/java"
+               destdir="target/classes"
+               debug="on"
+               source="1.5"
+               target="1.5">
+            <classpath>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </javac> 
+        <copy todir="target/classes">
+            <fileset dir="src/main/resources"/>
+        </copy>
+        <jar destfile="target/${test.jar}" basedir="target/classes">
+            <manifest>
+                <attribute name="Main-Class" value="${test.class}" /> 
+            </manifest>
+        </jar>    	
+    </target>	
+	
+    <target name="run-classes">
+        <java classname="${test.class}"
+              fork="true">
+            <classpath>
+                <pathelement path="target/classes"/>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </java>
+    </target>
+	
+    <target name="run">
+        <java classname="${test.class}"
+              fork="true">
+            <classpath>
+                <pathelement path="target/${test.jar}"/>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </java>    	
+    </target>	
+	
+    <target name="clean">
+        <delete quiet="true" includeemptydirs="true">
+            <fileset dir="target"/>
+        </delete>
+    </target>
+</project>

Added: incubator/tuscany/sandbox/svkrish/integrated-calculator/calculator.png
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/integrated-calculator/calculator.png?view=auto&rev=540200
==============================================================================
Binary file - no diff available.

Propchange: incubator/tuscany/sandbox/svkrish/integrated-calculator/calculator.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/tuscany/sandbox/svkrish/integrated-calculator/calculator.svg
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/integrated-calculator/calculator.svg?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/integrated-calculator/calculator.svg (added)
+++ incubator/tuscany/sandbox/svkrish/integrated-calculator/calculator.svg Mon May 21 09:40:54 2007
@@ -0,0 +1,329 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="1052.3622"
+   height="744.09448"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.44"
+   sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\calculator"
+   sodipodi:docname="calculator.svg"
+   version="1.0"
+   inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\calculator\calculator.png"
+   inkscape:export-xdpi="52.84"
+   inkscape:export-ydpi="52.84">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.4"
+     inkscape:cx="471.80491"
+     inkscape:cy="378.84265"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     inkscape:window-width="1054"
+     inkscape:window-height="721"
+     inkscape:window-x="59"
+     inkscape:window-y="79" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <g
+       id="g2997"
+       transform="matrix(1,0,0,1.144214,0,-27.53557)">
+      <rect
+         rx="15.307091"
+         ry="12.692303"
+         y="192.00233"
+         x="258.31146"
+         height="299.99988"
+         width="495.71429"
+         id="rect2067"
+         style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.86971939;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+      <flowRoot
+         id="flowRoot2954"
+         xml:space="preserve"><flowRegion
+           id="flowRegion2956"><rect
+             y="212.66591"
+             x="281.42856"
+             height="61.42857"
+             width="170"
+             id="rect2958" /></flowRegion><flowPara
+           id="flowPara2960">Calculator</flowPara></flowRoot>    </g>
+    <rect
+       style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.9999994;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect2988"
+       width="115.66247"
+       height="191.57716"
+       x="339.91632"
+       y="262.1673"
+       rx="6.9961648"
+       ry="15.892869" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot2966"
+       transform="translate(79.61125,62.65764)"><flowRegion
+         id="flowRegion2968"><rect
+           id="rect2970"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591" /></flowRegion><flowPara
+         id="flowPara2972">Calculator</flowPara><flowPara
+         id="flowPara1895">Service</flowPara><flowPara
+         id="flowPara1897">Component</flowPara></flowRoot>    <path
+       style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 322.76581,342.58603 L 356.10085,342.58603 L 362.16176,355.71801 L 355.0907,367.83985 L 322.76581,367.83985 L 330.34196,355.71801 L 322.76581,342.58603 z "
+       id="path3017" />
+    <path
+       style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 431.01809,321.46204 L 471.00147,321.46204 L 478.27117,334.59402 L 469.78986,346.71586 L 431.01809,346.71586 L 440.10523,334.59402 L 431.01809,321.46204 z "
+       id="path3019" />
+    <path
+       style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000024px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 223.15923,328.61046 L 282.4833,328.61046 L 293.26948,355.48529 L 280.68561,380.29286 L 223.15923,380.29286 L 236.64198,355.48529 L 223.15923,328.61046 z "
+       id="path1883" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1885"
+       transform="translate(-46.16225,128.7269)"
+       style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:11;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%"><flowRegion
+         id="flowRegion1887"><rect
+           id="rect1889"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591"
+           style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:11;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%" /></flowRegion><flowPara
+         id="flowPara1891">Calculator</flowPara><flowPara
+         id="flowPara1893">Service</flowPara></flowRoot>    <rect
+       style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect1899"
+       width="115.66247"
+       height="70.148659"
+       x="594.75488"
+       y="209.73451"
+       rx="6.9961648"
+       ry="5.8193965" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1901"
+       transform="translate(334.4498,10.22481)"><flowRegion
+         id="flowRegion1903"><rect
+           id="rect1905"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591" /></flowRegion><flowPara
+         id="flowPara1907">Add</flowPara><flowPara
+         id="flowPara1909">Service</flowPara><flowPara
+         id="flowPara1911">Component</flowPara></flowRoot>    <path
+       style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 573.31867,232.29606 L 606.65371,232.29606 L 612.71462,245.42804 L 605.64356,257.54988 L 573.31867,257.54988 L 580.89482,245.42804 L 573.31867,232.29606 z "
+       id="path1913" />
+    <rect
+       style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect1917"
+       width="115.66247"
+       height="70.148659"
+       x="594.06543"
+       y="292.59158"
+       rx="6.9961648"
+       ry="5.8193965" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1919"
+       transform="translate(333.7604,93.08188)"><flowRegion
+         id="flowRegion1921"><rect
+           id="rect1923"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591" /></flowRegion><flowPara
+         id="flowPara1925">Subtract</flowPara><flowPara
+         id="flowPara1927">Service</flowPara><flowPara
+         id="flowPara1929">Component</flowPara></flowRoot>    <path
+       style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 572.62924,315.15313 L 605.96428,315.15313 L 612.02519,328.28511 L 604.95413,340.40695 L 572.62924,340.40695 L 580.20539,328.28511 L 572.62924,315.15313 z "
+       id="path1931" />
+    <rect
+       style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect1933"
+       width="115.66247"
+       height="70.148659"
+       x="594.77979"
+       y="371.87729"
+       rx="6.9961648"
+       ry="5.8193965" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1935"
+       transform="translate(334.4747,172.3676)"><flowRegion
+         id="flowRegion1937"><rect
+           id="rect1939"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591" /></flowRegion><flowPara
+         id="flowPara1941">Multiply</flowPara><flowPara
+         id="flowPara1943">Service</flowPara><flowPara
+         id="flowPara1945">Component</flowPara></flowRoot>    <path
+       style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 573.34352,394.43884 L 606.67856,394.43884 L 612.73947,407.57082 L 605.66841,419.69266 L 573.34352,419.69266 L 580.91967,407.57082 L 573.34352,394.43884 z "
+       id="path1947" />
+    <rect
+       style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect1949"
+       width="115.66247"
+       height="70.148659"
+       x="596.20831"
+       y="452.59158"
+       rx="6.9961648"
+       ry="5.8193965" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1951"
+       transform="translate(335.9032,253.0819)"><flowRegion
+         id="flowRegion1953"><rect
+           id="rect1955"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591" /></flowRegion><flowPara
+         id="flowPara1957">Divide</flowPara><flowPara
+         id="flowPara1959">Service</flowPara><flowPara
+         id="flowPara1961">Component</flowPara></flowRoot>    <path
+       style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 574.77209,475.15313 L 608.10713,475.15313 L 614.16804,488.28511 L 607.09698,500.40695 L 574.77209,500.40695 L 582.34824,488.28511 L 574.77209,475.15313 z "
+       id="path1963" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1965"
+       transform="translate(161.0221,114.967)"
+       style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
+         id="flowRegion1967"><rect
+           id="rect1969"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591"
+           style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
+         id="flowPara1973">add</flowPara><flowPara
+         id="flowPara1977">Service</flowPara></flowRoot>    <path
+       style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 430.65917,357.18186 L 470.64255,357.18186 L 477.91225,370.31384 L 469.43094,382.43568 L 430.65917,382.43568 L 439.74631,370.31384 L 430.65917,357.18186 z "
+       id="path1979" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1981"
+       transform="translate(160.6632,150.6868)"
+       style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
+         id="flowRegion1983"><rect
+           id="rect1985"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591"
+           style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
+         id="flowPara1987">subtract</flowPara><flowPara
+         id="flowPara1989">Service</flowPara></flowRoot>    <path
+       style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 431.37346,390.75329 L 471.35684,390.75329 L 478.62654,403.88527 L 470.14523,416.00711 L 431.37346,416.00711 L 440.4606,403.88527 L 431.37346,390.75329 z "
+       id="path1991" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1993"
+       transform="translate(161.3775,184.2583)"
+       style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
+         id="flowRegion1995"><rect
+           id="rect1997"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591"
+           style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
+         id="flowPara1999">multiply</flowPara><flowPara
+         id="flowPara2001">Service</flowPara></flowRoot>    <path
+       style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 429.94489,422.18186 L 469.92827,422.18186 L 477.19797,435.31384 L 468.71666,447.43568 L 429.94489,447.43568 L 439.03203,435.31384 L 429.94489,422.18186 z "
+       id="path2003" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot2005"
+       transform="translate(159.9489,215.6868)"
+       style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
+         id="flowRegion2007"><rect
+           id="rect2009"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591"
+           style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
+         id="flowPara2011">divide</flowPara><flowPara
+         id="flowPara2013">Service</flowPara></flowRoot>    <path
+       style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 477.85714,335.52305 L 511.42857,335.52305 L 510.71429,245.52305 L 579.28571,245.52305"
+       id="path2015" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 477.85714,369.80877 L 528.57143,369.80877 L 528.57143,329.80877 L 580,329.80877"
+       id="path2017" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 478.57143,402.66591 L 528.57143,401.95163 L 528.57143,408.3802 L 580,407.66591"
+       id="path2019" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 475.71429,435.52305 L 509.28571,435.52305 L 510,486.95163 L 582.14286,486.23734"
+       id="path2021" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 292.85714,355.52305 L 330,354.80877"
+       id="path2023" />
+  </g>
+</svg>

Added: incubator/tuscany/sandbox/svkrish/integrated-calculator/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/integrated-calculator/pom.xml?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/integrated-calculator/pom.xml (added)
+++ incubator/tuscany/sandbox/svkrish/integrated-calculator/pom.xml Mon May 21 09:40:54 2007
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.    
+-->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-sca</artifactId>
+        <version>0.90-incubating-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <artifactId>sample-integrated-calculator</artifactId>
+    <name>Apache Tuscany Integrated Calculator Sample</name>
+
+    <repositories>
+       <repository>
+          <id>apache.incubator</id>
+          <url>http://people.apache.org/repo/m2-incubating-repository</url>
+       </repository>
+    </repositories>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>0.90-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>0.90-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-script</artifactId>
+            <version>0.90-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-rmi</artifactId>
+            <version>0.90-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>0.90-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>sample-helloworld-ws-service</artifactId>
+            <version>0.90-incubating-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+       <finalName>${artifactId}</finalName>
+    </build>
+</project>

Added: incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/AddService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/AddService.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/AddService.java (added)
+++ incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/AddService.java Mon May 21 09:40:54 2007
@@ -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 calculator;
+
+/**
+ * The Add service interface
+ */
+public interface AddService {
+
+    double add(double n1, double n2);
+
+}

Added: incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/AddServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/AddServiceImpl.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/AddServiceImpl.java (added)
+++ incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/AddServiceImpl.java Mon May 21 09:40:54 2007
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+/**
+ * An implementation of the Add service
+ */
+public class AddServiceImpl implements AddService {
+
+    public double add(double n1, double n2) {
+        return n1 + n2;
+    }
+
+}

Added: incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorClient.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorClient.java (added)
+++ incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorClient.java Mon May 21 09:40:54 2007
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package calculator;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * This client program shows how to create an SCA runtime, start it,
+ * and locate and invoke a SCA component
+ */
+public class CalculatorClient {
+    public static void main(String[] args) throws Exception {
+
+        SCADomain scaDomain = SCADomain.newInstance("Calculator.composite");
+        
+        CalculatorService calculatorService = 
+            scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent");
+
+        // Calculate
+        System.out.println("**********************************************************");
+        System.out.println("Integrated Calculator Demo.........");
+        System.out.println("**********************************************************");
+        System.out.println("Invoking the 'ADD' service....");
+        System.out.println("3 + 2 = " + calculatorService.add(3, 2));
+        System.out.println("\nInvoking the 'SUBTRACT' service....");
+        System.out.println("3 - 2 = " + calculatorService.subtract(3, 2));
+        System.out.println("\nInvoking the 'MULTIPLY' service....");
+        System.out.println("3 * 2 = " + calculatorService.multiply(3, 2));
+        System.out.println("\nInvoking the 'DIVIDE' service....");
+        System.out.println("3 / 2 = " + calculatorService.divide(3, 2));
+        System.out.println("\n**********************************************************");
+        scaDomain.close();
+    }
+
+}

Added: incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorService.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorService.java (added)
+++ incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorService.java Mon May 21 09:40:54 2007
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+
+/**
+ * The Calculator service interface.
+ */
+public interface CalculatorService {
+
+    double add(double n1, double n2);
+
+    double subtract(double n1, double n2);
+
+    double multiply(double n1, double n2);
+
+    double divide(double n1, double n2);
+
+}

Added: incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorServiceImpl.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorServiceImpl.java (added)
+++ incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/CalculatorServiceImpl.java Mon May 21 09:40:54 2007
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+import org.osoa.sca.annotations.Reference;
+
+
+/**
+ * An implementation of the Calculator service.
+ */
+public class CalculatorServiceImpl implements CalculatorService {
+
+    private AddService addService;
+    private SubtractService subtractService;
+    private MultiplyService multiplyService;
+    private DivideService divideService;
+
+    @Reference
+    public void setAddService(AddService addService) {
+        this.addService = addService;
+    }
+
+    @Reference
+    public void setSubtractService(SubtractService subtractService) {
+        this.subtractService = subtractService;
+    }
+
+    @Reference
+    public void setDivideService(DivideService divideService) {
+        this.divideService = divideService;
+    }
+
+    @Reference
+    public void setMultiplyService(MultiplyService multiplyService) {
+        this.multiplyService = multiplyService;
+    }
+
+    public double add(double n1, double n2) {
+        return addService.add(n1, n2);
+    }
+
+    public double subtract(double n1, double n2) {
+        return subtractService.subtract(n1, n2);
+    }
+
+    public double multiply(double n1, double n2) {
+        return multiplyService.multiply(n1, n2);
+    }
+
+    public double divide(double n1, double n2) {
+        return divideService.divide(n1, n2);
+    }
+
+}

Added: incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/DivideService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/DivideService.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/DivideService.java (added)
+++ incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/DivideService.java Mon May 21 09:40:54 2007
@@ -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 calculator;
+
+/**
+ * The divide service interface
+ */
+public interface DivideService {
+
+    double divide(double n1, double n2);
+
+}

Added: incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/DivideServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/DivideServiceImpl.java?view=auto&rev=540200
==============================================================================
--- incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/DivideServiceImpl.java (added)
+++ incubator/tuscany/sandbox/svkrish/integrated-calculator/src/main/java/calculator/DivideServiceImpl.java Mon May 21 09:40:54 2007
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+/**
+ * An implementation of the Divide service.
+ */
+public class DivideServiceImpl implements DivideService {
+
+    public double divide(double n1, double n2) {
+        return n1 / n2;
+    }
+
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org