You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by aj...@apache.org on 2007/02/02 16:28:05 UTC
svn commit: r502623 [3/3] - in /incubator/tuscany/cpp/sca:
VSExpress/tuscany_sca/tuscany_sca_php/ runtime/core/src/tuscany/sca/core/
runtime/core/src/tuscany/sca/model/ runtime/core/src/tuscany/sca/util/
runtime/extensions/php/ runtime/extensions/php/s...
Added: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl.h?view=auto&rev=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl.h (added)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl.h Fri Feb 2 07:28:01 2007
@@ -0,0 +1,39 @@
+/*
+ * 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$ */
+
+
+#ifndef sample_divideimpl_h
+#define sample_divideimpl_h
+
+#include "Divide.h"
+
+class DivideImpl : public Divide
+{
+public:
+ DivideImpl();
+ virtual ~DivideImpl();
+
+ // Divide interface
+ virtual float div(float arg1, float arg2);
+};
+
+#endif // sample_divideimpl_h
+
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl.h
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Proxy.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Proxy.cpp?view=auto&rev=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Proxy.cpp (added)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Proxy.cpp Fri Feb 2 07:28:01 2007
@@ -0,0 +1,65 @@
+/*
+ * 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 "DivideImpl_DivideService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ DivideImpl_DivideService_Proxy* DivideImpl_DivideService_Proxy_Factory(tuscany::sca::ServiceWrapper* target)
+ {
+ return new DivideImpl_DivideService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void DivideImpl_DivideService_Proxy_Destructor(void* proxy)
+ {
+ delete (DivideImpl_DivideService_Proxy*)proxy;
+ }
+}
+
+DivideImpl_DivideService_Proxy::DivideImpl_DivideService_Proxy(tuscany::sca::ServiceWrapper* targ) : target(targ)
+{
+}
+
+DivideImpl_DivideService_Proxy::~DivideImpl_DivideService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float DivideImpl_DivideService_Proxy::div( float arg0, float arg1)
+{
+ tuscany::sca::Operation operation("div");
+ operation.addParameter("num1", &arg0);
+ operation.addParameter("num2", &arg1);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return *(float*)operation.getReturnValue();
+}
+
+
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Proxy.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Proxy.cpp
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Proxy.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Proxy.h?view=auto&rev=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Proxy.h (added)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Proxy.h Fri Feb 2 07:28:01 2007
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+#ifndef DivideImpl_DivideService_Proxy_h
+#define DivideImpl_DivideService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "Divide.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class DivideImpl_DivideService_Proxy : public Divide
+{
+public:
+ DivideImpl_DivideService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~DivideImpl_DivideService_Proxy();
+ virtual float div( float num1, float num2);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // DivideImpl_DivideService_Proxy_h
+
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Proxy.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Proxy.h
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Wrapper.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Wrapper.cpp?view=auto&rev=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Wrapper.cpp (added)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Wrapper.cpp Fri Feb 2 07:28:01 2007
@@ -0,0 +1,84 @@
+/*
+ * 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 "DivideImpl_DivideService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ DivideImpl_DivideService_Wrapper* DivideImpl_DivideService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new DivideImpl_DivideService_Wrapper(target);
+ }
+}
+
+DivideImpl_DivideService_Wrapper::DivideImpl_DivideService_Wrapper(tuscany::sca::model::Service* target) : tuscany::sca::cpp::CPPServiceWrapper(target)
+{
+ impl = (DivideImpl*)getImplementation();
+}
+
+DivideImpl_DivideService_Wrapper::~DivideImpl_DivideService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* DivideImpl_DivideService_Wrapper::newImplementation()
+{
+ return new DivideImpl;
+}
+
+void DivideImpl_DivideService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void DivideImpl_DivideService_Wrapper::invokeService(tuscany::sca::Operation& operation)
+{
+ const std::string& operationName = operation.getName();
+
+ if (operationName == "div")
+ {
+ float& p0 = *( float*)operation.getParameterValue(0);
+ float& p1 = *( float*)operation.getParameterValue(1);
+
+ if(operation.getReturnValue() != NULL)
+ {
+ *(float*)operation.getReturnValue() = impl->div(p0, p1);
+ }
+ else
+ {
+ float* ret = new float;
+ *ret = impl->div(p0, p1);
+ operation.setReturnValue((const float*)ret);
+ }
+ return;
+ }
+
+
+ throw osoa::sca::ServiceRuntimeException("Invalid operation");
+
+}
+
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Wrapper.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Wrapper.cpp
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Wrapper.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Wrapper.h?view=auto&rev=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Wrapper.h (added)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Wrapper.h Fri Feb 2 07:28:01 2007
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+#ifndef DivideImpl_DivideService_Wrapper_h
+#define DivideImpl_DivideService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "DivideImpl.h"
+#include "tuscany/sca/cpp/CPPServiceWrapper.h"
+
+class DivideImpl_DivideService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper
+{
+public:
+ DivideImpl_DivideService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~DivideImpl_DivideService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ DivideImpl* impl;
+};
+
+#endif // DivideImpl_DivideService_Wrapper_h
+
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Wrapper.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/DivideImpl_DivideService_Wrapper.h
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.componentType?view=auto&rev=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.componentType (added)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.componentType Fri Feb 2 07:28:01 2007
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="LogService">
+ <interface.cpp header="Log.h"/>
+ </service>
+</componentType>
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.componentType
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.componentType
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.h?view=auto&rev=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.h (added)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.h Fri Feb 2 07:28:01 2007
@@ -0,0 +1,34 @@
+/*
+ * 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$ */
+
+
+#ifndef sample_log_h
+#define sample_log_h
+
+class Log
+{
+ public:
+ virtual void div(char *message) = 0;
+};
+
+#endif // sample_log_h
+
+
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.h
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.php
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.php?view=auto&rev=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.php (added)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.php Fri Feb 2 07:28:01 2007
@@ -0,0 +1,36 @@
+<?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.
+#
+#
+
+/**
+ * @service
+ */
+class Log {
+
+ /**
+ * Log
+ *
+ * @param string $message (the message to be logged)
+ */
+ function log_message($message) {
+ SCA::$logger->toLog('>>> ' . $message);
+ }
+}
+
+?>
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.php
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Log.php
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Makefile.am?view=auto&rev=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Makefile.am (added)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Makefile.am Fri Feb 2 07:28:01 2007
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+deploydir=$(prefix)/samples/PHPCalculator/deploy
+compositedir=$(deploydir)/sample.calculator
+
+BUILT_SOURCES = scagen
+
+noinst_HEADERS = *.h
+
+scagen:
+ java -jar $(TUSCANY_SCACPP)/bin/scagen.jar -dir . -output .
+
+composite_SCRIPTS = runwsserver.sh
+
+composite_LTLIBRARIES = libCalculator.la
+composite_DATA = *.composite *.componentType *.wsdl *.php
+EXTRA_DIST = *.composite *.componentType *.wsdl *.php runwsserver.sh
+
+dist_libCalculator_la_SOURCES = \
+CalculatorImpl.cpp \
+DivideImpl.cpp
+
+nodist_libCalculator_la_SOURCES = \
+CalculatorImpl_CalculatorService_Proxy.cpp \
+CalculatorImpl_CalculatorService_Wrapper.cpp \
+CalculatorImpl_divideService_Proxy.cpp \
+DivideImpl_DivideService_Proxy.cpp \
+DivideImpl_DivideService_Wrapper.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
+
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Makefile.am
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Makefile.am
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Multiply.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Multiply.componentType?view=diff&rev=502623&r1=502622&r2=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Multiply.componentType (original)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Multiply.componentType Fri Feb 2 07:28:01 2007
@@ -22,4 +22,7 @@
<service name="MultiplyService">
<interface.cpp header="Multiply.h"/>
</service>
+ <reference name="log_service">
+ <interface.cpp header="Log.h"/>
+ </reference>
</componentType>
Modified: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Multiply.php
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Multiply.php?view=diff&rev=502623&r1=502622&r2=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Multiply.php (original)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Multiply.php Fri Feb 2 07:28:01 2007
@@ -17,23 +17,16 @@
# under the License.
#
#
+require 'SCA/SCA.php';
-
-/**
- * @service
- * @binding.php
- */
class Multiply {
-
- /**
- * Division
- *
- * @param float $num1 (the first number)
- * @param float $num2 (the second number)
- * @return float The result
- */
function mul($num1, $num2) {
- return $num1 * $num2;
+ $result = $num1 * $num2;
+
+ $log_proxy = SCA::getService("log_service");
+ $log_proxy->log_message($result);
+
+ return $result;
}
}
Modified: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Subtract.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Subtract.componentType?view=diff&rev=502623&r1=502622&r2=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Subtract.componentType (original)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Subtract.componentType Fri Feb 2 07:28:01 2007
@@ -22,4 +22,8 @@
<service name="SubtractService">
<interface.cpp header="Subtract.h"/>
</service>
+
+ <reference name="log_service">
+ <interface.cpp header="Log.h"/>
+ </reference>
</componentType>
Modified: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Subtract.php
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Subtract.php?view=diff&rev=502623&r1=502622&r2=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Subtract.php (original)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/Subtract.php Fri Feb 2 07:28:01 2007
@@ -17,12 +17,14 @@
# under the License.
#
#
+require 'SCA/SCA.php';
-class Subtract
-{
- public function sub($num1, $num2)
- {
- return $num1 - $num2;
- }
+function sub($num1, $num2){
+ $result = $num1 - $num2;
+
+ $log_proxy = SCA::getService("log_service");
+ $log_proxy->log_message($result);
+
+ return $result;
}
?>
Modified: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/runwsserver.bat
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/runwsserver.bat?view=diff&rev=502623&r1=502622&r2=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/runwsserver.bat (original)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/runwsserver.bat Fri Feb 2 07:28:01 2007
@@ -1,49 +0,0 @@
-@echo off
-
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements. See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership. The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing,
-@REM software distributed under the License is distributed on an
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@REM KIND, either express or implied. See the License for the
-@REM specific language governing permissions and limitations
-@REM under the License.
-
-setlocal
-
-if "%TUSCANY_SCACPP%" == "" (
-echo "TUSCANY_SCACPP not set"
-goto end
-)
-echo using SCA installed at %TUSCANY_SCACPP%
-
-if "%TUSCANY_SDOCPP%" == "" (
-echo "TUSCANY_SDOCPP not set"
-goto end
-)
-echo using SDO installed at %TUSCANY_SDOCPP%
-
-if "%AXIS2C_HOME%" == "" (
-echo "AXIS2C_HOME not set"
-goto end
-)
-echo using Axis2C installed at %AXIS2C_HOME%
-
-set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\php\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
-
-set TUSCANY_SCACPP_ROOT=%~d0%~p0\..\
-
-cd %AXIS2C_HOME%\bin
-.\axis2_http_server.exe
-
-:end
-endlocal
-
Added: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/runwsserver.sh
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/runwsserver.sh?view=auto&rev=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/runwsserver.sh (added)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/runwsserver.sh Fri Feb 2 07:28:01 2007
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+APFULLDIR=`pwd`
+
+if [ x$TUSCANY_SCACPP = x ]; then
+echo "TUSCANY_SCACPP not set"
+exit;
+fi
+echo "Using SCA installed at $TUSCANY_SCACPP"
+
+if [ x$TUSCANY_SDOCPP = x ]; then
+echo "TUSCANY_SDOCPP not set"
+exit;
+fi
+echo "Using SDO installed at $TUSCANY_SDOCPP"
+
+if [ x$AXIS2C_HOME = x ]; then
+echo "AXIS2C_HOME not set"
+exit;
+fi
+echo "Using Axis2C installed at $AXIS2C_HOME"
+
+export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SCACPP/extensions/cpp/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+
+export TUSCANY_SCACPP_ROOT=$APFULLDIR/../
+
+cd $AXIS2C_HOME/bin
+./axis2_http_server
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/runwsserver.sh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/runwsserver.sh
------------------------------------------------------------------------------
svn:executable = *
Propchange: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/runwsserver.sh
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/sample.calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/sample.calculator.composite?view=diff&rev=502623&r1=502622&r2=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/sample.calculator.composite (original)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/sample.calculator.composite Fri Feb 2 07:28:01 2007
@@ -24,39 +24,57 @@
<service name="CalculatorService">
<interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"/>
<binding.ws/>
- <reference>AddComponent</reference>
+ <reference>CalculatorCPPComponent</reference>
</service>
+
+ <component name="CalculatorCPPComponent">
+ <implementation.cpp library="Calculator" header="CalculatorImpl.h"/>
+ <reference name="divideService">DivideComponent/DivideService</reference>
+ </component>
-<!--
- <component name="CalculatorComponent">
+ <component name="CalculatorPHPComponent">
<implementation.php module="Calculator" scope="composite"/>
<reference name="add_service">AddComponent</reference>
<reference name="sub_service">SubtractComponent</reference>
<reference name="mul_service">MultiplyComponent</reference>
<reference name="div_service">DivideComponent</reference>
</component>
--->
+
<component name="AddComponent">
<implementation.php module="Add" scope="composite"/>
+ <reference name="log_service">LogComponent</reference>
</component>
-<!--
+
<component name="SubtractComponent">
- <implementation.php module="Subtract" class="Subtract" scope="composite"/>
+ <implementation.php module="Subtract" scope="composite"/>
+ <reference name="log_service">LogComponent</reference>
</component>
<component name="MultiplyComponent">
- <implementation.php module="Multiply" scope="composite"/>
- </component>
+ <implementation.php module="Multiply" class="Multiply" scope="composite"/>
+ <reference name="log_service">LogComponent</reference>
+ </component>
<component name="DivideComponent">
- <implementation.php module="Divide" scope="composite"/>
- </component>
--->
-<!--
- <reference name="DivideReference">
- <interface.wsdl interface="http://sample/calculator#wsdl.interface(Divide)"/>
- <binding.ws endpoint="http://sample/calculator#wsdl.endpoint(DivideService/DividePort)"/>
- </reference>
--->
+ <implementation.php module="Divide" class="Divide" scope="composite"/>
+ <reference name="cppDivideService">DivideCPPComponent/DivideService</reference>
+ <reference name="add_service">AddComponent</reference>
+ <reference name="multiply_service">MultiplyComponent</reference>
+ <reference name="subtract_service">SubtractComponent</reference>
+ <reference name="add_service">AddComponent</reference>
+ </component>
+
+ <component name="DivideCPPComponent">
+ <implementation.cpp library="Calculator" header="DivideImpl.h"/>
+ </component>
+
+ <component name="LogComponent">
+ <implementation.php module="Log" class="Log" scope="composite"/>
+ </component>
+
+
+
+
+
</composite>
Modified: incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/sample.calculator.composite.back
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/sample.calculator.composite.back?view=diff&rev=502623&r1=502622&r2=502623
==============================================================================
--- incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/sample.calculator.composite.back (original)
+++ incubator/tuscany/cpp/sca/samples/PHPCalculator/sample.calculator/sample.calculator.composite.back Fri Feb 2 07:28:01 2007
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- name="sample.calculator">
-
- <service name="CalculatorService">
- <interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"/>
- <binding.ws/>
- <reference>MultiplyComponent</reference>
- </service>
-
- <component name="CalculatorComponent">
- <implementation.php module="Calculator" scope="composite"/>
- <reference name="mul_service">MultiplyComponent</reference>
- <reference name="div_service">DivideComponent</reference>
- </component>
-
- <!-- subtract component is not referenced by the -->
- <!-- CalculatorComponent using SCA -->
- <component name="SubtractComponent">
- <implementation.php module="Subtract" scope="composite"/>
- </component>
-
- <component name="MultiplyComponent">
- <implementation.php module="Multiply" class="Multiply" scope="composite"/>
- </component>
-
- <component name="DivideComponent">
- <implementation.php module="Divide" scope="composite"/>
- </component>
-
-</composite>
-
-<!--
- <component name="CalculatorComponent">
- <implementation.php module="CalculatorImpl" scope="composite"/>
- <reference name="divideService">DivideComponent</reference>
- </component>
--->
-
-<!--
- <property name="doRounding">true</property>
--->
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org