Author: jsdelfino
Date: Wed Sep 20 17:08:28 2006
New Revision: 448409

URL: http://svn.apache.org/viewvc?view=rev&rev=448409
Log:
Cleaned up the Ruby and Python samples. Changed the CPP Web Service clients to 
Ruby and Python clients, respectively.

Added:
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/Calculator.wsdl
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/calculator_wsclient.py
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Calculator.wsdl
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.rb
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite
Removed:
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/CalculatorWSClient.cpp
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/axis2_Calculator_stub.h
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.cpp
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.h
Modified:
    
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.client/runclient.bat
    
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.client/runclient.sh
    
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.bat
    
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.sh
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.solution/sample.calculator.solution.composite
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/Makefile.am
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.bat
    
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.sh
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.rb
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Makefile.am
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.bat
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.solution/sample.calculator.solution.composite
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Makefile.am
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.bat
    
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh

Modified: 
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.client/runclient.bat
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.client/runclient.bat?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.client/runclient.bat
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.client/runclient.bat
 Wed Sep 20 17:08:28 2006
@@ -39,9 +39,7 @@
 
 set 
PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\cpp\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
 
-.\calculator_client.exe add 4.7 9
-.\calculator_client.exe div 7.2 3.6
-.\calculator_client.exe mul 7 6
+.\calculator_client.exe div 5 2
 
 :end
 endlocal

Modified: 
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.client/runclient.sh
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.client/runclient.sh?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.client/runclient.sh
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.client/runclient.sh
 Wed Sep 20 17:08:28 2006
@@ -41,7 +41,4 @@
 export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM
 export TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent
 
-./calculator_client add 4.7 9
-./calculator_client div 7.2 3.6
-./calculator_client mul 7 6
-
+./calculator_client div 5 2

Modified: 
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.bat
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.bat?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.bat
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.bat
 Wed Sep 20 17:08:28 2006
@@ -23,9 +23,7 @@
 echo Using Axis2C installed at %AXIS2C_HOME%"
 
 rem Run the client
-.\calculator_wsclient.exe add 4.7 9
-.\calculator_wsclient.exe div 7.2 3.6
-.\calculator_wsclient.exe mul 7 6
+.\calculator_wsclient.exe div 5 2
 
 :end
 endlocal

Modified: 
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.sh
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.sh?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.sh
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.sh
 Wed Sep 20 17:08:28 2006
@@ -24,6 +24,4 @@
 
 export LD_LIBRARY_PATH=$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
 
-./calculator_wsclient add 4.7 9
-./calculator_wsclient div 7.2 3.6
-./calculator_wsclient mul 7 6
+./calculator_wsclient div 5 2

Modified: 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am
 Wed Sep 20 17:08:28 2006
@@ -1,5 +1,7 @@
 deploydir=$(prefix)/samples/PythonCalculator/deploy
+clientdir=$(deploydir)/packages/sample.calculator.client
 prgbindir=$(deploydir)/bin
 
-prgbin_SCRIPTS = runclient.sh *.py
+client_DATA = *.py
+prgbin_SCRIPTS = runclient.sh
 EXTRA_DIST = runclient.sh *.py

Modified: 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat
 Wed Sep 20 17:08:28 2006
@@ -40,9 +40,8 @@
 set 
PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\python\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
 set PYTHONPATH=%TUSCANY_SCACPP%\extensions\python\bin
 
-python calculator_client.py add 4.7 9   
-python calculator_client.py div 7.2 3.6 
-python calculator_client.py mul 7 6 
+cd %TUSCANY_SCACPP_SYSTEM_ROOT%\packages\sample.calculator.client
+python calculator_client.py div 5 2
     
 :end
 endlocal

Modified: 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh
 Wed Sep 20 17:08:28 2006
@@ -42,8 +42,5 @@
 export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM
 export TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent
 
-python calculator_client.py add 4.7 9   
-python calculator_client.py div 7.2 3.6 
-python calculator_client.py mul 7 6 
-    
-
+cd $TUSCANY_SCACPP_SYSTEM_ROOT/packages/sample.calculator.client
+python calculator_client.py div 5 2

Modified: 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.solution/sample.calculator.solution.composite
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.solution/sample.calculator.solution.composite?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.solution/sample.calculator.solution.composite
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.solution/sample.calculator.solution.composite
 Wed Sep 20 17:08:28 2006
@@ -22,5 +22,8 @@
                <implementation.composite name="sample.calculator" />

                </component>

 

