diff options
Diffstat (limited to 'tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule')
24 files changed, 0 insertions, 1239 deletions
diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/Calculator.h b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/Calculator.h deleted file mode 100644 index 6f30e31550..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/Calculator.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef CALCULATOR_H -#define CALCULATOR_H -class Calculator -{ -public: - virtual float add(float arg1, float arg2) = 0; - virtual float sub(float arg1, float arg2) = 0; - virtual float mul(float arg1, float arg2) = 0; - virtual float div(float arg1, float arg2) = 0; -}; - -#endif - - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/Calculator.wsdl b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/Calculator.wsdl deleted file mode 100644 index 6ec2df52bd..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/Calculator.wsdl +++ /dev/null @@ -1,161 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
-<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:tns="tuscany/c/Calculator"
- targetNamespace="tuscany/c/Calculator">
- <types>
- <xs:schema targetNamespace="tuscany/c/Calculator"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:tns="tuscany/c/Calculator"
- elementFormDefault="qualified">
-
- <xs:element name="add">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="param1" type="xs:float" minOccurs="1"/>
- <xs:element name="param2" type="xs:float" minOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="sub">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="param1" type="xs:float" minOccurs="1"/>
- <xs:element name="param2" type="xs:float" minOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="mul">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="param1" type="xs:float" minOccurs="1"/>
- <xs:element name="param2" type="xs:float" minOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="div">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="param1" type="xs:float" minOccurs="1"/>
- <xs:element name="param2" type="xs:float" minOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
-<!-- The data that axis2c math client expects to be returned. -->
-<!-- SDOCPP currently doesn't support this XML. Jira TUSCANY-xxx -->
-<!-- <xs:element name="result"> -->
-<!-- <xs:simpleType> -->
-<!-- <xs:restriction base="xs:float"/> -->
-<!-- </xs:simpleType> -->
-<!-- </xs:element> -->
- <xs:element name="result">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="data" type="xs:float" minOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- </xs:schema>
- </types>
-
- <message name="addRequestMsg">
- <part name="body" element="tns:add"/>
- </message>
- <message name="subRequestMsg">
- <part name="body" element="tns:sub"/>
- </message>
- <message name="mulRequestMsg">
- <part name="body" element="tns:mul"/>
- </message>
- <message name="divRequestMsg">
- <part name="body" element="tns:div"/>
- </message>
-
- <message name="calculatorResponseMsg">
- <part name="body" element="tns:result"/>
- </message>
-
- <portType name="CalculatorServicePortType">
- <operation name="add">
- <input message="tns:addRequestMsg"/>
- <output message="tns:calculatorResponseMsg"/>
- </operation>
- <operation name="sub">
- <input message="tns:subRequestMsg"/>
- <output message="tns:calculatorResponseMsg"/>
- </operation>
- <operation name="mul">
- <input message="tns:mulRequestMsg"/>
- <output message="tns:calculatorResponseMsg"/>
- </operation>
- <operation name="div">
- <input message="tns:divRequestMsg"/>
- <output message="tns:calculatorResponseMsg"/>
- </operation>
- </portType>
-
- <binding name="CalculatorServiceBinding" type="tns:CalculatorServicePortType">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="add">
- <soap:operation soapAction="CalculatorService#add"/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- <operation name="sub">
- <soap:operation soapAction="CalculatorService#sub"/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- <operation name="mul">
- <soap:operation soapAction="CalculatorService#nul"/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- <operation name="div">
- <soap:operation soapAction="CalculatorService#div"/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- </binding>
-
- <service name="CalculatorService">
- <port name="CalculatorServicePort" binding="tns:CalculatorServiceBinding">
- <soap:address location="http://localhost:9090/axis2/services/Calculator"/>
- </port>
- </service>
-</definitions>
diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl.componentType b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl.componentType deleted file mode 100644 index 39d6698e02..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl.componentType +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - -<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" - xmlns:xs="http://www.w3.org/2001/XMLSchema"> - - <service name="CalculatorService"> - <interface.cpp header="Calculator.h"/> - </service> - - <reference name="CalculatorDivideService"> - <interface.cpp header="DivideService.h"/> - </reference> - - -</componentType>
\ No newline at end of file diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl.cpp b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl.cpp deleted file mode 100644 index 746a1db689..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "CalculatorImpl.h" -#include <stdio.h> - -#include "DivideService.h" -#include "osoa/sca/ComponentContext.h" -#include "osoa/sca/ServiceRuntimeException.h" - -CalculatorImpl::CalculatorImpl() -{ -} - -CalculatorImpl::~CalculatorImpl() -{ -} - -// Calculator interface -float CalculatorImpl::add(float arg1, float arg2) -{ - float result = arg1 + arg2; - - printf("CalculatorImpl::add %f + %f = %f\n", arg1, arg2, result); - return result; -} - -float CalculatorImpl::sub(float arg1, float arg2) -{ - float result = arg1 - arg2; - printf("CalculatorImpl::sub %f - %f = %f\n", arg1, arg2, result); - return result; -} - -float CalculatorImpl::mul(float arg1, float arg2) -{ - float result = arg1 * arg2; - printf("CalculatorImpl::mul %f * %f = %f\n", arg1, arg2, result); - return result; -} - -float CalculatorImpl::div(float arg1, float arg2) -{ - float result = 0; - - // This method shows how to invoke a service on a different component from within a component - - // First, get the current ComponentContext - osoa::sca::ComponentContext myContext = osoa::sca::ComponentContext::getCurrent(); - - try - { - // Find the required service, as referenced in CalculatorImpl.componentType - DivideService* divideService = (DivideService*)myContext.getService("CalculatorDivideService"); - - // Finally, invoke the service - result = divideService->divide(arg1, arg2); - - printf("CalculatorImpl::div DivideService returned result: %f\n", result); - - } - catch (osoa::sca::ServiceRuntimeException& e) - { - // Print out error message and carry on - printf("CalculatorImpl::div Error whilst invoking DivideService: %s", e.getMessageText()); - } - - return result; -} - - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl.h b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl.h deleted file mode 100644 index 2e4b6aa4dc..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef CALCULATORIMPL_H -#define CALCULATORIMPL_H - -#include "Calculator.h" - -class CalculatorImpl : public Calculator -{ -public: - CalculatorImpl(); - virtual ~CalculatorImpl(); - - // Calculator interface - virtual float add(float arg1, float arg2); - virtual float sub(float arg1, float arg2); - virtual float mul(float arg1, float arg2); - virtual float div(float arg1, float arg2); -}; - -#endif - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.cpp b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.cpp deleted file mode 100644 index 0ff0891406..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 "CalculatorImpl_CalculatorDivideService_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 - CalculatorImpl_CalculatorDivideService_Proxy* CalculatorImpl_CalculatorDivideService_Proxy_Factory(ServiceWrapper* target) - { - return new CalculatorImpl_CalculatorDivideService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void CalculatorImpl_CalculatorDivideService_Proxy_Destructor(void* proxy) - { - delete (CalculatorImpl_CalculatorDivideService_Proxy*)proxy; - } -} - -CalculatorImpl_CalculatorDivideService_Proxy::CalculatorImpl_CalculatorDivideService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -CalculatorImpl_CalculatorDivideService_Proxy::~CalculatorImpl_CalculatorDivideService_Proxy() -{ - if (target) - delete target; -} - -float CalculatorImpl_CalculatorDivideService_Proxy::divide( float arg0, float arg1) -{ - Operation operation("divide"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.h b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.h deleted file mode 100644 index 3312005d32..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 CalculatorImpl_CalculatorDivideService_Proxy_h -#define CalculatorImpl_CalculatorDivideService_Proxy_h - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "DivideService.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class CalculatorImpl_CalculatorDivideService_Proxy : public DivideService -{ -public: - CalculatorImpl_CalculatorDivideService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~CalculatorImpl_CalculatorDivideService_Proxy(); - virtual float divide( float arg1, float arg2); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // CalculatorImpl_CalculatorDivideService_Proxy_h - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.cpp b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.cpp deleted file mode 100644 index c601ebcdc2..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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 "CalculatorImpl_CalculatorService_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 - CalculatorImpl_CalculatorService_Proxy* CalculatorImpl_CalculatorService_Proxy_Factory(ServiceWrapper* target) - { - return new CalculatorImpl_CalculatorService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void CalculatorImpl_CalculatorService_Proxy_Destructor(void* proxy) - { - delete (CalculatorImpl_CalculatorService_Proxy*)proxy; - } -} - -CalculatorImpl_CalculatorService_Proxy::CalculatorImpl_CalculatorService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -CalculatorImpl_CalculatorService_Proxy::~CalculatorImpl_CalculatorService_Proxy() -{ - if (target) - delete target; -} - -float CalculatorImpl_CalculatorService_Proxy::add( float arg0, float arg1) -{ - Operation operation("add"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -float CalculatorImpl_CalculatorService_Proxy::sub( float arg0, float arg1) -{ - Operation operation("sub"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -float CalculatorImpl_CalculatorService_Proxy::mul( float arg0, float arg1) -{ - Operation operation("mul"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -float CalculatorImpl_CalculatorService_Proxy::div( float arg0, float arg1) -{ - Operation operation("div"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.h b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.h deleted file mode 100644 index d3de5a79c6..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 CalculatorImpl_CalculatorService_Proxy_h -#define CalculatorImpl_CalculatorService_Proxy_h - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "Calculator.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class CalculatorImpl_CalculatorService_Proxy : public Calculator -{ -public: - CalculatorImpl_CalculatorService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~CalculatorImpl_CalculatorService_Proxy(); - virtual float add( float arg1, float arg2); - virtual float sub( float arg1, float arg2); - virtual float mul( float arg1, float arg2); - virtual float div( float arg1, float arg2); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // CalculatorImpl_CalculatorService_Proxy_h - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.cpp b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.cpp deleted file mode 100644 index 97805d0e4b..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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 "CalculatorImpl_CalculatorService_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 - CalculatorImpl_CalculatorService_Wrapper* CalculatorImpl_CalculatorService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new CalculatorImpl_CalculatorService_Wrapper(target); - } -} - -CalculatorImpl_CalculatorService_Wrapper::CalculatorImpl_CalculatorService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (CalculatorImpl*)getImplementation(); -} - -CalculatorImpl_CalculatorService_Wrapper::~CalculatorImpl_CalculatorService_Wrapper() -{ - releaseImplementation(); -} - -void* CalculatorImpl_CalculatorService_Wrapper::newImplementation() -{ - return new CalculatorImpl; -} - -void CalculatorImpl_CalculatorService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void CalculatorImpl_CalculatorService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "add") - { - float& p0 = *( float*)operation.getParameterValue(0); - float& p1 = *( float*)operation.getParameterValue(1); - *(float*)operation.getReturnValue() = impl->add(p0, p1); - return; - } - if (operationName == "sub") - { - float& p0 = *( float*)operation.getParameterValue(0); - float& p1 = *( float*)operation.getParameterValue(1); - *(float*)operation.getReturnValue() = impl->sub(p0, p1); - return; - } - if (operationName == "mul") - { - float& p0 = *( float*)operation.getParameterValue(0); - float& p1 = *( float*)operation.getParameterValue(1); - *(float*)operation.getReturnValue() = impl->mul(p0, p1); - return; - } - if (operationName == "div") - { - float& p0 = *( float*)operation.getParameterValue(0); - float& p1 = *( float*)operation.getParameterValue(1); - *(float*)operation.getReturnValue() = impl->div(p0, p1); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.h b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.h deleted file mode 100644 index c881576ca2..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 CalculatorImpl_CalculatorService_Wrapper_h -#define CalculatorImpl_CalculatorService_Wrapper_h - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "CalculatorImpl.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class CalculatorImpl_CalculatorService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - CalculatorImpl_CalculatorService_Wrapper(tuscany::sca::model::Service* target); - virtual ~CalculatorImpl_CalculatorService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - CalculatorImpl* impl; -}; - -#endif // CalculatorImpl_CalculatorService_Wrapper_h - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideService.h b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideService.h deleted file mode 100644 index f6033c9020..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideService.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef DIVIDESERVICE_H -#define DIVIDESERVICE_H -class DivideService -{ -public: - virtual float divide(float arg1, float arg2) = 0; -}; - -#endif - - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.componentType b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.componentType deleted file mode 100644 index bda8aed044..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.componentType +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" - xmlns:xs="http://www.w3.org/2001/XMLSchema"> - - <service name="DivideService"> - <interface.cpp header="DivideService.h"> - </interface.cpp> - </service> - -</componentType> diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.cpp b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.cpp deleted file mode 100644 index 4797498103..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#include "DivideServiceImpl.h" -#include <stdio.h> - -DivideServiceImpl::DivideServiceImpl() -{ -} - -DivideServiceImpl::~DivideServiceImpl() -{ -} - -// DivideService interface -float DivideServiceImpl::divide(float arg1, float arg2) -{ - if(arg2 == 0.0) - { - printf("DivideServiceImpl::div %f / %f !! Cannot divide by zero, so returning 0\n", arg1, arg2); - return 0; - } - - float result = arg1 / arg2; - printf("DivideServiceImpl::div %f / %f = %f\n", arg1, arg2, result); - return result; -} - - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.h b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.h deleted file mode 100644 index 00216b53b3..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef DIVIDESERVICEIMPL_H -#define DIVIDESERVICEIMPL_H - -#include "DivideService.h" - -class DivideServiceImpl : public DivideService -{ -public: - DivideServiceImpl(); - virtual ~DivideServiceImpl(); - - // DivideService interface - virtual float divide(float arg1, float arg2); -}; - -#endif - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.cpp b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.cpp deleted file mode 100644 index 945f407327..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 "DivideServiceImpl_DivideService_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 - DivideServiceImpl_DivideService_Proxy* DivideServiceImpl_DivideService_Proxy_Factory(ServiceWrapper* target) - { - return new DivideServiceImpl_DivideService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void DivideServiceImpl_DivideService_Proxy_Destructor(void* proxy) - { - delete (DivideServiceImpl_DivideService_Proxy*)proxy; - } -} - -DivideServiceImpl_DivideService_Proxy::DivideServiceImpl_DivideService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -DivideServiceImpl_DivideService_Proxy::~DivideServiceImpl_DivideService_Proxy() -{ - if (target) - delete target; -} - -float DivideServiceImpl_DivideService_Proxy::divide( float arg0, float arg1) -{ - Operation operation("divide"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.h b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.h deleted file mode 100644 index 957ad43168..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 DivideServiceImpl_DivideService_Proxy_h -#define DivideServiceImpl_DivideService_Proxy_h - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "DivideService.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class DivideServiceImpl_DivideService_Proxy : public DivideService -{ -public: - DivideServiceImpl_DivideService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~DivideServiceImpl_DivideService_Proxy(); - virtual float divide( float arg1, float arg2); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // DivideServiceImpl_DivideService_Proxy_h - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.cpp b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.cpp deleted file mode 100644 index 4257caa46c..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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 "DivideServiceImpl_DivideService_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 - DivideServiceImpl_DivideService_Wrapper* DivideServiceImpl_DivideService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new DivideServiceImpl_DivideService_Wrapper(target); - } -} - -DivideServiceImpl_DivideService_Wrapper::DivideServiceImpl_DivideService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (DivideServiceImpl*)getImplementation(); -} - -DivideServiceImpl_DivideService_Wrapper::~DivideServiceImpl_DivideService_Wrapper() -{ - releaseImplementation(); -} - -void* DivideServiceImpl_DivideService_Wrapper::newImplementation() -{ - return new DivideServiceImpl; -} - -void DivideServiceImpl_DivideService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void DivideServiceImpl_DivideService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "divide") - { - float& p0 = *( float*)operation.getParameterValue(0); - float& p1 = *( float*)operation.getParameterValue(1); - *(float*)operation.getReturnValue() = impl->divide(p0, p1); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.h b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.h deleted file mode 100644 index 9be9796ee2..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 DivideServiceImpl_DivideService_Wrapper_h -#define DivideServiceImpl_DivideService_Wrapper_h - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "DivideServiceImpl.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class DivideServiceImpl_DivideService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - DivideServiceImpl_DivideService_Wrapper(tuscany::sca::model::Service* target); - virtual ~DivideServiceImpl_DivideService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - DivideServiceImpl* impl; -}; - -#endif // DivideServiceImpl_DivideService_Wrapper_h - diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/Makefile.am b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/Makefile.am deleted file mode 100644 index aff769b36a..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -deploydir=$(prefix)/samples/Calculator/deploy -moduledir=$(deploydir)/modules/CalculatorModule - -BUILT_SOURCES = CalculatorImpl_CalculatorService_Proxy.cpp \ -CalculatorImpl_CalculatorService_Wrapper.cpp \ -CalculatorImpl_CalculatorDivideService_Proxy.cpp \ -DivideServiceImpl_DivideService_Proxy.cpp \ -DivideServiceImpl_DivideService_Wrapper.cpp - -noinst_HEADERS = *.h - -CalculatorImpl_CalculatorService_Proxy.cpp: - java -jar $(TUSCANY_SCACPP)/bin/scagen.jar -dir . -output . - -module_LTLIBRARIES = libCalculatorModule.la -module_DATA = sca.module.lin Tuscany-model.config *.componentType *.wsdl services.xml -EXTRA_DIST = sca.module.lin Tuscany-model.config *.componentType *.wsdl services.xml - -libCalculatorModule_la_SOURCES = \ -CalculatorImpl.cpp \ -CalculatorImpl_CalculatorService_Proxy.cpp \ -CalculatorImpl_CalculatorService_Wrapper.cpp \ -CalculatorImpl_CalculatorDivideService_Proxy.cpp \ -DivideServiceImpl.cpp \ -DivideServiceImpl_DivideService_Proxy.cpp \ -DivideServiceImpl_DivideService_Wrapper.cpp - -libCalculatorModule_la_LIBADD = -L${TUSCANY_SCACPP}/lib -ltuscany_sca - -INCLUDES = \ - -I$(TUSCANY_SCACPP)/include \ - -I${TUSCANY_SDOCPP}/include - -install-data-hook: - mv $(moduledir)/sca.module.lin $(moduledir)/sca.module
\ No newline at end of file diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/Tuscany-model.config b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/Tuscany-model.config deleted file mode 100644 index b8f96a01a1..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/Tuscany-model.config +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- - Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - -<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0"> - <wsdl> - <file name="Calculator.wsdl"/> - </wsdl> - <xsd/> -</tuscany-model> diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/sca.module b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/sca.module deleted file mode 100644 index e07fbeb9e2..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/sca.module +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - -<module xmlns="http://www.osoa.org/xmlns/sca/0.9" - xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9" - xmlns:cs="tuscany/c/Calculator/" - name="CalculatorModule"> - - <!-- Expose as a web service --> - <entryPoint name="WSCalculatorEntrypoint" multiplicity="1..1"> - <interface.wsdl interface="Calculator.wsdl" callbackInterface=""></interface.wsdl> - <binding.ws port="tuscany/c/Calculator#wsdl.endpoint(CalculatorService/CalculatorServicePort)"></binding.ws> - <reference>CalculatorServiceComponent</reference> - </entryPoint> - - - <component name="CalculatorServiceComponent"> - <implementation.cpp dll="Calculator.dll" header="CalculatorImpl.h"></implementation.cpp> - <properties> </properties> - <references> - <v:CalculatorDivideService>DivideServiceComponent/DivideService</v:CalculatorDivideService> - </references> - </component> - - <component name="DivideServiceComponent"> - <implementation.cpp dll="Calculator.dll" header="DivideServiceImpl.h"></implementation.cpp> - <properties> </properties> - <references> </references> - </component> - - - -</module>
\ No newline at end of file diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/sca.module.lin b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/sca.module.lin deleted file mode 100644 index 4bd96ac774..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/sca.module.lin +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - -<module xmlns="http://www.osoa.org/xmlns/sca/0.9" - xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9" - name="CalculatorModule"> - - <!-- Expose as a web service --> - <entryPoint name="WSCalculatorEntrypoint" multiplicity="1..1"> - <interface.wsdl interface="Calculator.wsdl" callbackInterface=""></interface.wsdl> - <binding.ws port="tuscany/c/Calculator#wsdl.endpoint(CalculatorService/CalculatorServicePort)"></binding.ws> - <reference>CalculatorServiceComponent</reference> - </entryPoint> - - <component name="CalculatorServiceComponent"> - <implementation.cpp dll="libCalculatorModule.so" header="CalculatorImpl.h"></implementation.cpp> - <properties> </properties> - <references> - <v:CalculatorDivideService>DivideServiceComponent/DivideService</v:CalculatorDivideService> - </references> - </component> - - <component name="DivideServiceComponent"> - <implementation.cpp dll="libCalculatorModule.so" header="DivideServiceImpl.h"></implementation.cpp> - <properties> </properties> - <references> </references> - </component> -</module>
\ No newline at end of file diff --git a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/services.xml b/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/services.xml deleted file mode 100644 index b5f234e988..0000000000 --- a/tags/cpp-0.1.incubating-M1-final/sca/samples/Calculator/CalculatorModule/services.xml +++ /dev/null @@ -1,42 +0,0 @@ - -<!-- - Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> -<service name="Calculator"> - <parameter name="ServiceClass" locked="xsd:false">tuscany_sca_ws_service</parameter> - <parameter name="TuscanySystemRoot" locked="xsd:false">PATH-TO-THE-SYSTEM-ROOT</parameter> - <parameter name="TuscanyEntryPoint" locked="xsd:false">CalculatorSubsystem/CalculatorService/WSCalculatorEntrypoint</parameter> - - <description> - This is a testing service, named 'Calculator' to test multiple operations in the same service - </description> - - <operation name="add"> - <!--messageReceiver class="axis2_receivers" /--> - </operation> - - <operation name="sub"> - <!--messageReceiver class="axis2_receivers" /--> - </operation> - - <operation name="mul"> - <!--messageReceiver class="axis2_receivers" /--> - </operation> - - <operation name="div"> - <!--messageReceiver class="axis2_receivers" /--> - </operation> - -</service> |