diff options
Diffstat (limited to 'tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client')
7 files changed, 0 insertions, 214 deletions
diff --git a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/CalculatorClient.cpp b/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/CalculatorClient.cpp deleted file mode 100644 index e72b52f87e..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/CalculatorClient.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* $Rev$ $Date$ */ - -// some strangeness in the build that causes -// WinSock.h and WinSock2.h to be included leading to redefinitions -//#define _WINSOCKAPI_ - - -#include <iostream> - -#include <php_embed.h> - -#include <string> - -#include "commonj/sdo/SDO.h" - -#include "osoa/sca/sca.h" - -#include "Calculator.h" - - -using namespace std; -using namespace commonj::sdo; -using namespace osoa::sca; - - -int main (int argc, char** argv) -{ - - try - { - CompositeContext myContext = CompositeContext::getCurrent(); - Calculator *calcService = (Calculator*) myContext.locateService("CalculatorCPPComponent/CalculatorService"); - float result = calcService->div(10, 2); - cout << "calculator_client: div(10,2) = " << result << endl; - } - catch (...) - { - printf("Got and exception"); - } - - return 0; -} diff --git a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/CalculatorClient.php b/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/CalculatorClient.php deleted file mode 100644 index 7a512260ae..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/CalculatorClient.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -# 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. -# -# - -include 'SCA/SCA.php'; - -// Get a proxy to the local Calculator.php -$service = SCA::getService('../sample.calculator/Calculator.php'); - -// Call the local service and write out the response -echo "add(1.23, 4.56) = " . $service->add(1.23, 4.56) . "\n"; -echo "sub(1.23, 4.56) = " . $service->sub(1.23, 4.56) . "\n"; -echo "mul(1.23, 4.56) = " . $service->mul(1.23, 4.56) . "\n"; -echo "div(1.23, 4.56) = " . $service->div(1.23, 4.56) . "\n"; - -?> diff --git a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/Makefile b/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/Makefile deleted file mode 100644 index c335defb89..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-INCLUDES = \
--I/usr/local/include/php \
--I/usr/local/include/php/sapi/embed \
--I/usr/local/include/php/Zend \
--I/usr/local/include/php/main \
--I/usr/local/include/php/TSRM \
--I${TUSCANY_SDOCPP}/include \
--I${TUSCANY_SCACPP}/include \
--I${TUSCANY_SCACPP}/extensions/cpp/include \
--I${TUSCANY_SCACPP}/samples/CppCalculator/sample.calculator
-
-FLAGS = \
--g \
--O2 \
--MD \
--MP \
--fPIC \
--DPIC
-
-LIBS = \
--L${LIBXML2_LIB} \
--L${$AXIS2C_HOME}/lib \
--L${PHP_LIB} \
--L${TUSCANY_SDOCPP}/lib \
--L${TUSCANY_SCACPP}/lib \
--L${TUSCANY_SCACPP}/extensions/cpp/lib \
--L${TUSCANY_SCACPP}/extensions/php/lib \
--L${TUSCANY_SCACPP}/extensions/ws/lib \
--lphp5 \
--ltuscany_sdo \
--ltuscany_sca \
--ltuscany_sca_cpp
-
-phpembedtest:
- g++ $(INCLUDES) $(FLAGS) $(LIBS) CalculatorClient.cpp
-
diff --git a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/env.sh b/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/env.sh deleted file mode 100755 index a2fa6eadc3..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/env.sh +++ /dev/null @@ -1,29 +0,0 @@ -export AXIS2C_HOME=/home/slaws/apps/axis2c-bin-0.96-linux - -export LIBXML2_LIB=/usr/lib -export LIBXML2_INCLUDE=/usr/include/libxml2 - -export PHP_LIB=/usr/local/lib -export PHP_INCLUDE=/usr/local/include/php - -export PHP_SCA_SDO_INCLUDE=/home/slaws/phpbuild-5-2/pecl/SDO -export PHP_SCA_SDO_LIB=$PHP_LIB/php/extensions/no-debug-zts-20060613/ - -export TUSCANY_SDOCPP=/sdo/deploy -export TUSCANY_SCACPP=/usr/local/tuscany/cpp/sca/deploy - -export LD_LIBRARY_PATH=$LIBXML2_LIB:\ -$AXIS2C_HOME/lib:\ -$PHP_LIB:\ -$TUSCANY_SDOCPP/lib:\ -$TUSCANY_SCACPP/lib:\ -$TUSCANY_SCACPP/extensions/cpp/lib:\ -$TUSCANY_SCACPP/extensions/php/lib:\ -$TUSCANY_SCACPP/extensions/ws/lib:\ -$TUSCANY_SCACPP/samples/PHPCalculator/deploy/sample.calculator:\ -$PHP_SCA_SDO_LIB - -export TUSCANY_SCACPP_LOGGING=9 -export TUSCANY_SCACPP_ROOT=/usr/local/tuscany/cpp/sca/deploy/samples/PHPCalculator - -export PATH=.:$PATH diff --git a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/runclient_cpp.bat b/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/runclient_cpp.bat deleted file mode 100644 index 655cef9ceb..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/runclient_cpp.bat +++ /dev/null @@ -1,7 +0,0 @@ -set TUSCANY_SCACPP_ROOT=%TUSCANY_SCACPP%\samples\PHPCalculator\deploy
-set TUSCANY_SCACPP_COMPONENT=sample.calculator.CalculatorComponent
-set TUSCANY_SCACPP_LOGGING=9
-set PHRC=C:\simon\Projects\Tuscany\php\php-5.2.0\Debug_TS
-
-calculator_client.exe
-
diff --git a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/runclient_cpp.sh b/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/runclient_cpp.sh deleted file mode 100755 index e98e06c73f..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/runclient_cpp.sh +++ /dev/null @@ -1,7 +0,0 @@ -export TUSCANY_SCACPP_ROOT=/usr/local/tuscany/cpp/sca/deploy/samples/PHPCalculator -export TUSCANY_SCACPP_COMPONENT=sample.calculator.CalculatorComponent - -a.out -# gdb a.out -# strace a.out &> strace.txt -# valgrind a.out diff --git a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/runclient_php.bat b/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/runclient_php.bat deleted file mode 100644 index 815c4fb58e..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/samples/PHPCalculator/sample.calculator.client/runclient_php.bat +++ /dev/null @@ -1,25 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -php TuscanyTest.php - -:end -endlocal |