From d36c8e323a6f8df998edd185de8972dc5e6f87f0 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 16 Nov 2009 06:37:38 +0000 Subject: Cleaning up SVN structure, moving tag under sca-cpp/tags. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@880619 13f79535-47bb-0310-9956-ffa450edef68 --- .../runtime/core/test/src/.cdtbuild | 69 +++++++++++++++++++ .../runtime/core/test/src/.cdtproject | 15 +++++ .../runtime/core/test/src/.project | 19 ++++++ .../org.eclipse.cdt.managedbuilder.core.prefs | 9 +++ .../runtime/core/test/src/Makefile.am | 13 ++++ .../runtime/core/test/src/TestSCA.cpp | 77 ++++++++++++++++++++++ 6 files changed, 202 insertions(+) create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtbuild create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtproject create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.project create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/TestSCA.cpp (limited to 'sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src') diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtbuild b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtbuild new file mode 100644 index 0000000000..73f28e14fd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtbuild @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtproject b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtproject @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.project b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.project new file mode 100644 index 0000000000..5e5b12e9d8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.project @@ -0,0 +1,19 @@ + + + tuscany_sca_test + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..fe629d7d5b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,9 @@ +#Tue Nov 29 17:30:33 GMT 2005 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.961609061=\n\n\n\n\n +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.release.278641057=\n\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.961609061=\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.release.278641057=\n\n\n\n +environment/project=\n\n +environment/project/cdt.managedbuild.config.gnu.exe.debug.961609061=\n\n +environment/project/cdt.managedbuild.config.gnu.exe.release.278641057=\n\n diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/Makefile.am new file mode 100644 index 0000000000..1dfd79aa21 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/Makefile.am @@ -0,0 +1,13 @@ +prgbindir=$(prefix)/bin/test +prgbin_PROGRAMS = tuscany_sca_test +SUBDIRS = +AM_CPPFLAGS = $(CPPFLAGS) +tuscany_sca_test_SOURCES = TestSCA.cpp + +tuscany_sca_test_LDADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \ + -L${TUSCANY_SDOCPP}/lib -ltuscany_sca -lxml2 -lstdc++ \ + -L${AXISCPP_DEPLOY}/lib -laxis_client -laxis_clientC + +INCLUDES = -I$(top_builddir)/runtime/core/test/MyValue \ + -I$(top_builddir)/runtime/core/src \ + -I${TUSCANY_SDOCPP}/include diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/TestSCA.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/TestSCA.cpp new file mode 100644 index 0000000000..0143e32510 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/TestSCA.cpp @@ -0,0 +1,77 @@ +/* + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logger.h" +#include "commonj/sdo/Logger.h" +#include "osoa/sca/sca.h" +#include +using namespace osoa::sca; +using namespace tuscany::sca; +#include "MyValue.h" + +int main(int argc, char* argv[]) +{ + tuscany::sca::Logger::setLogging(3); + commonj::sdo::Logger::setLogging(20); + cout << "Start of SCA test" << endl; + + try + { + // Locate a service + ModuleContext myContext = ModuleContext::getCurrent(); + ModuleContext myContext2 = myContext; + + + MyValue* myService = (MyValue*) myContext.locateService("MyValueServiceComponent"); + if (myService == 0) + { + cout << "Unable to find service" << endl; + } + else + { + + try + { + float value = myService->getMyValue("12345"); + cout << "My value is: " << value << endl; + value = myService->getMyValueS("12345"); + cout << "My valueSS is: " << value << endl; + string custid = "fred"; + string name = myService->getCustname(custid); + cout << "Returned string: " << name.c_str() << " custid now: " << custid.c_str() <getCustnamecs(custid); + cout << "Returned string: " << csname.c_str() << " custid now: " << custid.c_str() <getMyValue("999"); + cout << "My value is: " << value << endl; + } + catch (char* x) + { + cout << "Exception caught: " << x << endl; + } + } + cout << "End of SCA test" << endl; + + } + catch (ServiceRuntimeException& ex) + { + cout << ex << endl; + } + return 0; +} -- cgit v1.2.3