tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r440664 - in /incubator/tuscany/cpp/sca/samples: ./ RubyCalculator/ RubyCalculator/sample.calculator.client/ RubyCalculator/sample.calculator.solution/ RubyCalculator/sample.calculator.wsclient/ RubyCalculator/sample.calculator/
Date Wed, 06 Sep 2006 09:20:55 GMT
Author: jsdelfino
Date: Wed Sep  6 02:20:54 2006
New Revision: 440664

URL: http://svn.apache.org/viewvc?view=rev&rev=440664
Log:
First pass at a Ruby Calculator sample

Added:
    incubator/tuscany/cpp/sca/samples/RubyCalculator/   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/Makefile.am
    incubator/tuscany/cpp/sca/samples/RubyCalculator/README
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Calculator.h   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.cpp   (with props)
    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   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.solution/   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.solution/sample.calculator.solution.composite
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.cpp   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Makefile.am
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.h   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.bat
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.h   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.componentType
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.cpp   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.h   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Divide.h   (with props)
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/DivideImpl.componentType
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/DivideImpl.rb
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Makefile.am
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/sample.calculator.composite
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/services.xml   (with props)
Modified:
    incubator/tuscany/cpp/sca/samples/Makefile.am
    incubator/tuscany/cpp/sca/samples/configure.ac