+        <component name="sample.calculator.CalculatorWSClientComponent">
+               <implementation.composite name="sample.calculator.wsclient" />
+               </component>
+
 </composite>

-


Added: 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/Calculator.wsdl
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/Calculator.wsdl?view=auto&rev=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/Calculator.wsdl
 (added)
+++ 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/Calculator.wsdl
 Wed Sep 20 17:08:28 2006
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--
+       Copyright 2006 The Apache Software Foundation or its licensors, as 
applicable.
+       
+       Licensed under the Apache License, Version 2.0 (the "License");
+       you may not use this file except in compliance with the License.
+       You may obtain a copy of the License at
+       
+       http://www.apache.org/licenses/LICENSE-2.0
+       
+       Unless required by applicable law or agreed to in writing, software
+       distributed under the License is distributed on an "AS IS" BASIS,
+       WITHOUT 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>

+

+</definitions>


Modified: 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/Makefile.am
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/Makefile.am?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/Makefile.am
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/Makefile.am
 Wed Sep 20 17:08:28 2006
@@ -1,28 +1,7 @@
 deploydir=$(prefix)/samples/PythonCalculator/deploy
+wsclientdir=$(deploydir)/packages/sample.calculator.wsclient
 prgbindir=$(deploydir)/bin
 
-prgbin_PROGRAMS = calculator_wsclient
+wsclient_DATA = *.py *.wsdl *.composite
 prgbin_SCRIPTS = runwsclient.sh
-EXTRA_DIST = runwsclient.sh
-
-AM_CPPFLAGS = $(CPPFLAGS)
-
-calculator_wsclient_SOURCES = \
-axis2_Calculator_stub.cpp \
-CalculatorWSClient.cpp
-
-noinst_HEADERS = *.h
-
-calculator_wsclient_LDADD  = \
--L$(AXIS2C_HOME)/lib \
-  -laxis2_util \
-  -laxis2_axiom \
-  -laxis2_wsdl \
-  -laxis2_engine \
-  -laxis2_parser \
-  -laxis2_minizip \
-  -lpthread \
-  -laxis2_http_sender \
-  -laxis2_http_receiver
-       
-INCLUDES =  -I${AXIS2C_HOME}/include
+EXTRA_DIST = runwsclient.sh *.py *.wsdl *.composite

Added: 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/calculator_wsclient.py
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/calculator_wsclient.py?view=auto&rev=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/calculator_wsclient.py
 (added)
+++ 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/calculator_wsclient.py
 Wed Sep 20 17:08:28 2006
@@ -0,0 +1,50 @@
+# Licensed to the Apache Software Foundation (ASF) under one

+# or more contributor license agreements.  See the NOTICE file

+# distributed with this work for additional information

+# regarding copyright ownership.  The ASF licenses this file

+# to you under the Apache License, Version 2.0 (the

+# "License"); you may not use this file except in compliance

+# with the License.  You may obtain a copy of the License at

+# 

+#    http://www.apache.org/licenses/LICENSE-2.0

+#

+# Unless required by applicable law or agreed to in writing,

+# software distributed under the License is distributed on an

+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+# KIND, either express or implied.  See the License for the

+# specific language governing permissions and limitations

+# under the License.

+#

+#

+# 

+# 

+# This Python code is a simple sample that provides a Python 

+# client for the Calculator sample

+ 

+

+import sys

+import TuscanySCA

+

+op = sys.argv[1]

+val1 = sys.argv[2]

+val2 = sys.argv[3]

+

+# Locate the calculator service

+calc = TuscanySCA.locateService("CalculatorService")

+

+# 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_wsclient: ",op,"(",val1,",",val2,") = ",result

+


Modified: 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.bat
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.bat?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.bat
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.bat
 Wed Sep 20 17:08:28 2006
@@ -16,16 +16,32 @@
 
 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%
+
 if "%AXIS2C_HOME%" == "" (
 echo "AXIS2C_HOME not set"
 goto end
 )
-echo Using Axis2C installed at %AXIS2C_HOME%"
+echo using Axis2C installed at %AXIS2C_HOME%
+
+set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\
+set 
TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorWSClientComponent
 
-rem Run the client
-.\calculator_wsclient.exe add 4.7 9
-.\calculator_wsclient.exe div 7.2 3.6
-.\calculator_wsclient.exe mul 7 6
+set 
PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\python\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
+set PYTHONPATH=%TUSCANY_SCACPP%\extensions\python\bin
 
