summaryrefslogtreecommitdiffstats
path: root/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-16 06:37:38 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-16 06:37:38 +0000
commitd36c8e323a6f8df998edd185de8972dc5e6f87f0 (patch)
tree2a402b87f045e8066fcf7743e8654728977f6a8a /sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue
parent034ecc7803559acdda5dd6c54ecc081665b19f61 (diff)
Cleaning up SVN structure, moving tag under sca-cpp/tags.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@880619 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue')
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtbuild43
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtproject15
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.project19
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs9
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/Makefile.am17
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValue.h34
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.cpp159
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.h39
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.cpp100
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h37
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp89
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h36
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp64
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h34
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp66
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h34
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/StockQuoteService.h32
17 files changed, 827 insertions, 0 deletions
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtbuild b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtbuild
new file mode 100644
index 0000000000..acc65c20f2
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtbuild
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?fileVersion 3.0.0?>
+
+<ManagedProjectBuildInfo>
+<project id="tuscany_sca_test_MyValue.cdt.managedbuild.target.gnu.so.757075771" name="Shared Library (Gnu)" projectType="cdt.managedbuild.target.gnu.so">
+<configuration artifactExtension="so" artifactName="MyValue" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.so.debug.903609302" name="Debug" parent="cdt.managedbuild.config.gnu.so.debug">
+<toolChain id="cdt.managedbuild.toolchain.gnu.so.debug.255326897" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.so.debug">
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.so.debug.1055337069" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.so.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.so.debug.1856329612" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.so.debug">
+<option id="gnu.cpp.compiler.option.preprocessor.def.1031467482" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+<listOptionValue builtIn="false" value="_DEBUG"/>
+</option>
+<option id="gnu.cpp.compiler.option.include.paths.571240659" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/src"/>
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/test/CustomerInfo"/>
+<listOptionValue builtIn="false" value="${SDO4CPP}/include"/>
+</option>
+</tool>
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.linker.so.debug.1169623816" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.so.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.linker.so.debug.578216644" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.so.debug"/>
+<tool command="as" id="cdt.managedbuild.tool.gnu.assembler.so.debug.1431997590" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.so.debug"/>
+<macros/>
+</toolChain>
+</configuration>
+<configuration artifactExtension="so" artifactName="MyValue" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.so.release.1558347965" name="Release" parent="cdt.managedbuild.config.gnu.so.release">
+<toolChain id="cdt.managedbuild.toolchain.gnu.so.release.957726846" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.so.release">
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.so.release.625045304" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.so.release"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.so.release.1998422811" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.so.release">
+<option id="gnu.cpp.compiler.option.include.paths.687314264" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/src"/>
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/test/CustomerInfo"/>
+<listOptionValue builtIn="false" value="${SDO4CPP}/include"/>
+</option>
+</tool>
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.linker.so.release.1598091246" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.so.release"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.linker.so.release.1373242294" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.so.release"/>
+<tool command="as" id="cdt.managedbuild.tool.gnu.assembler.so.release.1820024298" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.so.release"/>
+<macros/>
+</toolChain>
+</configuration>
+<macros/>
+</project>
+</ManagedProjectBuildInfo>
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtproject b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtproject
new file mode 100644
index 0000000000..48a12e6664
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtproject
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse-cdt version="2.0"?>
+
+<cdtproject id="org.eclipse.cdt.managedbuilder.core.managedMake">
+<extension id="org.eclipse.cdt.managedbuilder.core.ManagedBuildManager" point="org.eclipse.cdt.core.ScannerInfoProvider"/>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.domsourceindexer" point="org.eclipse.cdt.core.CIndexer"/>
+<data>
+<item id="org.eclipse.cdt.core.pathentry">
+<pathentry kind="src" path=""/>
+<pathentry kind="out" path=""/>
+<pathentry kind="con" path="org.eclipse.cdt.managedbuilder.MANAGED_CONTAINER"/>
+</item>
+</data>
+</cdtproject>
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.project b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.project
new file mode 100644
index 0000000000..113442bfd8
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.project
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>tuscany_sca_test_MyValue</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ </natures>
+</projectDescription>
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs
new file mode 100644
index 0000000000..4c585d5bb1
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs
@@ -0,0 +1,9 @@
+#Tue Nov 29 15:11:39 GMT 2005
+eclipse.preferences.version=1
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.903609302=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="CPATH" operation\="remove"/>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.1558347965=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="CPATH" operation\="remove"/>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.903609302=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="LIBRARY_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.1558347965=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="LIBRARY_PATH" operation\="remove"/>\n</environment>\n
+environment/project=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
+environment/project/cdt.managedbuild.config.gnu.so.debug.903609302=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
+environment/project/cdt.managedbuild.config.gnu.so.release.1558347965=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/Makefile.am
new file mode 100644
index 0000000000..c6ea61654b
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/Makefile.am
@@ -0,0 +1,17 @@
+lib_LTLIBRARIES = libMyValue.la
+
+libMyValue_la_SOURCES = \
+MyValueImpl.cpp \
+MyValueImpl_customerInfo_Proxy.cpp \
+MyValueImpl_MyValueService_Proxy.cpp \
+MyValueImpl_MyValueService_Wrapper.cpp \
+MyValueImpl_stockQuote_Proxy.cpp
+
+libMyValue_la_LIBADD =
+
+INCLUDES = -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include \
+ -I${AXISCPP_DEPLOY}/include \
+ -I../CustomerInfo
+
+install: \ No newline at end of file
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValue.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValue.h
new file mode 100644
index 0000000000..710910f08c
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValue.h
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef MyValue_h
+#define MyValue_h
+#include <string>
+using std::string;
+class MyValue
+{
+public:
+ virtual float getMyValue(const char* customerID) = 0;
+ virtual float getMyValueS(const string& customerID) = 0;
+ virtual string getCustname(string& customerID) = 0;
+ virtual const string& getCustnamecs(string customerID) = 0;
+
+};
+
+#endif
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.cpp
new file mode 100644
index 0000000000..8d45eac6e9
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.cpp
@@ -0,0 +1,159 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "MyValueImpl.h"
+#include "CustomerInfo.h"
+#include "StockQuoteService.h"
+#include <iostream>
+using namespace std;
+
+#include "osoa/sca/sca.h"
+#include "commonj/sdo/SDO.h"
+using namespace osoa::sca;
+using namespace commonj::sdo;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+MyValueImpl::MyValueImpl()
+{
+ cout << "Construct MyValueImpl" << endl;
+
+}
+
+MyValueImpl::~MyValueImpl()
+{
+ cout << "Destroy MyValueImpl" << endl;
+}
+
+//////////////////////////////////////////////////////////////////////
+// Other methods
+//////////////////////////////////////////////////////////////////////
+float MyValueImpl::getMyValue(const char *customerID)
+{
+ cout << "In getMyValue with customerid: " << customerID << endl;
+
+
+ ComponentContext myContext = ComponentContext::getCurrent();
+ CustomerInfo* customerInfoService = (CustomerInfo*)myContext.getService("customerInfo");
+
+ if (customerInfoService == 0)
+ {
+ cout << "unable to find customer info service" << endl;
+
+ return 0.0f;
+ }
+
+ const char * stock;
+ try
+ {
+ stock = customerInfoService->getCustomerInformation(customerID);
+ }
+ catch(const char* x)
+ {
+ cout << "Exception caught: " << x <<endl;
+ throw;
+ }
+
+ ServiceList serviceList = myContext.getServices("customerInfo");
+
+ for (unsigned int i=0; i<serviceList.size();i++)
+ {
+ CustomerInfo* service = (CustomerInfo*)(serviceList[i]);
+ stock = service->getCustomerInformation(customerID);
+ cout << "Stock from getServices " << i << " : " << stock <<endl;
+
+ }
+
+ // Use a second SCA reference to get the stock price
+ StockQuoteService* stockQuoteService = (StockQuoteService*)myContext.getService("stockQuote");
+
+ if (stockQuoteService == 0)
+ {
+ cout << "unable to find stock quote service" << endl;
+
+ return 0.1f;
+ }
+
+ // Create a data object representing the requests (use dynamic API until static is available)
+ DataObjectPtr requestDO;
+
+ try {
+ DataFactoryPtr factory = myContext.getDataFactory();
+ requestDO = factory->create("http://swanandmokashi.com", "GetQuotes");
+ requestDO->setCString("QuoteTicker", stock);
+ } catch (SDORuntimeException e)
+ {
+ cout << e;
+ }
+
+ // Invoke the service
+ DataObjectPtr result = stockQuoteService->GetStockQuotes(requestDO);
+
+ float stockPrice = 0.2f;
+
+ try {
+ float stockPrice = result->getDataObject("GetQuotesResult")->getList("Quote")[0]->getFloat("StockQuote");
+ //dataobjectlist& dlist = result->getdataobject("getquotesresult")->getlist("quote");
+ //DataObjectList& dlist = result->getDataObject("GetQuotesResult")->getList((unsigned int)0);
+ //float stockPrice = result->getDataObject("GetQuotesResult")->getList(0u)[0]->getFloat("StockQuote");
+ cout << "My stock price is " << stockPrice << endl;
+ //float stockPrice=((DataObject)result.getDataObject("GetQuotesResult").getList(0).get(0)).getFloat("StockQuote");
+ // System.out.println(" [getMyValue] stock quote = "+stockPrice);
+ } catch (SDORuntimeException e)
+ {
+ cout << e;
+ }
+
+ return stockPrice;
+
+ /*
+ // Dummy method
+
+ if (!strcmp(stock, "IBM"))
+ return 99.999f;
+ else
+ return 31.05f;
+ */
+
+}
+
+float MyValueImpl::getMyValueS(const string& customerID)
+{
+ cout << "In getMyValueS with customerid: " << customerID.c_str() << endl;
+ return 87.35f;
+}
+
+string MyValueImpl::getCustname(string& customerID)
+{
+ cout << "In getCustname with customerid: " << customerID.c_str() << endl;
+ customerID = "FRED";
+ cout << "setting customer name to " << customerID.c_str() <<endl;
+ return "done";
+}
+
+static string fred("FEREDDEYY");
+const string& MyValueImpl::getCustnamecs(string customerID)
+{
+ cout << "In getCustname with customerid: " << customerID.c_str() << endl;
+ customerID = "FRED";
+ cout << "setting customer name to " << customerID.c_str() <<endl;
+ return fred;
+}
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.h
new file mode 100644
index 0000000000..fa4053692e
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.h
@@ -0,0 +1,39 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef MyValueImpl_h
+#define MyValueImpl_h
+
+#include "MyValue.h"
+
+
+
+class MyValueImpl : public MyValue
+{
+public:
+ MyValueImpl();
+ virtual ~MyValueImpl();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname(string& customerID);
+ virtual const string& getCustnamecs(string customerID);
+
+};
+
+#endif
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.cpp
new file mode 100644
index 0000000000..c83eb661ca
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.cpp
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ */
+
+#include "MyValueImpl_MyValueService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_MyValueService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_MyValueService_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValue(const char* arg0)
+{
+ Operation operation("getMyValue", 1);
+ operation.setParameter(0, (void*)arg0);
+
+ float ret;
+ operation.setReturnValue((void*)&ret);
+ target->invoke(operation);
+ return ret;
+
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0)
+{
+ Operation operation("getMyValueS", 1);
+ operation.setParameter(0, (void*)&arg0);
+
+ float ret;
+ operation.setReturnValue((void*)&ret);
+ target->invoke(operation);
+ return ret;
+
+}
+
+string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0)
+{
+ Operation operation("getCustname", 1);
+ operation.setParameter(0, (void*)&arg0);
+
+ string ret;
+ operation.setReturnValue((void*)&ret);
+ target->invoke(operation);
+ return ret;
+
+}
+
+const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0)
+{
+ Operation operation("getCustnamecs", 1);
+ operation.setParameter(0, (void*)&arg0);
+
+
+ target->invoke(operation);
+ return *(const string*)operation.getReturnValue();
+
+}
+
+
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h
new file mode 100644
index 0000000000..38f22384b0
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Proxy_h
+#define MyValueImpl_MyValueService_Proxy_h
+
+#include "MyValue.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Proxy : public MyValue
+{
+public:
+ MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_MyValueService_Proxy();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname( string& customerID);
+ virtual const string& getCustnamecs( string customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_MyValueService_Proxy_h
+
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp
new file mode 100644
index 0000000000..d9337c9341
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+
+#include "MyValueImpl_MyValueService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new MyValueImpl_MyValueService_Wrapper(target);
+ }
+}
+
+MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (MyValueImpl*)getImplementation();
+}
+
+MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* MyValueImpl_MyValueService_Wrapper::newImplementation()
+{
+ return new MyValueImpl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getMyValue")
+ {
+ const char* p0 = (const char*)operation.getParameter(0);
+ *(float*)operation.getReturnValue() = impl->getMyValue(p0);
+ return;
+ }
+ if (operationName == "getMyValueS")
+ {
+ string& p0 = *(string*)operation.getParameter(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueS(p0);
+ return;
+ }
+ if (operationName == "getCustname")
+ {
+ string& p0 = *(string*)operation.getParameter(0);
+ *(string*)operation.getReturnValue() = impl->getCustname(p0);
+ return;
+ }
+ if (operationName == "getCustnamecs")
+ {
+ string& p0 = *( string*)operation.getParameter(0);
+ const string& ret = impl->getCustnamecs(p0);
+ operation.setReturnValue((void*)&ret);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h
new file mode 100644
index 0000000000..9179537ceb
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Wrapper_h
+#define MyValueImpl_MyValueService_Wrapper_h
+
+#include "MyValueImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~MyValueImpl_MyValueService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ MyValueImpl* impl;
+};
+
+#endif // MyValueImpl_MyValueService_Wrapper_h
+
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp
new file mode 100644
index 0000000000..7625556203
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+
+#include "MyValueImpl_customerInfo_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_customerInfo_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_customerInfo_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0)
+{
+ Operation operation("getCustomerInformation", 1);
+ operation.setParameter(0, (void*)arg0);
+
+
+ target->invoke(operation);
+ return (const char*)operation.getReturnValue();
+
+}
+
+
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h
new file mode 100644
index 0000000000..cc60ef5005
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_customerInfo_Proxy_h
+#define MyValueImpl_customerInfo_Proxy_h
+
+#include "CustomerInfo.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_customerInfo_Proxy : public CustomerInfo
+{
+public:
+ MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_customerInfo_Proxy();
+ virtual const char* getCustomerInformation(const char* customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_customerInfo_Proxy_h
+
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp
new file mode 100644
index 0000000000..14b37fa4bd
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+
+#include "MyValueImpl_stockQuote_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_stockQuote_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_stockQuote_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0)
+{
+ Operation operation("GetStockQuotes", 1);
+ operation.setParameter(0, (void*)&arg0);
+
+ commonj::sdo::DataObjectPtr ret = 0;
+ operation.setReturnValue((void*)&ret);
+
+ target->invoke(operation);
+ return ret;
+
+}
+
+
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h
new file mode 100644
index 0000000000..850bc3861c
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_stockQuote_Proxy_h
+#define MyValueImpl_stockQuote_Proxy_h
+
+#include "StockQuoteService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_stockQuote_Proxy : public StockQuoteService
+{
+public:
+ MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_stockQuote_Proxy();
+ virtual commonj::sdo::DataObjectPtr GetStockQuotes( commonj::sdo::DataObjectPtr request);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_stockQuote_Proxy_h
+
diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/StockQuoteService.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/StockQuoteService.h
new file mode 100644
index 0000000000..74479c2800
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/StockQuoteService.h
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef StockQuoteService_h
+#define StockQuoteService_h
+#include <string>
+#include "commonj/sdo/SDO.h"
+using std::string;
+class StockQuoteService
+{
+public:
+ virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0;
+
+};
+
+#endif // StockQuoteService_h