summaryrefslogtreecommitdiffstats
path: root/cpp/sca/samples/PythonCalculator
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-16 06:57:41 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-16 06:57:41 +0000
commitbd0fdbf902f8ca8e7e352582efe938e1d6743dd1 (patch)
tree4ffc871e04f7e22cad2a6ed1d921718e296dc5fe /cpp/sca/samples/PythonCalculator
parent2cd577564c1e4a37b25f4064b84af15d112b0654 (diff)
Cleaning up SVN structure, moving sca trunk to sca-cpp/trunk.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@880633 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/sca/samples/PythonCalculator')
-rw-r--r--cpp/sca/samples/PythonCalculator/Makefile.am21
-rw-r--r--cpp/sca/samples/PythonCalculator/README20
-rw-r--r--cpp/sca/samples/PythonCalculator/README.html191
-rw-r--r--cpp/sca/samples/PythonCalculator/sample.calculator.app.composite28
-rw-r--r--cpp/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am23
-rw-r--r--cpp/sca/samples/PythonCalculator/sample.calculator.client/calculator_client.py50
-rw-r--r--cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat45
-rwxr-xr-xcpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh48
-rw-r--r--cpp/sca/samples/PythonCalculator/sample.calculator/Calculator.wsdl161
-rw-r--r--cpp/sca/samples/PythonCalculator/sample.calculator/CalculatorImpl.py56
-rw-r--r--cpp/sca/samples/PythonCalculator/sample.calculator/DivideImpl.py65
-rw-r--r--cpp/sca/samples/PythonCalculator/sample.calculator/Makefile.am23
-rw-r--r--cpp/sca/samples/PythonCalculator/sample.calculator/sample.calculator.composite34
13 files changed, 0 insertions, 765 deletions
diff --git a/cpp/sca/samples/PythonCalculator/Makefile.am b/cpp/sca/samples/PythonCalculator/Makefile.am
deleted file mode 100644
index 21952e3df4..0000000000
--- a/cpp/sca/samples/PythonCalculator/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-deploydir=$(prefix)/PythonCalculator/deploy
-SUBDIRS = sample.calculator sample.calculator.client
-EXTRA_DIST = *.composite README.html
-deploy_DATA = *.composite
diff --git a/cpp/sca/samples/PythonCalculator/README b/cpp/sca/samples/PythonCalculator/README
deleted file mode 100644
index 670f561dc1..0000000000
--- a/cpp/sca/samples/PythonCalculator/README
+++ /dev/null
@@ -1,20 +0,0 @@
-Tuscany SCA for C++ Samples - Calculator Sample
-===============================================
-
-This is a very simple sample to show how an SCA composite can wire together
-two components to implement a Calculator service and expose that service as
-a Web Service.
-
-There are two sub projects in this workspace:
- - sample.calculator
- This contains the source code and SCDL artifacts for the SCA Calculator.
- composite implementing the sample Calculator.
-
- - sample.calculator.client
- A sample client which does a local call to the Calculator service.
-
-Additionally, there is the sample.calculator.app.composite file. This
-describes the configuration of the SCA Calculator composite deployed to the
-SCA runtime.
-
-See the README.html file for instructions to build and run this sample
diff --git a/cpp/sca/samples/PythonCalculator/README.html b/cpp/sca/samples/PythonCalculator/README.html
deleted file mode 100644
index 3b9f72864e..0000000000
--- a/cpp/sca/samples/PythonCalculator/README.html
+++ /dev/null
@@ -1,191 +0,0 @@
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<HTML>
-<HEAD>
- <META CONTENT="text/html; charset=iso-8859-1" HTTP-EQUIV="Content-Type">
- <META CONTENT="text/css" HTTP-EQUIV="Content-Style-Type">
- <STYLE MEDIA="all" TYPE="text/css">
-@import url("../../doc/css/maven-base.css");
-@import url("../../doc/css/maven-theme.css");
- </STYLE>
-
- <LINK HREF="../doc/css/maven-theme.css" MEDIA="print" REL="stylesheet"
- TYPE="text/css">
- <TITLE>Tuscany SCA Native Samples - Python Calculator Sample</TITLE>
-</HEAD>
-
-<BODY>
-<DIV ID="bodyColumn">
- <DIV ID="contentBox">
- <DIV CLASS="section">
- <H1>Tuscany SCA Native Samples - Python Calculator Sample</H1>
-
- <P>This is a very simple sample to show how an SCA composite can wire
- together two Python components to implement a Calculator service and invoke
- the service via a local client.
- </P>
- <P>See the <A HREF="../../doc/PythonExtension.html">Python extension</A>
- documentation for information about building the Tuscany Python extension
- and using Python in SCA composites.
- </P>
- <P>There are two sub projects in this workspace:</P>
- <UL>
- <LI>sample.calculator<BR/>
- This contains the Python scripts and SCDL artifacts for the SCA Calculator
- composite implementing the sample Calculator.
- </LI>
- <LI>sample.calculator.client<BR/>
- A sample client which does a local call to the Calculator service.
- </LI>
- </UL>
- <P>Additionally, there is the sample.calculator.app.composite file. This
- describes the configuration of the SCA Calculator composite deployed to the SCA
- runtime.
- </P>
-
- </DIV>
-
- <DIV CLASS="section">
- <H2>Contents</H2>
- <OL>
- <LI><A HREF="#linuxbld">Building the Python samples on Linux and Mac OS X</A></LI>
- <LI><A HREF="#linuxrun">Running the Python Calculator sample on Linux and Mac OS X</A></LI>
- <LI><A HREF="#winbld">Building the Python Calculator sample on Windows</A></LI>
- <LI><A HREF="#winrun">Running the Python Calculator sample on Windows</A></LI>
- <LI><A HREF="#help">Getting help</A></LI>
- </OL>
- </DIV>
-
-
- <DIV CLASS="section">
- <A NAME="linuxbld"><H2>Building the Python samples on Linux and Mac OS X</H2></A>
- <P>If using the binary distribution the samples are built and installed in
- &lt;tuscany_sca_install_dir&gt;/samples - go directly to <A HREF="#linuxrun">Running the samples on Linux and Mac OS X</A>.</P>
- <OL>
- <LI>The following environment variables are required:
- <UL>
- <LI>TUSCANY_SCACPP=&lt;path to installed Tuscany SCA&gt;</LI>
- <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;</LI>
- </UL></LI>
- </LI>
- <LI>As the Python Calculator sample is based on Python scripts, a specific compilation step is not necessary -
- only deployment is required. Deploy the Python samples only with the following command sequence:
- <UL>
- <LI>cd &lt;tuscany_sca_install_dir&gt;/samples</LI>
- <LI>./configure --enable-python --enable-cpp=no --prefix=$TUSCANY_SCACPP/samples</LI>
- <LI>make install</LI>
- </UL>
- NOTE: If you don't provide the --prefix configure option, it will by default install into
- /usr/local/tuscany/sca/samples/PythonCalculator</LI>
- </OL>
- </DIV>
-
- <DIV CLASS="section">
- <A NAME="linuxrun"><H2>Running the Python Calculator sample on Linux and Mac OS X</H2></A>
- <OL>
- <LI>The Python Calculator sample requires the following extension:
- <UL>
- <LI><A HREF="../../doc/PythonExtension.html">Python Extension</A></LI>
- </UL>
- Please follow the documentation to ensure you have this extension built and installed
- on your system
- </LI>
- <LI>The following environment variables are required:
- <UL>
- <LI>TUSCANY_SCACPP=&lt;path to installed Tuscany SCA&gt;</LI>
- <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;</LI>
- </UL>
- </LI>
- <LI>Run the sample with the following commands:
- <UL>
- <LI>cd &lt;tuscany_sca_install_dir&gt;/samples/PythonCalculator/deploy/sample.calculator.client</LI>
- <LI>./runclient.sh</LI>
- </UL>
- </LI>
- </OL>
- </DIV>
-
- <DIV CLASS="section">
- <A NAME="winbld"><H2>Building the Python Calculator sample on Windows</H2></A>
- <P>If using the binary distribution the samples are built and installed in
- &lt;tuscany_sca_install_dir&gt;\samples - go directly to <A HREF="#winrun">Running the samples on Windows</A>.</P>
- <OL>
- <LI>The following environment variables are required:
- <UL>
- <LI>TUSCANY_SCACPP=&lt;path to installed Tuscany SCA&gt;</LI>
- <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;</LI>
- </UL></LI>
- </LI>
- <LI>As this sample is based on Python scripts, a specific compilation step is not necessary -
- only deployment is required. Deploy the sample with the following commands:
- <UL>
- <LI>cd &lt;tuscany_sca_install_dir&gt;\samples\PythonCalculator</LI>
- <LI>deploy.bat</LI>
- </UL>
- </LI>
- </OL>
- </DIV>
-
- <DIV CLASS="section">
- <A NAME="winrun"><H2>Running the Python Calculator sample on Windows</H2></A>
- <OL>
- <LI>The Python Calculator sample requires the following extension:
- <UL>
- <LI><A HREF="../../doc/PythonExtension.html">Python Extension</A></LI>
- </UL>
- Please follow the documentation to ensure you have this extension built and installed
- on your system
- </LI>
- <LI>The following environment variables are required:
- <UL>
- <LI>TUSCANY_SCACPP=&lt;path to installed Tuscany SCA&gt;</LI>
- <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;</LI>
- </UL>
- </LI>
- <LI>Run the sample with the following commands:
- <UL>
- <LI>cd &lt;tuscany_sca_install_dir&gt;\samples\PythonCalculator\deploy\sample.calculator.client</LI>
- <LI>runclient.bat</LI>
- </UL>
- </LI>
- </OL>
- </DIV>
-
- <DIV CLASS="section">
- <A NAME="help"><H2>Getting Help</H2></A>
-
- <P>The first place to look is at the Tuscany SCA FAQ at
- <A HREF="http://cwiki.apache.org/confluence/display/TUSCANY/Tuscany+SCA+-+FAQ"
- TARGET="_blank">http://cwiki.apache.org/confluence/display/TUSCANY/Tuscany+SCA+-+FAQ</A> </P>
-
- <P>Any problem with this release can be reported to the Tuscany
- <A HREF="http://cwiki.apache.org/TUSCANY/mailing-lists.html"
- TARGET="_blank">mailing lists</A> or create a JIRA issue at&nbsp;<A HREF="http://issues.apache.org/jira/browse/Tuscany"
- TARGET="_blank">http://issues.apache.org/jira/browse/Tuscany</A>.</P>
-
- </DIV>
- </DIV>
-</DIV>
-</BODY>
-
-</HTML>
-
diff --git a/cpp/sca/samples/PythonCalculator/sample.calculator.app.composite b/cpp/sca/samples/PythonCalculator/sample.calculator.app.composite
deleted file mode 100644
index ea4e3e118d..0000000000
--- a/cpp/sca/samples/PythonCalculator/sample.calculator.app.composite
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- name="sample.calculator.app">
-
- <component name="sample.calculator.CalculatorComponent">
- <implementation.composite name="sample.calculator" />
- </component>
-
-</composite>
diff --git a/cpp/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am b/cpp/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am
deleted file mode 100644
index df1187aab1..0000000000
--- a/cpp/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-deploydir=$(prefix)/PythonCalculator/deploy
-clientdir=$(deploydir)/sample.calculator.client
-
-client_DATA = *.py
-client_SCRIPTS = runclient.sh
-EXTRA_DIST = runclient.sh *.py
diff --git a/cpp/sca/samples/PythonCalculator/sample.calculator.client/calculator_client.py b/cpp/sca/samples/PythonCalculator/sample.calculator.client/calculator_client.py
deleted file mode 100644
index 58d6f45606..0000000000
--- a/cpp/sca/samples/PythonCalculator/sample.calculator.client/calculator_client.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-#
-#
-# This Python code is a simple sample that provides a Python
-# client for the Calculator sample
-
-
-import sys
-import sca
-
-op = sys.argv[1]
-val1 = sys.argv[2]
-val2 = sys.argv[3]
-
-# Locate the calculator service
-calc = sca.locateservice("CalculatorComponent")
-
-# Invoke the calculator operations
-if op == 'add':
- result = calc.add(val1, val2)
-
-elif op == 'sub':
- result = calc.sub(val1, val2)
-
-elif op == 'mul':
- result = calc.mul(val1, val2)
-
-elif op == 'div':
- result = calc.div(val1, val2)
-
-
-print "calculator_client: ",op,"(",val1,",",val2,") = ",result
-
diff --git a/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat b/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat
deleted file mode 100644
index 206b1e5a59..0000000000
--- a/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat
+++ /dev/null
@@ -1,45 +0,0 @@
-@echo off
-
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements. See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership. The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing,
-@REM software distributed under the License is distributed on an
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@REM KIND, either express or implied. See the License for the
-@REM specific language governing permissions and limitations
-@REM under the License.
-
-setlocal
-
-if "%TUSCANY_SCACPP%" == "" (
-echo "TUSCANY_SCACPP not set"
-goto end
-)
-echo using SCA installed at %TUSCANY_SCACPP%
-
-if "%TUSCANY_SDOCPP%" == "" (
-echo "TUSCANY_SDOCPP not set"
-goto end
-)
-echo using SDO installed at %TUSCANY_SDOCPP%
-
-set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\python\bin;%TUSCANY_SDOCPP%\bin;%PATH%
-set PYTHONPATH=%TUSCANY_SCACPP%\extensions\python\bin
-
-set TUSCANY_SCACPP_ROOT=%~d0%~p0\..\
-set TUSCANY_SCACPP_COMPONENT=sample.calculator.CalculatorComponent
-set TUSCANY_SCACPP_BASE_URI=http://localhost:9090
-
-cd %TUSCANY_SCACPP_ROOT%\sample.calculator.client
-python calculator_client.py div 5 2
-
-:end
-endlocal
diff --git a/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh b/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh
deleted file mode 100755
index d500d3d132..0000000000
--- a/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-APFULLDIR=`pwd`
-
-if [ x$TUSCANY_SCACPP = x ]; then
-echo "TUSCANY_SCACPP not set"
-exit;
-fi
-echo "Using SCA installed at $TUSCANY_SCACPP"
-
-if [ x$TUSCANY_SDOCPP = x ]; then
-echo "TUSCANY_SDOCPP not set"
-exit;
-fi
-echo "Using SDO installed at $TUSCANY_SDOCPP"
-
-if [ x$PYTHON_LIB != x ]; then
-echo "Using Python library installed at $PYTHON_LIB"
-export LD_LIBRARY_PATH=$PYTHON_LIB:$LD_LIBRARY_PATH
-export PATH=$PYTHON_LIB/../bin:$PATH
-fi
-
-export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SCACPP/extensions/python/lib:$TUSCANY_SDOCPP/lib:$LD_LIBRARY_PATH
-export PYTHONPATH=$TUSCANY_SCACPP/extensions/python/lib:$PYTHONPATH
-
-export TUSCANY_SCACPP_ROOT=$APFULLDIR/../
-export TUSCANY_SCACPP_COMPONENT=sample.calculator.CalculatorComponent
-export TUSCANY_SCACPP_BASE_URI=http://localhost:9090
-
-cd $TUSCANY_SCACPP_ROOT/sample.calculator.client
-python calculator_client.py div 5 2
diff --git a/cpp/sca/samples/PythonCalculator/sample.calculator/Calculator.wsdl b/cpp/sca/samples/PythonCalculator/sample.calculator/Calculator.wsdl
deleted file mode 100644
index 331b996ba2..0000000000
--- a/cpp/sca/samples/PythonCalculator/sample.calculator/Calculator.wsdl
+++ /dev/null
@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:tns="http://sample/calculator"
- targetNamespace="http://sample/calculator">
- <types>
- <xs:schema targetNamespace="http://sample/calculator"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:tns="http://sample/calculator" elementFormDefault="qualified">
-
- <xs:element name="add">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="param1" type="xs:float"/>
- <xs:element name="param2" type="xs:float"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="sub">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="param1" type="xs:float"/>
- <xs:element name="param2" type="xs:float"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="mul">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="param1" type="xs:float"/>
- <xs:element name="param2" type="xs:float"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="div">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="param1" type="xs:float"/>
- <xs:element name="param2" type="xs:float"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="result">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="data" type="xs:float"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- </xs:schema>
- </types>
-
- <message name="addRequestMsg">
- <part name="body" element="tns:add" />
- </message>
- <message name="subRequestMsg">
- <part name="body" element="tns:sub" />
- </message>
- <message name="mulRequestMsg">
- <part name="body" element="tns:mul" />
- </message>
- <message name="divRequestMsg">
- <part name="body" element="tns:div" />
- </message>
-
- <message name="calculatorResponseMsg">
- <part name="body" element="tns:result" />
- </message>
-
- <portType name="Calculator">
- <operation name="add">
- <input message="tns:addRequestMsg" />
- <output message="tns:calculatorResponseMsg" />
- </operation>
- <operation name="sub">
- <input message="tns:subRequestMsg" />
- <output message="tns:calculatorResponseMsg" />
- </operation>
- <operation name="mul">
- <input message="tns:mulRequestMsg" />
- <output message="tns:calculatorResponseMsg" />
- </operation>
- <operation name="div">
- <input message="tns:divRequestMsg" />
- <output message="tns:calculatorResponseMsg" />
- </operation>
- </portType>
-
- <binding name="CalculatorBinding"
- type="tns:Calculator">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="add">
- <soap:operation soapAction="CalculatorService#add" />
- <input>
- <soap:body use="literal" />
- </input>
- <output>
- <soap:body use="literal" />
- </output>
- </operation>
- <operation name="sub">
- <soap:operation soapAction="CalculatorService#sub" />
- <input>
- <soap:body use="literal" />
- </input>
- <output>
- <soap:body use="literal" />
- </output>
- </operation>
- <operation name="mul">
- <soap:operation soapAction="CalculatorService#mul" />
- <input>
- <soap:body use="literal" />
- </input>
- <output>
- <soap:body use="literal" />
- </output>
- </operation>
- <operation name="div">
- <soap:operation soapAction="CalculatorService#div" />
- <input>
- <soap:body use="literal" />
- </input>
- <output>
- <soap:body use="literal" />
- </output>
- </operation>
- </binding>
-
- <service name="CalculatorService">
- <port name="CalculatorPort"
- binding="tns:CalculatorBinding">
- <soap:address location="http://localhost:9090/axis2/services/sample.calculator.CalculatorComponent/CalculatorService" />
- </port>
- </service>
-</definitions>
diff --git a/cpp/sca/samples/PythonCalculator/sample.calculator/CalculatorImpl.py b/cpp/sca/samples/PythonCalculator/sample.calculator/CalculatorImpl.py
deleted file mode 100644
index 86dbef9e4d..0000000000
--- a/cpp/sca/samples/PythonCalculator/sample.calculator/CalculatorImpl.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-#
-#
-# This Python code is a simple sample that provides a Python implementation of
-# the Calculator sample
-#
-
-
-# The module-level add function
-def add(val1, val2):
- result = float(val1) + float(val2)
- print "Python - CalculatorImpl.add " + str(val1) + " + " + str(val2) + " = " + str(result)
- return result
-
-# The module-level sub function
-def sub(val1, val2):
- result = float(val1) - float(val2)
- print "Python - CalculatorImpl.sub " + str(val1) + " - " + str(val2) + " = " + str(result)
- return result
-
-# The module-level mul function
-def mul(val1, val2):
- result = float(val1) * float(val2)
- print "Python - CalculatorImpl.mul " + str(val1) + " * " + str(val2) + " = " + str(result)
- return result
-
-# The module-level div function
-def div(val1, val2):
-
-
- print "Python - CalculatorImpl.div calling divideService to determine " + str(val1) + " / " + str(val2)
-
- # Use the divideService reference
- result = divideService.divide(val1, val2)
-
- print "Python - CalculatorImpl.div divideService returned " + str(result)
-
- return result
-
diff --git a/cpp/sca/samples/PythonCalculator/sample.calculator/DivideImpl.py b/cpp/sca/samples/PythonCalculator/sample.calculator/DivideImpl.py
deleted file mode 100644
index 3921731de6..0000000000
--- a/cpp/sca/samples/PythonCalculator/sample.calculator/DivideImpl.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-#
-#
-# This Python code is a simple sample that provides a Python implementation of
-# the Divide Service used in the Calculator sample
-#
-# Either use the divide function in the DivideClass class (using classes allows
-# composite scoping to be used)
-# e.g. in CalculatorComposite.composite use the line:
-# <implementation.python module="DivideImpl" class="DivideClass"/>
-#
-# Or just use the module-level divide function
-# e.g. in CalculatorComposite.composite use the line:
-# <implementation.python module="DivideImpl" />
-#
-
-
-class DivideClass:
- "A class to handle dividing"
-
- def __init__(self):
- print "Python - DivideImpl.DivideClass constructor"
-
- # The class-level divide function
- def divide(self, val1, val2):
- result = float(val1) / float(val2)
-
- print "Python - DivideImpl.DivideClass.divide " + str( val1 ) + " / " + str(val2) + " = " + str(result)
-
- # Use the doRounding property
- if doRounding:
- result = round(result)
- print "Python - DivideImpl.DivideClass.divide is rounding the result to " + str(result)
-
- return result
-
-# The module-level divide function
-def divide(val1, val2):
- result = float(val1) / float(val2)
- print "Python - DivideImpl.divide " + str(val1) + " / " + str(val2) + " = " + str(result)
-
- # Use the doRounding property
- if doRounding:
- result = round(result)
- print "Python - DivideImpl.divide is rounding the result to " + str(result)
-
- return result
-
diff --git a/cpp/sca/samples/PythonCalculator/sample.calculator/Makefile.am b/cpp/sca/samples/PythonCalculator/sample.calculator/Makefile.am
deleted file mode 100644
index ec7cf8a8ad..0000000000
--- a/cpp/sca/samples/PythonCalculator/sample.calculator/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-deploydir=$(prefix)/PythonCalculator/deploy
-compositedir=$(deploydir)/sample.calculator
-
-composite_DATA = *.composite *.wsdl *.py
-
-EXTRA_DIST = *.composite *.wsdl *.py
diff --git a/cpp/sca/samples/PythonCalculator/sample.calculator/sample.calculator.composite b/cpp/sca/samples/PythonCalculator/sample.calculator/sample.calculator.composite
deleted file mode 100644
index 7f2221b696..0000000000
--- a/cpp/sca/samples/PythonCalculator/sample.calculator/sample.calculator.composite
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- name="sample.calculator">
-
- <component name="CalculatorComponent">
- <implementation.python module="CalculatorImpl" scope="composite"/>
- <reference name="divideService">DivideComponent</reference>
- </component>
-
- <component name="DivideComponent">
- <implementation.python module="DivideImpl" scope="composite"/>
- <property name="doRounding">true</property>
- </component>
-
-</composite>