Return-Path: Delivered-To: apmail-ws-tuscany-commits-archive@locus.apache.org Received: (qmail 85635 invoked from network); 4 Jan 2007 18:06:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jan 2007 18:06:35 -0000 Received: (qmail 93587 invoked by uid 500); 4 Jan 2007 17:58:46 -0000 Delivered-To: apmail-ws-tuscany-commits-archive@ws.apache.org Received: (qmail 93416 invoked by uid 500); 4 Jan 2007 17:58:46 -0000 Mailing-List: contact tuscany-commits-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: tuscany-dev@ws.apache.org Delivered-To: mailing list tuscany-commits@ws.apache.org Received: (qmail 93216 invoked by uid 99); 4 Jan 2007 17:58:45 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2007 09:58:45 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2007 08:53:53 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id EF4D71A9820; Thu, 4 Jan 2007 08:52:55 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r492635 [3/3] - in /incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput: CalculatorCompositeAndComponent/expected_output/ CalculatorSlashDirectionTest/expected_output/ CustomerInfoImplMultiParamDiffTypesTest/expected_output/ CustomerInf... Date: Thu, 04 Jan 2007 16:52:54 -0000 To: tuscany-commits@ws.apache.org From: ajborley@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070104165255.EF4D71A9820@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,6 @@ #include "MyValueImpl_MyValueService_Wrapper.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; using myvaluecorp::implns::MyValueImpl; @@ -37,7 +35,7 @@ } } -MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : CPPServiceWrapper(target) +MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target) : tuscany::sca::cpp::CPPServiceWrapper(target) { impl = (MyValueImpl*)getImplementation(); } @@ -57,116 +55,56 @@ delete impl; } -void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) +void MyValueImpl_MyValueService_Wrapper::invokeService(tuscany::sca::Operation& operation) { - const string& operationName = operation.getName(); + const std::string& operationName = operation.getName(); if (operationName == "getMyValueOther") { const char* p0 = *(const char**)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); - return; - } - if (operationName == "getMyValueSOther") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); - return; - } - if (operationName == "getCustnameOther") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); - return; - } - if (operationName == "getCustnamecsOther") - { - string& p0 = *( string*)operation.getParameterValue(0); - const string& ret = impl->getCustnamecsOther(p0); - operation.setReturnValue(&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - - * 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; - -using myvaluecorp::implns::MyValueImpl; - -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) : CPPServiceWrapper(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 == "getMyValueOther") - { - const char* p0 = *(const char**)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); + if(operation.getReturnValue() != NULL) + { + *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); + } + else + { + float* ret = new float; + *ret = impl->getMyValueOther(p0); + operation.setReturnValue((const float*)ret); + } return; } if (operationName == "getMyValueSOther") { string& p0 = *(string*)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); + + if(operation.getReturnValue() != NULL) + { + *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); + } + else + { + float* ret = new float; + *ret = impl->getMyValueSOther(p0); + operation.setReturnValue((const float*)ret); + } return; } if (operationName == "getCustnameOther") { string& p0 = *(string*)operation.getParameterValue(0); - *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); + + if(operation.getReturnValue() != NULL) + { + *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); + } + else + { + string* ret = new string; + *ret = impl->getCustnameOther(p0); + operation.setReturnValue((const string*)ret); + } return; } if (operationName == "getCustnamecsOther") @@ -178,7 +116,7 @@ } - throw ServiceRuntimeException("Invalid operation"); + throw osoa::sca::ServiceRuntimeException("Invalid operation"); } Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h Thu Jan 4 08:52:52 2007 @@ -41,42 +41,3 @@ #endif // MyValueImpl_MyValueService_Wrapper_h - * 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "MyValueImpl.hpp" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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: - myvaluecorp::implns::MyValueImpl* impl; -}; - -#endif // MyValueImpl_MyValueService_Wrapper_h - Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,6 @@ #include "MyValueImpl_MyValueService_Proxy.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; extern "C" { @@ -29,7 +27,7 @@ #if defined(WIN32) || defined(_WINDOWS) __declspec(dllexport) #endif - MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) + MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(tuscany::sca::ServiceWrapper* target) { return new MyValueImpl_MyValueService_Proxy(target); } @@ -43,7 +41,7 @@ } } -MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) +MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper* targ) : target(targ) { } @@ -55,38 +53,38 @@ float MyValueImpl_MyValueService_Proxy::getMyValueOther(const char* arg0) { - Operation operation("getMyValueOther"); - operation.addParameter(&arg0); + tuscany::sca::Operation operation("getMyValueOther"); + operation.addParameter("customerID", &arg0); float ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(float*)operation.getReturnValue(); } float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0) { - Operation operation("getMyValueSOther"); - operation.addParameter(&arg0); + tuscany::sca::Operation operation("getMyValueSOther"); + operation.addParameter("customerID", &arg0); float ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(float*)operation.getReturnValue(); } string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0) { - Operation operation("getCustnameOther"); - operation.addParameter(&arg0); + tuscany::sca::Operation operation("getCustnameOther"); + operation.addParameter("customerID", &arg0); string ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(string*)operation.getReturnValue(); } const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0) { - Operation operation("getCustnamecsOther"); - operation.addParameter(&arg0); + tuscany::sca::Operation operation("getCustnamecsOther"); + operation.addParameter("customerID", &arg0); target->invoke(operation); return *(const string*)operation.getReturnValue(); } Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,6 @@ #include "MyValueImpl_MyValueService_Wrapper.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; @@ -37,7 +35,7 @@ } } -MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : CPPServiceWrapper(target) +MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target) : tuscany::sca::cpp::CPPServiceWrapper(target) { impl = (MyValueImpl*)getImplementation(); } @@ -57,26 +55,56 @@ delete impl; } -void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) +void MyValueImpl_MyValueService_Wrapper::invokeService(tuscany::sca::Operation& operation) { - const string& operationName = operation.getName(); + const std::string& operationName = operation.getName(); if (operationName == "getMyValueOther") { const char* p0 = *(const char**)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); + + if(operation.getReturnValue() != NULL) + { + *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); + } + else + { + float* ret = new float; + *ret = impl->getMyValueOther(p0); + operation.setReturnValue((const float*)ret); + } return; } if (operationName == "getMyValueSOther") { string& p0 = *(string*)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); + + if(operation.getReturnValue() != NULL) + { + *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); + } + else + { + float* ret = new float; + *ret = impl->getMyValueSOther(p0); + operation.setReturnValue((const float*)ret); + } return; } if (operationName == "getCustnameOther") { string& p0 = *(string*)operation.getParameterValue(0); - *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); + + if(operation.getReturnValue() != NULL) + { + *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); + } + else + { + string* ret = new string; + *ret = impl->getCustnameOther(p0); + operation.setReturnValue((const string*)ret); + } return; } if (operationName == "getCustnamecsOther") @@ -88,7 +116,7 @@ } - throw ServiceRuntimeException("Invalid operation"); + throw osoa::sca::ServiceRuntimeException("Invalid operation"); } Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,6 @@ #include "MyValueImpl_MyValueService_Proxy.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; extern "C" { @@ -29,7 +27,7 @@ #if defined(WIN32) || defined(_WINDOWS) __declspec(dllexport) #endif - MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) + MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(tuscany::sca::ServiceWrapper* target) { return new MyValueImpl_MyValueService_Proxy(target); } @@ -43,7 +41,7 @@ } } -MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) +MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper* targ) : target(targ) { } @@ -55,38 +53,38 @@ float MyValueImpl_MyValueService_Proxy::getMyValueOther(const char* arg0) { - Operation operation("getMyValueOther"); - operation.addParameter(&arg0); + tuscany::sca::Operation operation("getMyValueOther"); + operation.addParameter("customerID", &arg0); float ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(float*)operation.getReturnValue(); } float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0) { - Operation operation("getMyValueSOther"); - operation.addParameter(&arg0); + tuscany::sca::Operation operation("getMyValueSOther"); + operation.addParameter("customerID", &arg0); float ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(float*)operation.getReturnValue(); } string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0) { - Operation operation("getCustnameOther"); - operation.addParameter(&arg0); + tuscany::sca::Operation operation("getCustnameOther"); + operation.addParameter("customerID", &arg0); string ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(string*)operation.getReturnValue(); } const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0) { - Operation operation("getCustnamecsOther"); - operation.addParameter(&arg0); + tuscany::sca::Operation operation("getCustnamecsOther"); + operation.addParameter("customerID", &arg0); target->invoke(operation); return *(const string*)operation.getReturnValue(); } Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,6 @@ #include "MyValueImpl_MyValueService_Wrapper.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; @@ -37,7 +35,7 @@ } } -MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : CPPServiceWrapper(target) +MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target) : tuscany::sca::cpp::CPPServiceWrapper(target) { impl = (MyValueImpl*)getImplementation(); } @@ -57,26 +55,56 @@ delete impl; } -void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) +void MyValueImpl_MyValueService_Wrapper::invokeService(tuscany::sca::Operation& operation) { - const string& operationName = operation.getName(); + const std::string& operationName = operation.getName(); if (operationName == "getMyValueOther") { const char* p0 = *(const char**)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); + + if(operation.getReturnValue() != NULL) + { + *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); + } + else + { + float* ret = new float; + *ret = impl->getMyValueOther(p0); + operation.setReturnValue((const float*)ret); + } return; } if (operationName == "getMyValueSOther") { string& p0 = *(string*)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); + + if(operation.getReturnValue() != NULL) + { + *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); + } + else + { + float* ret = new float; + *ret = impl->getMyValueSOther(p0); + operation.setReturnValue((const float*)ret); + } return; } if (operationName == "getCustnameOther") { string& p0 = *(string*)operation.getParameterValue(0); - *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); + + if(operation.getReturnValue() != NULL) + { + *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); + } + else + { + string* ret = new string; + *ret = impl->getCustnameOther(p0); + operation.setReturnValue((const string*)ret); + } return; } if (operationName == "getCustnamecsOther") @@ -88,7 +116,7 @@ } - throw ServiceRuntimeException("Invalid operation"); + throw osoa::sca::ServiceRuntimeException("Invalid operation"); } Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,6 @@ #include "CustomerInfoImpl2_CustomerInfoService_Proxy.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; extern "C" { @@ -29,7 +27,7 @@ #if defined(WIN32) || defined(_WINDOWS) __declspec(dllexport) #endif - CustomerInfoImpl2_CustomerInfoService_Proxy* CustomerInfoImpl2_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) + CustomerInfoImpl2_CustomerInfoService_Proxy* CustomerInfoImpl2_CustomerInfoService_Proxy_Factory(tuscany::sca::ServiceWrapper* target) { return new CustomerInfoImpl2_CustomerInfoService_Proxy(target); } @@ -43,7 +41,7 @@ } } -CustomerInfoImpl2_CustomerInfoService_Proxy::CustomerInfoImpl2_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) +CustomerInfoImpl2_CustomerInfoService_Proxy::CustomerInfoImpl2_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper* targ) : target(targ) { } @@ -55,12 +53,12 @@ const char* CustomerInfoImpl2_CustomerInfoService_Proxy::getCustomerInformation(const char* arg0) { - Operation operation("getCustomerInformation"); + tuscany::sca::Operation operation("getCustomerInformation"); operation.addParameter(&arg0); const char* ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(const char**)operation.getReturnValue(); } Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,8 @@ #include "CustomerInfoImpl2_CustomerInfoService_Wrapper.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; + +using myvaluecorp::implns::CustomerInfoImpl2; extern "C" { @@ -35,7 +35,7 @@ } } -CustomerInfoImpl2_CustomerInfoService_Wrapper::CustomerInfoImpl2_CustomerInfoService_Wrapper(Service* target) : CPPServiceWrapper(target) +CustomerInfoImpl2_CustomerInfoService_Wrapper::CustomerInfoImpl2_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target) : tuscany::sca::cpp::CPPServiceWrapper(target) { impl = (CustomerInfoImpl2*)getImplementation(); } @@ -55,19 +55,29 @@ delete impl; } -void CustomerInfoImpl2_CustomerInfoService_Wrapper::invokeService(Operation& operation) +void CustomerInfoImpl2_CustomerInfoService_Wrapper::invokeService(tuscany::sca::Operation& operation) { - const string& operationName = operation.getName(); + const std::string& operationName = operation.getName(); if (operationName == "getCustomerInformation") { const char* p0 = *(const char**)operation.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInformation(p0); + + if(operation.getReturnValue() != NULL) + { + *(const char**)operation.getReturnValue() = impl->getCustomerInformation(p0); + } + else + { + const char** ret = new const char*; + *ret = impl->getCustomerInformation(p0); + operation.setReturnValue((const const char**)ret); + } return; } - throw ServiceRuntimeException("Invalid operation"); + throw osoa::sca::ServiceRuntimeException("Invalid operation"); } Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h Thu Jan 4 08:52:52 2007 @@ -36,7 +36,7 @@ virtual void* newImplementation(); virtual void deleteImplementation(); private: - CustomerInfoImpl2* impl; + myvaluecorp::implns::CustomerInfoImpl2* impl; }; #endif // CustomerInfoImpl2_CustomerInfoService_Wrapper_h Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,6 @@ #include "MyValueImpl_MyValueService_Proxy.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; extern "C" { @@ -29,7 +27,7 @@ #if defined(WIN32) || defined(_WINDOWS) __declspec(dllexport) #endif - MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) + MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(tuscany::sca::ServiceWrapper* target) { return new MyValueImpl_MyValueService_Proxy(target); } @@ -43,7 +41,7 @@ } } -MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) +MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper* targ) : target(targ) { } @@ -55,37 +53,37 @@ float MyValueImpl_MyValueService_Proxy::getMyValue(const char* arg0) { - Operation operation("getMyValue"); + tuscany::sca::Operation operation("getMyValue"); operation.addParameter(&arg0); float ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(float*)operation.getReturnValue(); } float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0) { - Operation operation("getMyValueS"); + tuscany::sca::Operation operation("getMyValueS"); operation.addParameter(&arg0); float ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(float*)operation.getReturnValue(); } string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0) { - Operation operation("getCustname"); + tuscany::sca::Operation operation("getCustname"); operation.addParameter(&arg0); string ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(string*)operation.getReturnValue(); } const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0) { - Operation operation("getCustnamecs"); + tuscany::sca::Operation operation("getCustnamecs"); operation.addParameter(&arg0); target->invoke(operation); return *(const string*)operation.getReturnValue(); Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h Thu Jan 4 08:52:52 2007 @@ -1,17 +1,20 @@ -/* - * 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. +/* + * 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 MyValueImpl_MyValueService_Proxy_h Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,8 @@ #include "MyValueImpl_MyValueService_Wrapper.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; + +using myvaluecorp::implns::MyValueImpl; extern "C" { @@ -35,7 +35,7 @@ } } -MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : CPPServiceWrapper(target) +MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target) : tuscany::sca::cpp::CPPServiceWrapper(target) { impl = (MyValueImpl*)getImplementation(); } @@ -55,26 +55,56 @@ delete impl; } -void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) +void MyValueImpl_MyValueService_Wrapper::invokeService(tuscany::sca::Operation& operation) { - const string& operationName = operation.getName(); + const std::string& operationName = operation.getName(); if (operationName == "getMyValue") { const char* p0 = *(const char**)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValue(p0); + + if(operation.getReturnValue() != NULL) + { + *(float*)operation.getReturnValue() = impl->getMyValue(p0); + } + else + { + float* ret = new float; + *ret = impl->getMyValue(p0); + operation.setReturnValue((const float*)ret); + } return; } if (operationName == "getMyValueS") { string& p0 = *(string*)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueS(p0); + + if(operation.getReturnValue() != NULL) + { + *(float*)operation.getReturnValue() = impl->getMyValueS(p0); + } + else + { + float* ret = new float; + *ret = impl->getMyValueS(p0); + operation.setReturnValue((const float*)ret); + } return; } if (operationName == "getCustname") { string& p0 = *(string*)operation.getParameterValue(0); - *(string*)operation.getReturnValue() = impl->getCustname(p0); + + if(operation.getReturnValue() != NULL) + { + *(string*)operation.getReturnValue() = impl->getCustname(p0); + } + else + { + string* ret = new string; + *ret = impl->getCustname(p0); + operation.setReturnValue((const string*)ret); + } return; } if (operationName == "getCustnamecs") @@ -86,7 +116,7 @@ } - throw ServiceRuntimeException("Invalid operation"); + throw osoa::sca::ServiceRuntimeException("Invalid operation"); } Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h Thu Jan 4 08:52:52 2007 @@ -36,7 +36,7 @@ virtual void* newImplementation(); virtual void deleteImplementation(); private: - MyValueImpl* impl; + myvaluecorp::implns::MyValueImpl* impl; }; #endif // MyValueImpl_MyValueService_Wrapper_h Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,6 @@ #include "MyValueImpl_customerInfo_Proxy.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; extern "C" { @@ -29,7 +27,7 @@ #if defined(WIN32) || defined(_WINDOWS) __declspec(dllexport) #endif - MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target) + MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(tuscany::sca::ServiceWrapper* target) { return new MyValueImpl_customerInfo_Proxy(target); } @@ -43,7 +41,7 @@ } } -MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ) +MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper* targ) : target(targ) { } @@ -55,12 +53,12 @@ const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0) { - Operation operation("getCustomerInformation"); + tuscany::sca::Operation operation("getCustomerInformation"); operation.addParameter(&arg0); const char* ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(const char**)operation.getReturnValue(); } Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,6 @@ #include "MyValueImpl_stockQuote_Proxy.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; extern "C" { @@ -29,7 +27,7 @@ #if defined(WIN32) || defined(_WINDOWS) __declspec(dllexport) #endif - MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target) + MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(tuscany::sca::ServiceWrapper* target) { return new MyValueImpl_stockQuote_Proxy(target); } @@ -43,7 +41,7 @@ } } -MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ) +MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper* targ) : target(targ) { } @@ -55,12 +53,12 @@ commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0) { - Operation operation("GetStockQuotes"); + tuscany::sca::Operation operation("GetStockQuotes"); operation.addParameter(&arg0); commonj::sdo::DataObjectPtr ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(commonj::sdo::DataObjectPtr*)operation.getReturnValue(); } Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,6 @@ #include "CustomerInfoImpl_CustomerInfoService_Proxy.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; extern "C" { @@ -29,7 +27,7 @@ #if defined(WIN32) || defined(_WINDOWS) __declspec(dllexport) #endif - CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) + CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(tuscany::sca::ServiceWrapper* target) { return new CustomerInfoImpl_CustomerInfoService_Proxy(target); } @@ -43,7 +41,7 @@ } } -CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) +CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper* targ) : target(targ) { } @@ -55,35 +53,35 @@ const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationCharPublic( char* arg0, const char* arg1) { - Operation operation("getCustomerInformationCharPublic"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); + tuscany::sca::Operation operation("getCustomerInformationCharPublic"); + operation.addParameter("p1", &arg0); + operation.addParameter("customerID", &arg1); const char* ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(const char**)operation.getReturnValue(); } const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoACharPublic( char* arg0, const char* arg1) { - Operation operation("getCustomerInfoACharPublic"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); + tuscany::sca::Operation operation("getCustomerInfoACharPublic"); + operation.addParameter("p1", &arg0); + operation.addParameter("", &arg1); const char* ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(const char**)operation.getReturnValue(); } const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBCharPublic( char* arg0, char* arg1) { - Operation operation("getCustomerInfoBCharPublic"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); + tuscany::sca::Operation operation("getCustomerInfoBCharPublic"); + operation.addParameter("p1", &arg0); + operation.addParameter("customerID", &arg1); const char* ret; operation.setReturnValue(&ret); target->invoke(operation); - return ret; + return *(const char**)operation.getReturnValue(); } Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp?view=diff&rev=492635&r1=492634&r2=492635 ============================================================================== --- incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp (original) +++ incubator/tuscany/cpp/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp Thu Jan 4 08:52:52 2007 @@ -20,8 +20,6 @@ #include "CustomerInfoImpl_CustomerInfoService_Wrapper.h" #include "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; @@ -37,7 +35,7 @@ } } -CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : CPPServiceWrapper(target) +CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target) : tuscany::sca::cpp::CPPServiceWrapper(target) { impl = (CustomerInfoImpl*)getImplementation(); } @@ -57,34 +55,64 @@ delete impl; } -void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation) +void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(tuscany::sca::Operation& operation) { - const string& operationName = operation.getName(); + const std::string& operationName = operation.getName(); if (operationName == "getCustomerInformationCharPublic") { char* p0 = *( char**)operation.getParameterValue(0); const char* p1 = *(const char**)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInformationCharPublic(p0, p1); + + if(operation.getReturnValue() != NULL) + { + *(const char**)operation.getReturnValue() = impl->getCustomerInformationCharPublic(p0, p1); + } + else + { + const char** ret = new const char*; + *ret = impl->getCustomerInformationCharPublic(p0, p1); + operation.setReturnValue((const const char**)ret); + } return; } if (operationName == "getCustomerInfoACharPublic") { char* p0 = *( char**)operation.getParameterValue(0); const char* p1 = *(const char**)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoACharPublic(p0, p1); + + if(operation.getReturnValue() != NULL) + { + *(const char**)operation.getReturnValue() = impl->getCustomerInfoACharPublic(p0, p1); + } + else + { + const char** ret = new const char*; + *ret = impl->getCustomerInfoACharPublic(p0, p1); + operation.setReturnValue((const const char**)ret); + } return; } if (operationName == "getCustomerInfoBCharPublic") { char* p0 = *( char**)operation.getParameterValue(0); char* p1 = *( char**)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoBCharPublic(p0, p1); + + if(operation.getReturnValue() != NULL) + { + *(const char**)operation.getReturnValue() = impl->getCustomerInfoBCharPublic(p0, p1); + } + else + { + const char** ret = new const char*; + *ret = impl->getCustomerInfoBCharPublic(p0, p1); + operation.setReturnValue((const const char**)ret); + } return; } - throw ServiceRuntimeException("Invalid operation"); + throw osoa::sca::ServiceRuntimeException("Invalid operation"); } --------------------------------------------------------------------- To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org For additional commands, e-mail: tuscany-commits-help@ws.apache.org