You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ro...@apache.org on 2006/05/25 16:20:17 UTC
svn commit: r409397 - in /incubator/tuscany/cpp/sca: projects/tuscany_sca/
projects/tuscany_sca/tuscany_sca/ runtime/core/test/MyValue/
runtime/core/test/src/
Author: robbinspg
Date: Thu May 25 07:20:16 2006
New Revision: 409397
URL: http://svn.apache.org/viewvc?rev=409397&view=rev
Log:
TUSCANY-89 - test program
Modified:
incubator/tuscany/cpp/sca/projects/tuscany_sca/tuscany_sca.ncb
incubator/tuscany/cpp/sca/projects/tuscany_sca/tuscany_sca.opt
incubator/tuscany/cpp/sca/projects/tuscany_sca/tuscany_sca/Build Instructions.txt
incubator/tuscany/cpp/sca/runtime/core/test/MyValue/MyValueImpl.cpp
incubator/tuscany/cpp/sca/runtime/core/test/src/TestSCA.cpp
Modified: incubator/tuscany/cpp/sca/projects/tuscany_sca/tuscany_sca.ncb
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/projects/tuscany_sca/tuscany_sca.ncb?rev=409397&r1=409396&r2=409397&view=diff
==============================================================================
Binary files - no diff available.
Modified: incubator/tuscany/cpp/sca/projects/tuscany_sca/tuscany_sca.opt
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/projects/tuscany_sca/tuscany_sca.opt?rev=409397&r1=409396&r2=409397&view=diff
==============================================================================
Binary files - no diff available.
Modified: incubator/tuscany/cpp/sca/projects/tuscany_sca/tuscany_sca/Build Instructions.txt
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/projects/tuscany_sca/tuscany_sca/Build%20Instructions.txt?rev=409397&r1=409396&r2=409397&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/projects/tuscany_sca/tuscany_sca/Build Instructions.txt (original)
+++ incubator/tuscany/cpp/sca/projects/tuscany_sca/tuscany_sca/Build Instructions.txt Thu May 25 07:20:16 2006
@@ -19,14 +19,9 @@
2) Add %TUSCANY_SCACPP%\lib and %TUSCANY_SDOCPP%\lib to the PATH
(ensure required libraries for SDO are also on the path. e.g. libxml2)
-3) Set the environment variable TUSCANY_SCACPP_SYSTEM_ROOT to the test system folder
- (%TUSCANY_SCACPP%\projects\tuscany_sca\tuscany_sca_test\testSCASystem)
+3) cd %TUSCANY_SCACPP%\projects\tuscany_sca\tuscany_sca_test\Debug
-4) Set the environment variable TUSCANY_SCACPP_DEFAULT_MODULE=SubSystem1
-
-5) cd %TUSCANY_SCACPP%\projects\tuscany_sca\tuscany_sca_test\Debug
-
-6) tuscany_sca_test
+4) tuscany_sca_test
NOTE: To run the test from the workspace the environment variables must be set
BEFORE launching Visual Studio
Modified: incubator/tuscany/cpp/sca/runtime/core/test/MyValue/MyValueImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/test/MyValue/MyValueImpl.cpp?rev=409397&r1=409396&r2=409397&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/test/MyValue/MyValueImpl.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/test/MyValue/MyValueImpl.cpp Thu May 25 07:20:16 2006
@@ -25,7 +25,7 @@
#include "osoa/sca/sca.h"
#include "commonj/sdo/SDO.h"
-#include <tuscany/sca/util/Utils.h>
+
using namespace osoa::sca;
using namespace commonj::sdo;
@@ -109,7 +109,6 @@
XMLDocumentPtr stockDoc = xmlHelper->load(result.c_str());
if (stockDoc->getRootDataObject())
{
- tuscany::sca::Utils::printDO(stockDoc->getRootDataObject());
stockPrice=stockDoc->getRootDataObject()->getFloat("Stock.0/Last");
}
@@ -117,6 +116,7 @@
catch (SDORuntimeException e)
{
cout << e;
+ throw;
}
return stockPrice;
Modified: incubator/tuscany/cpp/sca/runtime/core/test/src/TestSCA.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/test/src/TestSCA.cpp?rev=409397&r1=409396&r2=409397&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/test/src/TestSCA.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/test/src/TestSCA.cpp Thu May 25 07:20:16 2006
@@ -33,8 +33,17 @@
cout << "Start of SCA test" << endl;
// Set default module
+ string systemRoot = getenv("TUSCANY_SCACPP");
+ if (systemRoot == "")
+ {
+ cout << "TUSCANY_SCACPP environment variable not set" <<endl;
+ return -1;
+ }
+
+ systemRoot += "/projects/tuscany_sca/tuscany_sca_test/testSCASystem";
+
+ TuscanyRuntime runtime("SubSystem1", systemRoot);
- TuscanyRuntime runtime("SubSystem1");
try
{
runtime.start();
@@ -42,7 +51,7 @@
// Locate a service
ModuleContext myContext = ModuleContext::getCurrent();
ModuleContext myContext2 = myContext;
-
+
MyValue* myService = (MyValue*) myContext.locateService("MyValueServiceComponent");
if (myService == 0)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org