From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- .../WSEntryPointTestRPCModule/Tuscany-model.config | 24 +++ .../WSEntryPointTestRPC.h | 30 ++++ .../WSEntryPointTestRPC.wsdl | 62 ++++++++ .../WSEntryPointTestRPCImpl.componentType | 10 ++ .../WSEntryPointTestRPCImpl.cpp | 38 +++++ .../WSEntryPointTestRPCImpl.h | 36 +++++ ...estRPCImpl_WSEntryPointTestRPCService_Proxy.cpp | 63 ++++++++ ...tTestRPCImpl_WSEntryPointTestRPCService_Proxy.h | 34 +++++ ...tRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp | 70 +++++++++ ...estRPCImpl_WSEntryPointTestRPCService_Wrapper.h | 36 +++++ .../WSEntryPointTestRPCModule.vcproj | 170 +++++++++++++++++++++ .../WSEntryPointTestRPCModule/sca.module | 19 +++ .../WSEntryPointTestRPCModule/services.xml | 30 ++++ 13 files changed, 622 insertions(+) create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/Tuscany-model.config create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.cpp create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCModule.vcproj create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/sca.module create mode 100644 branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/services.xml (limited to 'branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule') diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/Tuscany-model.config b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/Tuscany-model.config new file mode 100644 index 0000000000..42ad3ccfe3 --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/Tuscany-model.config @@ -0,0 +1,24 @@ + + + + + + + + + + diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h new file mode 100644 index 0000000000..5bd20f103a --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h @@ -0,0 +1,30 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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 WSEENTRYPOINTTESTRPC_H +#define WSEENTRYPOINTTESTRPC_H +class WSEntryPointTestRPC +{ +public: + virtual char* doString(char* arg1) = 0; +}; + +#endif + + diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl new file mode 100644 index 0000000000..1706534042 --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType new file mode 100644 index 0000000000..15287150e0 --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.cpp b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.cpp new file mode 100644 index 0000000000..f46d64db18 --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.cpp @@ -0,0 +1,38 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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 "WSEntryPointTestRPCImpl.h" +#include + +WSEntryPointTestRPCImpl::WSEntryPointTestRPCImpl() +{ +} + +WSEntryPointTestRPCImpl::~WSEntryPointTestRPCImpl() +{ +} + +// WSEntryPointTestRPC interface +char* WSEntryPointTestRPCImpl::doString(char* arg1) +{ + printf("WSEntryPointTestRPCImpl::doString %s\n", arg1); + + return "WSEntryPointTestRPCImpl::doString response"; +} + diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h new file mode 100644 index 0000000000..82023992c7 --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h @@ -0,0 +1,36 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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 WSEENTRYPOINTTESTRPCIMPL_H +#define WSEENTRYPOINTTESTRPCIMPL_H + +#include "WSEntryPointTestRPC.h" + +class WSEntryPointTestRPCImpl : public WSEntryPointTestRPC +{ +public: + WSEntryPointTestRPCImpl(); + virtual ~WSEntryPointTestRPCImpl(); + + // WSEntryPointTestRPC interface + virtual char* doString(char* arg1); +}; + +#endif + diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp new file mode 100644 index 0000000000..b3799db850 --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp @@ -0,0 +1,63 @@ +/* + * 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 "WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_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 + WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy* WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_Factory(ServiceWrapper* target) + { + return new WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_Destructor(void* proxy) + { + delete (WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy*)proxy; + } +} + +WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy::WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy::~WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy() +{ + if (target) + delete target; +} + +char* WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy::doString( char* arg0) +{ + Operation operation("doString"); + operation.addParameter(&arg0); + char* ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + + diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h new file mode 100644 index 0000000000..36aa7a6992 --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h @@ -0,0 +1,34 @@ +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_h +#define WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_h + +#include "WSEntryPointTestRPC.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy : public WSEntryPointTestRPC +{ +public: + WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy(); + virtual char* doString( char* arg1); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_h + diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp new file mode 100644 index 0000000000..c20a5fb027 --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp @@ -0,0 +1,70 @@ +/* + * 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 "WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_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 + WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper* WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper(target); + } +} + +WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (WSEntryPointTestRPCImpl*)getImplementation(); +} + +WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::~WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper() +{ + releaseImplementation(); +} + +void* WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::newImplementation() +{ + return new WSEntryPointTestRPCImpl; +} + +void WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "doString") + { + char* p0 = *( char**)operation.getParameterValue(0); + *(char**)operation.getReturnValue() = impl->doString(p0); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h new file mode 100644 index 0000000000..875143461a --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h @@ -0,0 +1,36 @@ +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper_h +#define WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper_h + +#include "WSEntryPointTestRPCImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper(tuscany::sca::model::Service* target); + virtual ~WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + WSEntryPointTestRPCImpl* impl; +}; + +#endif // WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper_h + diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCModule.vcproj b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCModule.vcproj new file mode 100644 index 0000000000..d3bc172bcd --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCModule.vcproj @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/sca.module b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/sca.module new file mode 100644 index 0000000000..a6d397653e --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/sca.module @@ -0,0 +1,19 @@ + + + + + + + + WSEntryPointTestRPCServiceComponent + + + + + + + + + diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/services.xml b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/services.xml new file mode 100644 index 0000000000..2fd4580526 --- /dev/null +++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/services.xml @@ -0,0 +1,30 @@ + + + + tuscany_sca + D:/tuscany/cpp/sca/test/WSEntryPointTestRPC/runtime + WSEntryPointTestRPCSubsystem/WSEntryPointTestRPCService/WSEntryPointTestRPCEntrypoint + + + This is a testing service , to test the system is working or not + + + + + + + -- cgit v1.2.3