+cd %TUSCANY_SCACPP_SYSTEM_ROOT%\packages\sample.calculator.wsclient
+python calculator_wsclient.py div 5 2
+    
 :end
 endlocal

Modified: 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.sh
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.sh?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.sh
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.sh
 Wed Sep 20 17:08:28 2006
@@ -16,14 +16,31 @@
 
 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$AXIS2C_HOME = x ]; then
 echo "AXIS2C_HOME not set"
 exit;
 fi
 echo "Using Axis2C installed at $AXIS2C_HOME"
 
-export LD_LIBRARY_PATH=$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+TEST_SYSTEM=$APFULLDIR/../
+
+export 
LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SCACPP/extensions/python/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+export PYTHONPATH=$TUSCANY_SCACPP/extensions/python/lib:$PYTHONPATH
+
+export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM
+export 
TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorWSClientComponent
 
-./calculator_wsclient add 4.7 9
-./calculator_wsclient div 7.2 3.6
-./calculator_wsclient mul 7 6
+cd $TUSCANY_SCACPP_SYSTEM_ROOT/packages/sample.calculator.wsclient
+python calculator_wsclient.py div 5 2

Added: 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite?view=auto&rev=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite
 (added)
+++ 
incubator/tuscany/cpp/sca/samples/PythonCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite
 Wed Sep 20 17:08:28 2006
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2006 The Apache Software Foundation or its licensors, as 
applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT 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.wsclient">
+
+       <reference name="CalculatorService">
+               <interface.wsdl 
interface="http://sample/calculator#wsdl.interface(Calculator)"/>
+               <binding.ws 
uri="http://localhost:9090/axis2/services/CalculatorService"/>
+       </reference>
+
+</composite>
\ No newline at end of file

Modified: 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.rb
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.rb?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.rb
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.rb
 Wed Sep 20 17:08:28 2006
@@ -21,10 +21,5 @@
 
 calculator = SCA::locateService("CalculatorComponent")
 
-x = calculator.add(1, 2)
-print x
-print "\n"
-
 x = calculator.div(5, 2)
-print x
-print "\n"
+print x, "\n"

Modified: 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Makefile.am
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Makefile.am?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Makefile.am
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Makefile.am
 Wed Sep 20 17:08:28 2006
@@ -1,5 +1,7 @@
 deploydir=$(prefix)/samples/RubyCalculator/deploy
+clientdir=$(deploydir)/packages/sample.calculator.client
 prgbindir=$(deploydir)/bin
 
-prgbin_SCRIPTS = runclient.sh *.rb
+client_DATA = *.rb
+prgbin_SCRIPTS = runclient.sh
 EXTRA_DIST = runclient.sh *.rb

Modified: 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.bat
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.bat?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.bat
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.bat
 Wed Sep 20 17:08:28 2006
@@ -39,6 +39,7 @@
 
 set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
 
+cd %TUSCANY_SCACPP_SYSTEM_ROOT%\packages\sample.calculator.client
 ruby -I%TUSCANY_SCACPP%\extensions\ruby\lib CalculatorClient.rb
 
 :end

Modified: 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh
 Wed Sep 20 17:08:28 2006
@@ -41,4 +41,5 @@
 export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM
 export TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent
 
+cd $TUSCANY_SCACPP_SYSTEM_ROOT/packages/sample.calculator.client
 ruby -I$TUSCANY_SCACPP/extensions/ruby/lib CalculatorClient.rb

Modified: 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.solution/sample.calculator.solution.composite
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.solution/sample.calculator.solution.composite?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.solution/sample.calculator.solution.composite
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.solution/sample.calculator.solution.composite
 Wed Sep 20 17:08:28 2006
@@ -22,5 +22,8 @@
                <implementation.composite name="sample.calculator" />

                </component>

 

+        <component name="sample.calculator.CalculatorWSClientComponent">
+               <implementation.composite name="sample.calculator.wsclient" />
+               </component>
+
 </composite>

-


Added: 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Calculator.wsdl
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Calculator.wsdl?view=auto&rev=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Calculator.wsdl
 (added)