Modified: incubator/tuscany/cpp/sca/samples/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/Makefile.am?view=diff&rev=440664&r1=440663&r2=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/Makefile.am (original)
+++ incubator/tuscany/cpp/sca/samples/Makefile.am Wed Sep  6 02:20:54 2006
@@ -1,3 +1,3 @@
-SUBDIRS = Calculator BigBank
+SUBDIRS = Calculator BigBank RubyCalculator
 
 EXTRA_DIST = GettingStarted.html

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Sep  6 02:20:54 2006
@@ -0,0 +1,29 @@
+configure
+Makefile.in
+config.log
+depcomp
+config.guess
+config.h
+config.sub
+ltmain.sh
+Makefile
+config.status
+stamp-h1
+config.h.in
+libtool
+autom4te.cache
+missing
+aclocal.m4
+install-sh
+.deps
+*.dat
+.libs
+tmp
+bld
+.project
+.cdtproject
+.settings
+*_Proxy.cpp
+*_Proxy.h
+*_Wrapper.cpp
+*_Wrapper.h

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/Makefile.am?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/Makefile.am (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/Makefile.am Wed Sep  6 02:20:54 2006
@@ -0,0 +1,4 @@
+deploydir=$(prefix)/samples/RubyCalculator/deploy/configuration
+SUBDIRS = sample.calculator sample.calculator.client sample.calculator.wsclient
+EXTRA_DIST = sample.calculator.solution
+deploy_DATA = sample.calculator.solution/sample.calculator.solution.composite
\ No newline at end of file

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/README
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/README?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/README (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/README Wed Sep  6 02:20:54 2006
@@ -0,0 +1,23 @@
+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 four 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.solution
+      This contains the SCDL file describing the configuration of the SCA
+      Calculator composite deployed to the SCA runtime.
+
+    - sample.calculator.client
+      A sample client which does a local call to the Calculator service.
+
+    - sample.calculator.wsclient
+      A sample Axis2 Web Service client which calls the Calculator Web service.
+
+

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Sep  6 02:20:54 2006
@@ -0,0 +1,29 @@
+configure
+Makefile.in
+config.log
+depcomp
+config.guess
+config.h
+config.sub
+ltmain.sh
+Makefile
+config.status
+stamp-h1
+config.h.in
+libtool
+autom4te.cache
+missing
+aclocal.m4
+install-sh
+.deps
+*.dat
+.libs
+tmp
+bld
+.project
+.cdtproject
+.settings
+*_Proxy.cpp
+*_Proxy.h
+*_Wrapper.cpp
+*_Wrapper.h

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Sep  6 02:20:54 2006
@@ -0,0 +1,31 @@
+configure
+Makefile.in
+config.log
+depcomp
+config.guess
+config.h
+config.sub
+ltmain.sh
+Makefile
+config.status
+stamp-h1
+config.h.in
+libtool
+autom4te.cache
+missing
+aclocal.m4
+install-sh
+.deps
+*.dat
+.libs
+tmp
+bld
+.project
+.cdtproject
+.settings
+*_Proxy.cpp
+*_Proxy.h
+*_Wrapper.cpp
+*_Wrapper.h
+calculator_client
+calculator_wsclient

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Calculator.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Calculator.h?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Calculator.h (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Calculator.h Wed Sep  6 02:20:54 2006
@@ -0,0 +1,32 @@
+/*
+ *
+ *  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.
+ */
+
+#ifndef sample_calculator_h
+#define sample_calculator_h
+
+class Calculator  
+{
+public:
+	virtual float add(float arg1, float arg2) = 0;
+	virtual float sub(float arg1, float arg2) = 0;
+	virtual float mul(float arg1, float arg2) = 0;
+	virtual float div(float arg1, float arg2) = 0;
+};
+
+#endif // sample_calculator_h
+
+

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Calculator.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Calculator.h
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.cpp?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.cpp (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.cpp Wed Sep  6 02:20:54 2006
@@ -0,0 +1,165 @@
+/*
+ *
+ *  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.
+ */
+
+
+#include "Calculator.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+
+#include "tuscany/sca/core/TuscanyRuntime.h"
+using namespace tuscany::sca;
+
+#include <iostream>
+#include <stdlib.h>
+using namespace std;
+
+
+void usage();
+bool IsNumber(const char *p);
+
+int main(int argc, char* argv[])
+{
+    const char *operation;
+    float arg1 = 0;
+    float arg2 = 0;
+	
+    if (argc == 4)
+    {
+        operation = argv[1];
+		
+        if (!IsNumber(argv[2]))
+        {
+            cout << "calculator_client: Argument 1 is not a number" << endl;
+			usage();
+        }
+        else
+        {
+            arg1 = atof(argv[2]);
+        }
+
+        if (!IsNumber(argv[3]))
+        {
+            cout << "calculator_client: Argument 2 is not a number" << endl;
+			usage();
+        }
+        else
+        {
+            arg2 = atof(argv[3]);
+        }
+    }
+    else
+    {
+        usage();
+    }
+
+    try
+    {
+        // Set the default  environment variable: <subsystem>/<Name>
+        string systemRoot = getenv("TUSCANY_SCACPP");
+        if (systemRoot  == "")
+        {
+            cout << "TUSCANY_SCACPP environment variable not set" <<endl;
+            return -1;
+        }
+        
+        // Locate a service
+		CompositeContext myContext = CompositeContext::getCurrent();
+		Calculator *calcService = (Calculator*) myContext.locateService("CalculatorComponent/CalculatorService");
+		if (calcService == 0)
+		{
+			cout << "calculator_client: Unable to find Calculator service" << endl;
+		}
+		else
+		{
+			try
+			{
+                float result = 0;
+                if (strcmp(operation, "add") == 0)
+                {
+                    result = calcService->add(arg1, arg2);
+                    cout << "calculator_client: add(" << arg1 << "," << arg2 << ") = " << result << endl;
+                }
+                else
+                if (strcmp(operation, "sub") == 0)
+                {
+                    result = calcService->sub(arg1, arg2);
+                    cout << "calculator_client: sub(" << arg1 << "," << arg2 << ") = " << result << endl;
+                }
+                else
+                if (strcmp(operation, "mul") == 0)
+                {
+                    result = calcService->mul(arg1, arg2);
+                    cout << "calculator_client: mul(" << arg1 << "," << arg2 << ") = " << result << endl;
+                }
+                else
+                if (strcmp(operation, "div") == 0)
+                {
+                    result = calcService->div(arg1, arg2);
+                    cout << "calculator_client: div(" << arg1 << "," << arg2 << ") = " << result << endl;
+                }
+				else
+			    {
+			        cout << "calculator_client: Unrecognized operation: " << operation << endl;
+				}
+			}
+			catch (char* x)
+			{
+				cout << "calculator_client: exception caught: " << x << endl;
+			}
+		}
+		
+	}
+	catch (ServiceRuntimeException& ex)
+	{
+		cout << ex << endl;
+	}
+	return 0;
+}
+
+void usage()
+{
+   cout << "Usage: calculator_client add|sub|mul|div arg1 arg2" << endl;
+   exit(1);
+}
+
+bool IsNumber (const char *p)
+{
+    int len = strlen(p);
+    int pointcount = 0;
+
+    if (!isdigit (p[0]) && p[0] != '-' && p[0] != '+')
+    {
+        return false;
+    }
+    for (int i = 1; i < len; i++)
+    {
+	   if (!isdigit (p[i]))
+       {
+           if (p[i] == '.')
+           {
+               if (pointcount > 0) return false;
+               pointcount++;
+           }
+           else
+           {
+                return false;
+           }
+       }
+    }
+    return true;
+}

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.cpp
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 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=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Makefile.am (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/Makefile.am Wed Sep  6 02:20:54 2006
@@ -0,0 +1,34 @@
+deploydir=$(prefix)/samples/RubyCalculator/deploy
+prgbindir=$(deploydir)/bin
+
+prgbin_PROGRAMS = calculator_client
+prgbin_SCRIPTS = runclient.sh
+EXTRA_DIST = runclient.sh
+
+AM_CPPFLAGS = $(CPPFLAGS)
+calculator_client_SOURCES = \
+CalculatorClient.cpp
+
+calculator_client_LDADD = \
+-L${TUSCANY_SCACPP}/lib \
+  -ltuscany_sca \
+-L${TUSCANY_SCACPP}/extensions/cpp/lib \
+  -ltuscany_sca_cpp \
+-L${TUSCANY_SDOCPP}/lib \
+  -ltuscany_sdo \
+  -ltuscany_sdo_axiom \
+-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$(TUSCANY_SCACPP)/extensions/cpp/include \
+-I${TUSCANY_SCACPP}/include \
+-I${TUSCANY_SDOCPP}/include

Added: 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=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.bat (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.bat Wed Sep  6 02:20:54 2006
@@ -0,0 +1,47 @@
+@echo off
+
+@REM  Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM  Licensed under the Apache License, Version 2.0 (the "License");
+@REM  you may not use this file except in compliance with the License.
+@REM  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, software
+@REM  distributed under the License is distributed on an "AS IS" BASIS,
+@REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM  See the License for the specific language governing permissions and
+@REM  limitations 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%
+
+if "%AXIS2C_HOME%" == "" (
+echo "AXIS2C_HOME not set"
+goto end
+)
+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_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
+
+:end
+endlocal

Added: 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=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh Wed Sep  6 02:20:54 2006
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+#  Copyright 2005 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.
+
+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"
+
+TEST_SYSTEM=$APFULLDIR/../
+
+export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SCACPP/extensions/cpp/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+
+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
+

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.solution/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Sep  6 02:20:54 2006
@@ -0,0 +1,29 @@
+configure
+Makefile.in
+config.log
+depcomp
+config.guess
+config.h
+config.sub
+ltmain.sh
+Makefile
+config.status
+stamp-h1
+config.h.in
+libtool
+autom4te.cache
+missing
+aclocal.m4
+install-sh
+.deps
+*.dat
+.libs
+tmp
+bld
+.project
+.cdtproject
+.settings
+*_Proxy.cpp
+*_Proxy.h
+*_Wrapper.cpp
+*_Wrapper.h

Added: 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=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.solution/sample.calculator.solution.composite (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.solution/sample.calculator.solution.composite Wed Sep  6 02:20:54 2006
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 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.solution">
+	
+        <component name="sample.calculator.CalculatorComponent">
+        	<implementation.composite name="sample.calculator" />
+       	</component>
+
+</composite>
+

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Sep  6 02:20:54 2006
@@ -0,0 +1,31 @@
+configure
+Makefile.in
+config.log
+depcomp
+config.guess
+config.h
+config.sub
+ltmain.sh
+Makefile
+config.status
+stamp-h1
+config.h.in
+libtool
+autom4te.cache
+missing
+aclocal.m4
+install-sh
+.deps
+*.dat
+.libs
+tmp
+bld
+.project
+.cdtproject
+.settings
+*_Proxy.cpp
+*_Proxy.h
+*_Wrapper.cpp
+*_Wrapper.h
+calculator_client
+calculator_wsclient

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.cpp?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.cpp (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.cpp Wed Sep  6 02:20:54 2006
@@ -0,0 +1,181 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
+#include "axis2_Calculator_stub.h"
+#include <stdio.h>
+#include <axiom.h>
+#include <axis2_util.h>
+#include <axiom_soap.h>
+#include <axis2_client.h>
+
+axiom_node_t *
+build_om_programatically(const axis2_env_t *env, 
+    const axis2_char_t *operation, 
+    const axis2_char_t *param1, 
+    const axis2_char_t *param2);
+
+int main(int argc, char** argv)
+{
+    axis2_stub_t *stub = NULL;
+    axiom_node_t *node = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+    const axis2_env_t *env = NULL;
+    const axis2_char_t *address = NULL;
+    const axis2_char_t *client_home = NULL;
+    axiom_node_t *ret_node = NULL;
+
+    const axis2_char_t *operation = "add";
+    const axis2_char_t *param1 = "40";
+    const axis2_char_t *param2 = "8";
+   
+    env = axis2_env_create_all( "CalculatorService_blocking.log", AXIS2_LOG_LEVEL_TRACE);
+
+    client_home = AXIS2_GETENV("AXIS2C_HOME");
+    if (!client_home)
+        client_home = "../../deploy";
+    
+    address = "http://localhost:9090/axis2/services/CalculatorService";
+    if (argc > 1 )
+        operation = argv[1];
+    if (AXIS2_STRCMP(operation, "-h") == 0)
+    {
+        printf("Usage : %s [operation] [param1] [param2] [endpoint_url]\n", argv[0]);
+        printf("use -h for help\n");
+        printf("default operation add\n");
+        printf("default param1 %s\n", param1);
+        printf("default param2 %s\n", param2);
+        printf("default endpoint_url %s\n", address);
+        printf("NOTE: command line arguments must appear in given order, with trailing ones being optional\n");
+        return 0;
+    }
+    if (argc > 2 )
+        param1 = argv[2];
+    if (argc > 3 )
+        param2 = argv[3];
+    if (argc > 4 )
+        address = argv[4];
+
+    printf ("Using endpoint : %s\n", address);
+    printf ("\nInvoking operation %s with params %s and %s\n", operation, param1, param2);
+
+    node = build_om_programatically(env, operation, param1, param2);
+    stub = 
+        axis2_Calculator_stub_create_with_endpoint_uri_and_client_home(env, address,   client_home);
+    /* create node and invoke Calculator */
+    ret_node = axis2_Calculator_stub_add(stub, env, node);
+    if(ret_node)
+    {
+        axis2_char_t *om_str = NULL;
+        om_str = AXIOM_NODE_TO_STRING(ret_node, env);
+        if(om_str)
+        {
+	        printf("\nOM returned = %s\n", om_str);
+        }
+
+        if (AXIOM_NODE_GET_NODE_TYPE(ret_node, env) == AXIOM_ELEMENT)
+        {
+            axis2_char_t *result = NULL;
+            axiom_node_t *result_node = (axiom_node_t*)AXIOM_NODE_GET_FIRST_CHILD(ret_node, env);
+            axiom_element_t *data_ele = (axiom_element_t*)AXIOM_NODE_GET_DATA_ELEMENT(result_node, env);
+
+            result = AXIOM_ELEMENT_GET_TEXT(data_ele, env, result_node);
+            printf( "\nResult = %s\n", result);
+        }
+        else
+        {
+            axiom_xml_writer_t *writer = NULL;
+            axiom_output_t *om_output = NULL;
+            axis2_char_t *buffer = NULL;
+            writer = axiom_xml_writer_create_for_memory(env, NULL, AXIS2_TRUE, 0,
+					AXIS2_XML_PARSER_TYPE_BUFFER);
+            om_output = axiom_output_create (env, writer);
+
+            AXIOM_NODE_SERIALIZE (ret_node, env, om_output);
+            buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(writer, env);
+            printf ("\nReceived invalid OM as result : %s\n", buffer);
+            if(NULL != buffer)
+            {
+                AXIS2_FREE(env->allocator, buffer);
+                buffer = NULL;
+            }
+            if(NULL != om_output)
+            {
+                AXIOM_OUTPUT_FREE(om_output, env);
+                om_output = NULL;
+            }
+        }
+    }
+    else
+    {
+		AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
+						" %d :: %s", env->error->error_number,
+                        AXIS2_ERROR_GET_MESSAGE(env->error));
+        printf("Calculator stub invoke FAILED!\n");
+    }
+    if (stub)
+    {
+        AXIS2_STUB_FREE(stub, env);
+    }
+    return status;
+}
+
+axiom_node_t *
+build_om_programatically(const axis2_env_t *env, 
+    const axis2_char_t *operation, 
+    const axis2_char_t *param1, 
+    const axis2_char_t *param2)
+{
+    axiom_node_t *Calculator_om_node = NULL;
+    axiom_element_t* Calculator_om_ele = NULL;
+    axiom_node_t* text_om_node = NULL;
+    axiom_element_t * text_om_ele = NULL;
+    axiom_namespace_t *ns1 = NULL;
+    
+
+    axiom_xml_writer_t *xml_writer = NULL;
+    axiom_output_t *om_output = NULL;
+    axis2_char_t *buffer = NULL;
+
+    ns1 = axiom_namespace_create (env, "http://sample/calculator", "ns1");
+
+    Calculator_om_ele = axiom_element_create(env, NULL, operation, ns1, &Calculator_om_node);
+    
+    text_om_ele = axiom_element_create(env, Calculator_om_node, "param1", NULL, &text_om_node);
+    AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, param1, text_om_node);
+    
+    text_om_ele = axiom_element_create(env, Calculator_om_node, "param2", NULL, &text_om_node);
+    AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, param2, text_om_node);
+    
+    xml_writer = axiom_xml_writer_create_for_memory(env, NULL, AXIS2_FALSE, AXIS2_FALSE,
+               AXIS2_XML_PARSER_TYPE_BUFFER);
+    om_output = axiom_output_create( env, xml_writer);
+    
+    AXIOM_NODE_SERIALIZE(Calculator_om_node, env, om_output);
+    buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(xml_writer, env);         
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "\nSending OM node in XML : %s \n",  buffer); 
+    if(NULL != buffer)
+    {
+        AXIS2_FREE(env->allocator, buffer);
+        buffer = NULL;
+    }
+    if(NULL != om_output)
+    {
+        AXIOM_OUTPUT_FREE(om_output, env);
+        om_output = NULL;
+    }
+
+    return Calculator_om_node;
+}

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.cpp
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 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=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Makefile.am (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/Makefile.am Wed Sep  6 02:20:54 2006
@@ -0,0 +1,28 @@
+deploydir=$(prefix)/samples/RubyCalculator/deploy
+prgbindir=$(deploydir)/bin
+
+prgbin_PROGRAMS = calculator_wsclient
+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

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp Wed Sep  6 02:20:54 2006
@@ -0,0 +1,173 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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.
+ */
+ 
+#include "axis2_Calculator_stub.h"
+
+
+axis2_stub_t * 
+axis2_Calculator_stub_create_with_endpoint_ref_and_client_home(const axis2_env_t *env,
+                                            axis2_endpoint_ref_t *endpoint_ref,
+                                            axis2_char_t *client_home)
+{
+    axis2_stub_t *stub = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+   
+    stub = (axis2_stub_t *) 
+    axis2_stub_create_with_endpoint_ref_and_client_home(env, endpoint_ref,
+            client_home);
+    if(NULL == stub)
+    {
+        AXIS2_ERROR_SET(env->error, 
+            AXIS2_ERROR_NO_MEMORY, (axis2_status_codes)AXIS2_FAILURE); 
+        return NULL;
+    }
+    axis2_populate_axis_service( stub, env);
+    return stub;
+}
+
+void axis2_populate_axis_service( axis2_stub_t* stub, const axis2_env_t *env)
+{
+   axis2_svc_client_t* svc_client = NULL;
+   axis2_qname_t *op_qname =  NULL;
+   axis2_svc_t* svc = NULL;
+   axis2_op_t* op = NULL;
+
+   /*Modifying the Service*/
+   svc_client = AXIS2_STUB_GET_SVC_CLIENT (stub, env );
+   svc = (axis2_svc_t*)AXIS2_SVC_CLIENT_GET_AXIS_SERVICE ( svc_client, env );
+
+   /*creating the operations*/
+
+   op_qname = axis2_qname_create(env,"add" , "", NULL);
+   op = axis2_op_create_with_qname(env, op_qname);
+   AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_OUT_IN);
+   AXIS2_SVC_ADD_OP(svc, env, op);
+   
+   op_qname = axis2_qname_create(env,"sub" , "", NULL);
+   op = axis2_op_create_with_qname(env, op_qname);
+   AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_OUT_IN);
+   AXIS2_SVC_ADD_OP(svc, env, op);
+   
+   op_qname = axis2_qname_create(env,"mul" , "", NULL);
+   op = axis2_op_create_with_qname(env, op_qname);
+   AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_OUT_IN);
+   AXIS2_SVC_ADD_OP(svc, env, op);
+   
+   op_qname = axis2_qname_create(env,"div" , "", NULL);
+   op = axis2_op_create_with_qname(env, op_qname);
+   AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_OUT_IN);
+   AXIS2_SVC_ADD_OP(svc, env, op);
+}
+
+axis2_stub_t *
+axis2_Calculator_stub_create_with_endpoint_uri_and_client_home(const axis2_env_t *env,
+                                            const axis2_char_t *endpoint_uri,
+                                            const axis2_char_t *client_home)
+{
+    axis2_stub_t *stub = NULL;
+    
+   AXIS2_ENV_CHECK(env, NULL);
+   
+   stub = (axis2_stub_t *) 
+        axis2_stub_create_with_endpoint_uri_and_client_home(env, endpoint_uri,
+            client_home);
+   if(NULL == stub)
+    {
+        AXIS2_ERROR_SET(env->error, 
+            AXIS2_ERROR_NO_MEMORY, (axis2_status_codes)AXIS2_FAILURE); 
+        return NULL;
+    }
+    
+    axis2_populate_axis_service( stub, env);
+    
+   return stub;
+}
+
+/***************************Function implementation****************************/
+
+axiom_node_t *
+axis2_Calculator_stub_add(axis2_stub_t *stub,
+                        const axis2_env_t *env,
+                        axiom_node_t *node)
+{
+    axis2_svc_client_t *svc_client = NULL;
+    axiom_node_t *ret_node = NULL;
+    axis2_qname_t *op_qname =  NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    
+    svc_client = AXIS2_STUB_GET_SVC_CLIENT(stub, env);
+    op_qname = axis2_qname_create(env, "add" , "", NULL);
+    ret_node =  AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node);
+    
+    return ret_node;
+}
+
+axiom_node_t *
+axis2_Calculator_stub_sub(axis2_stub_t *stub,
+                        const axis2_env_t *env,
+                        axiom_node_t *node)
+{
+    axis2_svc_client_t *svc_client = NULL;
+    axiom_node_t *ret_node = NULL;
+    axis2_qname_t *op_qname =  NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    
+    svc_client = AXIS2_STUB_GET_SVC_CLIENT(stub, env);
+    op_qname = axis2_qname_create(env, "sub" , "", NULL);
+    ret_node =  AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node);
+    
+    return ret_node;
+}
+
+axiom_node_t *
+axis2_Calculator_stub_mul(axis2_stub_t *stub,
+                        const axis2_env_t *env,
+                        axiom_node_t *node)
+{
+    axis2_svc_client_t *svc_client = NULL;
+    axiom_node_t *ret_node = NULL;
+    axis2_qname_t *op_qname =  NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    
+    svc_client = AXIS2_STUB_GET_SVC_CLIENT(stub, env);
+    op_qname = axis2_qname_create(env, "mul" , "", NULL);
+    ret_node =  AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node);
+    
+    return ret_node;
+}
+
+axiom_node_t *
+axis2_Calculator_stub_div(axis2_stub_t *stub,
+                        const axis2_env_t *env,
+                        axiom_node_t *node)
+{
+    axis2_svc_client_t *svc_client = NULL;
+    axiom_node_t *ret_node = NULL;
+    axis2_qname_t *op_qname =  NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    
+    svc_client = AXIS2_STUB_GET_SVC_CLIENT(stub, env);
+    op_qname = axis2_qname_create(env, "div" , "", NULL);
+    ret_node =  AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node);
+    
+    return ret_node;
+}
+

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.h?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.h (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.h Wed Sep  6 02:20:54 2006
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
+#ifndef AXIS2_ECHO_STUB_H
+#define AXIS2_ECHO_STUB_H
+
+/**
+ * @file axis2_Calculator_stub.h
+ * @brief axis2 Calculator stub interface
+ */
+
+#include <axis2_stub.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+axiom_node_t *
+axis2_Calculator_stub_add(axis2_stub_t *stub,
+                        const axis2_env_t *env,
+                        axiom_node_t *node);
+
+axiom_node_t *
+axis2_Calculator_stub_sub(axis2_stub_t *stub,
+                        const axis2_env_t *env,
+                        axiom_node_t *node);
+
+axiom_node_t *
+axis2_Calculator_stub_mul(axis2_stub_t *stub,
+                        const axis2_env_t *env,
+                        axiom_node_t *node);
+
+axiom_node_t *
+axis2_Calculator_stub_div(axis2_stub_t *stub,
+                        const axis2_env_t *env,
+                        axiom_node_t *node);
+/**
+ * populate services
+ */
+void axis2_populate_axis_service( axis2_stub_t* stub, const axis2_env_t *env);
+
+/**
+ * Creates axis2_stub struct
+ * @param endpoint reference
+ * @return pointer to newly created axis2_stub struct
+ */
+axis2_stub_t *
+axis2_Calculator_stub_create_with_endpoint_ref_and_client_home(const axis2_env_t *env,
+                                            axis2_endpoint_ref_t *endpoint_ref,
+                                            axis2_char_t *client_home);
+
+/**
+ * Creates axis2_stub struct
+ * @param endpoint uri
+ * @return pointer to newly created axis2_stub struct
+ */
+axis2_stub_t *
+axis2_Calculator_stub_create_with_endpoint_uri_and_client_home(const axis2_env_t *env,
+                                            const axis2_char_t *endpoint_uri,
+                                            const axis2_char_t *client_home);
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif  /* AXIS2_ECHO_STUB_H */

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/axis2_Calculator_stub.h
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 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=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.bat (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.bat Wed Sep  6 02:20:54 2006
@@ -0,0 +1,31 @@
+@echo off
+
+@REM  Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM  Licensed under the Apache License, Version 2.0 (the "License");
+@REM  you may not use this file except in compliance with the License.
+@REM  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, software
+@REM  distributed under the License is distributed on an "AS IS" BASIS,
+@REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM  See the License for the specific language governing permissions and
+@REM  limitations under the License.
+
+setlocal
+
+if "%AXIS2C_HOME%" == "" (
+echo "AXIS2C_HOME not set"
+goto end
+)
+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
+
+:end
+endlocal

Added: 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=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh Wed Sep  6 02:20:54 2006
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+#  Copyright 2005 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.
+
+APFULLDIR=`pwd`
+
+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
+
+./calculator_wsclient add 4.7 9
+./calculator_wsclient div 7.2 3.6
+./calculator_wsclient mul 7 6

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.h?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.h (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.h Wed Sep  6 02:20:54 2006
@@ -0,0 +1,32 @@
+/*
+ *
+ *  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.
+ */
+
+#ifndef sample_calculator_h
+#define sample_calculator_h
+
+class Calculator  
+{
+public:
+	virtual float add(float arg1, float arg2) = 0;
+	virtual float sub(float arg1, float arg2) = 0;
+	virtual float mul(float arg1, float arg2) = 0;
+	virtual float div(float arg1, float arg2) = 0;
+};
+
+#endif // sample_calculator_h
+
+

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.h
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl Wed Sep  6 02:20:54 2006
@@ -0,0 +1,158 @@
+<?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>
+
+	<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/CalculatorService" />
+		</port>
+	</service>
+</definitions>

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.componentType?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.componentType (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.componentType Wed Sep  6 02:20:54 2006
@@ -0,0 +1,28 @@
+<?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.
+ -->
+ 
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+
+	<service name="CalculatorService">
+		<interface.cpp header="Calculator.h"/>
+	</service>
+
+    <reference name="divideService">
+		<interface.cpp header="Divide.h"/>
+	</reference>
+
+</componentType>
\ No newline at end of file

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.cpp?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.cpp (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.cpp Wed Sep  6 02:20:54 2006
@@ -0,0 +1,85 @@
+/*
+ *
+ *  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.
+ */
+
+#include "CalculatorImpl.h"
+#include <stdio.h>
+
+#include "Divide.h"
+#include "osoa/sca/ComponentContext.h"
+#include "osoa/sca/ServiceRuntimeException.h"
+
+CalculatorImpl::CalculatorImpl()
+{
+}
+    
+CalculatorImpl::~CalculatorImpl()
+{
+}
+
+// Calculator interface
+float CalculatorImpl::add(float arg1, float arg2)
+{
+    float result = arg1 + arg2;
+
+    printf("CalculatorImpl::add %f + %f = %f\n", arg1, arg2, result);
+    return result;
+}
+
+float CalculatorImpl::sub(float arg1, float arg2)
+{
+    float result = arg1 - arg2;
+    printf("CalculatorImpl::sub %f - %f = %f\n", arg1, arg2, result);
+    return result;
+}
+
+float CalculatorImpl::mul(float arg1, float arg2)
+{
+    float result = arg1 * arg2;
+    printf("CalculatorImpl::mul %f * %f = %f\n", arg1, arg2, result);
+    return result;
+}
+
+float CalculatorImpl::div(float arg1, float arg2)
+{
+    float result = 0;
+
+    // This method shows how to invoke a service on a different component from within a component
+
+    // First, get the current ComponentContext
+    osoa::sca::ComponentContext myContext = osoa::sca::ComponentContext::getCurrent();
+
+    try
+    {
+        // Find the required service, as referenced in CalculatorImpl.componentType
+        Divide* divideService = (Divide*)myContext.getService("divideService");
+
+        // Finally, invoke the service
+        result = divideService->divide(arg1, arg2);
+
+        printf("CalculatorImpl::div Divide returned result: %f\n", result);
+
+    }
+    catch (osoa::sca::ServiceRuntimeException& e)
+    {
+        // Print out error message and carry on
+        printf("CalculatorImpl::div Error whilst invoking Divide: %s", e.getMessageText());
+    }
+
+    return result;
+}
+	
+

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.cpp
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.h?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.h (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.h Wed Sep  6 02:20:54 2006
@@ -0,0 +1,37 @@
+/*
+ *
+ *  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.
+ */
+
+#ifndef sample_calculatorimpl_h
+#define sample_calculatorimpl_h
+
+#include "Calculator.h"
+
+class CalculatorImpl : public Calculator
+{
+public:
+    CalculatorImpl();
+    virtual ~CalculatorImpl();
+
+    // Calculator interface
+	virtual float add(float arg1, float arg2);
+	virtual float sub(float arg1, float arg2);
+	virtual float mul(float arg1, float arg2);
+	virtual float div(float arg1, float arg2);
+};
+
+#endif // sample_calculatorimpl_h
+

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.h
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Divide.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Divide.h?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Divide.h (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Divide.h Wed Sep  6 02:20:54 2006
@@ -0,0 +1,30 @@
+/*
+ *
+ *  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.
+ */
+
+
+#ifndef sample_divide_h
+#define sample_divide_h
+
+class Divide  
+{
+public:
+	virtual float divide(float arg1, float arg2) = 0;
+};
+
+#endif // sample_divide_h
+
+

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Divide.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Divide.h
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/DivideImpl.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/DivideImpl.componentType?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/DivideImpl.componentType (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/DivideImpl.componentType Wed Sep  6 02:20:54 2006
@@ -0,0 +1,24 @@
+<?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.
+ -->
+ 
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+
+	<service name="DivideService">
+		<interface.cpp header="Divide.h"/>
+	</service>
+
+</componentType>

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/DivideImpl.rb
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/DivideImpl.rb?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/DivideImpl.rb (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/DivideImpl.rb Wed Sep  6 02:20:54 2006
@@ -0,0 +1,10 @@
+class DivideImpl
+
+	def initialize()
+	end
+	
+	def divide(arg1, arg2)
+		arg1 / arg2
+	end
+
+end
\ No newline at end of file

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Makefile.am?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Makefile.am (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Makefile.am Wed Sep  6 02:20:54 2006
@@ -0,0 +1,32 @@
+deploydir=$(prefix)/samples/RubyCalculator/deploy
+compositedir=$(deploydir)/packages/sample.calculator
+
+BUILT_SOURCES = CalculatorImpl_CalculatorService_Proxy.cpp \
+CalculatorImpl_CalculatorService_Wrapper.cpp \
+CalculatorImpl_divideService_Proxy.cpp
+
+noinst_HEADERS = *.h
+
+${BUILT_SOURCES}: sample.calculator.composite
+	java -jar $(TUSCANY_SCACPP)/bin/scagen.jar -dir . -output .
+
+composite_LTLIBRARIES = libCalculator.la
+composite_DATA = *.composite *.componentType *.wsdl *.rb services.xml
+EXTRA_DIST = *.composite *.componentType *.wsdl *.rb services.xml
+
+libCalculator_la_SOURCES = \
+CalculatorImpl.cpp \
+CalculatorImpl_CalculatorService_Proxy.cpp \
+CalculatorImpl_CalculatorService_Wrapper.cpp \
+CalculatorImpl_divideService_Proxy.cpp
+
+libCalculator_la_LIBADD = \
+-L${TUSCANY_SCACPP}/lib \
+  -ltuscany_sca \
+-L${TUSCANY_SCACPP}/extensions/cpp/lib \
+  -ltuscany_sca_cpp
+
+INCLUDES = \
+-I$(TUSCANY_SCACPP)/extensions/cpp/include \
+-I$(TUSCANY_SCACPP)/include \
+-I${TUSCANY_SDOCPP}/include

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/sample.calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/sample.calculator.composite?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/sample.calculator.composite (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/sample.calculator.composite Wed Sep  6 02:20:54 2006
@@ -0,0 +1,36 @@
+<?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">
+
+	<service name="CalculatorService">
+		<interface.wsdl interface="http://sample/calculator#wsdl.interface(CalculatorPortType)"/>
+		<binding.ws port="http://sample/calculator#wsdl.endpoint(CalculatorService/CalculatorPort)"/>
+		<reference>CalculatorComponent/CalculatorService</reference>
+	</service>
+
+	<component name="CalculatorComponent">
+		<implementation.cpp library="Calculator" header="CalculatorImpl.h"/>
+	    <reference name="divideService">DivideComponent/DivideService</reference>
+	</component>
+        
+	<component name="DivideComponent">
+		<implementation.ruby script="DivideImpl.rb" class="DivideImpl"/>
+	</component>
+
+</composite>
\ No newline at end of file

Added: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/services.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/services.xml?view=auto&rev=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/services.xml (added)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/services.xml Wed Sep  6 02:20:54 2006
@@ -0,0 +1,42 @@
+<?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.
+ -->
+<service name="CalculatorService">
+    <parameter name="ServiceClass" locked="xsd:false">tuscany_sca_ws_service</parameter>
+    <parameter name="TuscanySystemRoot" locked="xsd:false">PATH-TO-THE-SYSTEM-ROOT</parameter>
+    <parameter name="TuscanyService" locked="xsd:false">sample.calculator.CalculatorComponent/CalculatorService</parameter>
+
+   <description>
+        This is a sample SCA service implemented with two components wired together
+   </description>
+
+    <operation name="add">
+            <!--messageReceiver class="axis2_receivers" /-->
+    </operation>
+
+    <operation name="sub">
+            <!--messageReceiver class="axis2_receivers" /-->
+    </operation>
+
+    <operation name="mul">
+            <!--messageReceiver class="axis2_receivers" /-->
+    </operation>
+
+    <operation name="div">
+            <!--messageReceiver class="axis2_receivers" /-->
+    </operation>
+
+</service>

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/services.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/services.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/cpp/sca/samples/configure.ac
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/configure.ac?view=diff&rev=440664&r1=440663&r2=440664
==============================================================================
--- incubator/tuscany/cpp/sca/samples/configure.ac (original)
+++ incubator/tuscany/cpp/sca/samples/configure.ac Wed Sep  6 02:20:54 2006
@@ -21,6 +21,10 @@
                  Calculator/CalculatorComposite/Makefile
                  Calculator/Client/Makefile
                  Calculator/WSClient/Makefile
+                 RubyCalculator/Makefile
+                 RubyCalculator/sample.calculator/Makefile
+                 RubyCalculator/sample.calculator.client/Makefile
+                 RubyCalculator/sample.calculator.wsclient/Makefile
                  BigBank/Makefile
                  BigBank/Accounts/Makefile
                  BigBank/WSAccountClient/Makefile



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


Mime
View raw message