+++ 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Calculator.wsdl
 Wed Sep 20 17:08:28 2006
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--
+       Copyright 2006 The Apache Software Foundation or its licensors, as 
applicable.
+       
+       Licensed under the Apache License, Version 2.0 (the "License");
+       you may not use this file except in compliance with the License.
+       You may obtain a copy of the License at
+       
+       http://www.apache.org/licenses/LICENSE-2.0
+       
+       Unless required by applicable law or agreed to in writing, software
+       distributed under the License is distributed on an "AS IS" BASIS,
+       WITHOUT 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>

+

+</definitions>


Added: 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.rb
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.rb?view=auto&rev=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.rb
 (added)
+++ 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.rb
 Wed Sep 20 17:08:28 2006
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+
+require("tuscany_sca_ruby")
+
+calculator = SCA::locateService("CalculatorService")
+
+x = calculator.div(5, 2)
+print x, "\n"

Modified: 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Makefile.am
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Makefile.am?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Makefile.am
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Makefile.am
 Wed Sep 20 17:08:28 2006
@@ -1,28 +1,7 @@
 deploydir=$(prefix)/samples/RubyCalculator/deploy
+wsclientdir=$(deploydir)/packages/sample.calculator.wsclient
 prgbindir=$(deploydir)/bin
 
-prgbin_PROGRAMS = calculator_wsclient
+wsclient_DATA = *.rb *.wsdl *.composite
 prgbin_SCRIPTS = runwsclient.sh
-EXTRA_DIST = runwsclient.sh
-
-AM_CPPFLAGS = $(CPPFLAGS)
-
-calculator_wsclient_SOURCES = \
-axis2_Calculator_stub.cpp \
-CalculatorWSClient.cpp
-
-noinst_HEADERS = *.h
-
-calculator_wsclient_LDADD  = \
--L$(AXIS2C_HOME)/lib \
-  -laxis2_util \
-  -laxis2_axiom \
-  -laxis2_wsdl \
-  -laxis2_engine \
-  -laxis2_parser \
-  -laxis2_minizip \
-  -lpthread \
-  -laxis2_http_sender \
-  -laxis2_http_receiver
-       
-INCLUDES =  -I${AXIS2C_HOME}/include
+EXTRA_DIST = runwsclient.sh *.rb *.wsdl *.composite

Modified: 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.bat
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.bat?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.bat
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.bat
 Wed Sep 20 17:08:28 2006
@@ -16,16 +16,31 @@
 
 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%
+
 if "%AXIS2C_HOME%" == "" (
 echo "AXIS2C_HOME not set"
 goto end
 )
-echo Using Axis2C installed at %AXIS2C_HOME%"
+echo using Axis2C installed at %AXIS2C_HOME%
+
+set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\
+set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent
+
+set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
 
-rem Run the client
-.\calculator_wsclient.exe add 4.7 9
-.\calculator_wsclient.exe div 7.2 3.6
-.\calculator_wsclient.exe mul 7 6
+cd %TUSCANY_SCACPP_SYSTEM_ROOT%\packages\sample.calculator.wsclient
+ruby -I%TUSCANY_SCACPP%\extensions\ruby\lib CalculatorWSClient.rb
 
 :end
 endlocal

Modified: 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh?view=diff&rev=448409&r1=448408&r2=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh
 (original)
+++ 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh
 Wed Sep 20 17:08:28 2006
@@ -16,14 +16,30 @@
 
 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$AXIS2C_HOME = x ]; then
 echo "AXIS2C_HOME not set"
 exit;
 fi
 echo "Using Axis2C installed at $AXIS2C_HOME"
 
-export LD_LIBRARY_PATH=$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+TEST_SYSTEM=$APFULLDIR/../
+
+export 
LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+
+export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM
+export 
TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorWSClientComponent
 
-./calculator_wsclient add 4.7 9
-./calculator_wsclient div 7.2 3.6
-./calculator_wsclient mul 7 6
+cd $TUSCANY_SCACPP_SYSTEM_ROOT/packages/sample.calculator.wsclient
+ruby -I$TUSCANY_SCACPP/extensions/ruby/lib CalculatorWSClient.rb

Added: 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite?view=auto&rev=448409
==============================================================================
--- 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite
 (added)
+++ 
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite
 Wed Sep 20 17:08:28 2006
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2006 The Apache Software Foundation or its licensors, as 
applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT 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.wsclient">
+
+       <reference name="CalculatorService">
+               <interface.wsdl 
interface="http://sample/calculator#wsdl.interface(Calculator)"/>
+               <binding.ws 
uri="http://localhost:9090/axis2/services/CalculatorService"/>
+       </reference>
+
+</composite>
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to