You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/08/09 11:28:16 UTC

svn commit: r430012 [1/4] - in /incubator/tuscany/cpp/sca: runtime/core/src/ runtime/core/src/osoa/sca/ runtime/core/src/tuscany/sca/core/ runtime/core/src/tuscany/sca/model/ runtime/core/src/tuscany/sca/util/ runtime/core/src/tuscany/sca/ws/ runtime/w...

Author: jsdelfino
Date: Wed Aug  9 02:28:11 2006
New Revision: 430012

URL: http://svn.apache.org/viewvc?rev=430012&view=rev
Log:
Support for the new composite model, stage 2. Changed model loader to support the new XSDs, first pass at model changes to implement composites, adjusted packaging to use composites instead of modules and subsystems. The Calculator sample is working with the new model.

Added:
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeReferenceWrapper.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeReferenceWrapper.h   (with props)
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeService.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeService.h   (with props)
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeReferenceType.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeReferenceType.h   (with props)
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeServiceType.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeServiceType.h   (with props)
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/ws/WSReferenceWrapper.h   (with props)
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/ws/WSServiceProxy.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/ws/WSServiceProxy.h   (with props)
    incubator/tuscany/cpp/sca/runtime/ws_reference/axis2c/src/WSReferenceWrapper.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/ws_service/axis2c/src/Axis2Service_skeleton.cpp   (with props)
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/Accounts.composite
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/StockQuoteWebService.h   (with props)
    incubator/tuscany/cpp/sca/samples/BigBank/BigBankSubsystem/BigBankSubsystem.composite
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorComposite/CalculatorComposite.composite
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorComposite/CalculatorImpl_divideService_Proxy.cpp   (with props)
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorComposite/CalculatorImpl_divideService_Proxy.h   (with props)
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.composite
    incubator/tuscany/cpp/sca/xsd/sca-composite.xsd   (with props)
    incubator/tuscany/cpp/sca/xsd/sca-implementation-composite.xsd   (with props)
Removed:
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/EntryPoint.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/EntryPoint.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ExternalService.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ExternalService.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/ws/EntryPointProxy.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/ws/EntryPointProxy.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h
    incubator/tuscany/cpp/sca/runtime/ws_reference/axis2c/src/WSServiceWrapper.cpp
    incubator/tuscany/cpp/sca/runtime/ws_service/axis2c/src/Axis2EntryPointService_skeleton.cpp
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/StockQuoteExternalService.h
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/sca.composite
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/sca.composite.lin
    incubator/tuscany/cpp/sca/samples/BigBank/BigBankSubsystem/sca.subsystem
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorComposite/CalculatorImpl_CalculatorDivideService_Proxy.cpp
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorComposite/CalculatorImpl_CalculatorDivideService_Proxy.h
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorComposite/sca.composite
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorComposite/sca.composite.lin
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorSubsystem/sca.subsystem
    incubator/tuscany/cpp/sca/xsd/new/
Modified:
    incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am
    incubator/tuscany/cpp/sca/runtime/core/src/osoa/sca/ComponentContextImpl.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Binding.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CPPInterface.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Subsystem.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Subsystem.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WireTarget.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.h
    incubator/tuscany/cpp/sca/runtime/ws_reference/axis2c/src/Axis2Client.cpp
    incubator/tuscany/cpp/sca/runtime/ws_reference/axis2c/src/Axis2Client.h
    incubator/tuscany/cpp/sca/runtime/ws_reference/axis2c/src/Makefile.am
    incubator/tuscany/cpp/sca/runtime/ws_service/axis2c/src/Makefile.am
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/AccountDataServiceImpl.componentType
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/AccountServiceImpl.componentType
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/AccountServiceImpl.cpp
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/Makefile.am
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/StockQuoteService.h
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.componentType
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.cpp
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.h
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorComposite/CalculatorImpl.componentType
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorComposite/CalculatorImpl.cpp
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorComposite/DivideServiceImpl.componentType
    incubator/tuscany/cpp/sca/samples/Calculator/CalculatorComposite/Makefile.am
    incubator/tuscany/cpp/sca/samples/Calculator/Makefile.am
    incubator/tuscany/cpp/sca/test/WSEntryPointTest/WSEntryPointTestComposite/WSEntryPointTest.h
    incubator/tuscany/cpp/sca/test/WSEntryPointTest/WSEntryPointTestComposite/WSEntryPointTestImpl.cpp
    incubator/tuscany/cpp/sca/test/WSEntryPointTest/WSEntryPointTestComposite/WSEntryPointTestImpl.h
    incubator/tuscany/cpp/sca/test/WSEntryPointTest/WSEntryPointTestComposite/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.cpp
    incubator/tuscany/cpp/sca/test/WSEntryPointTest/WSEntryPointTestComposite/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.h
    incubator/tuscany/cpp/sca/test/WSEntryPointTest/WSEntryPointTestComposite/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.cpp
    incubator/tuscany/cpp/sca/test/WSEntryPointTest/WSEntryPointTestComposite/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.h
    incubator/tuscany/cpp/sca/test/WSEntryPointTest/runtime/composites/WSEntryPointTestComposite/WSEntryPointTest.h
    incubator/tuscany/cpp/sca/test/WSEntryPointTest/runtime/composites/WSEntryPointTestComposite/WSEntryPointTestImpl.h
    incubator/tuscany/cpp/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.h
    incubator/tuscany/cpp/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.cpp
    incubator/tuscany/cpp/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.h
    incubator/tuscany/cpp/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp
    incubator/tuscany/cpp/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h
    incubator/tuscany/cpp/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp
    incubator/tuscany/cpp/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h
    incubator/tuscany/cpp/sca/test/WSEntryPointTestRPC/runtime/composites/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.h
    incubator/tuscany/cpp/sca/test/WSEntryPointTestRPC/runtime/composites/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.h
    incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java
    incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java
    incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/CompositeOrFragmentFileHandler.java
    incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java
    incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java
    incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java
    incubator/tuscany/cpp/sca/xsd/sca-binding-sca.xsd
    incubator/tuscany/cpp/sca/xsd/sca-binding-webservice.xsd
    incubator/tuscany/cpp/sca/xsd/sca-core.xsd
    incubator/tuscany/cpp/sca/xsd/sca-implementation-cpp.xsd
    incubator/tuscany/cpp/sca/xsd/sca-implementation-java.xsd
    incubator/tuscany/cpp/sca/xsd/sca-interface-cpp.xsd
    incubator/tuscany/cpp/sca/xsd/sca-interface-java.xsd
    incubator/tuscany/cpp/sca/xsd/sca-interface-wsdl.xsd
    incubator/tuscany/cpp/sca/xsd/sca.xsd
    incubator/tuscany/cpp/sca/xsd/tuscany.xsd

Modified: incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am?rev=430012&r1=430011&r2=430012&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am Wed Aug  9 02:28:11 2006
@@ -10,9 +10,9 @@
 osoa/sca/ServiceList.h \
 osoa/sca/ServiceRuntimeException.h \
 tuscany/sca/core/ComponentServiceWrapper.h \
-tuscany/sca/core/ExternalServiceWrapper.h \
+tuscany/sca/core/CompositeReferenceWrapper.h \
 tuscany/sca/core/Operation.h \
-tuscany/sca/core/SCAEntryPoint.h \
+tuscany/sca/core/CompositeService.h \
 tuscany/sca/core/SCARuntime.h \
 tuscany/sca/core/ServiceProxy.h \
 tuscany/sca/core/ServiceWrapper.h \
@@ -21,8 +21,8 @@
 tuscany/sca/model/Component.h \
 tuscany/sca/model/CPPImplementation.h \
 tuscany/sca/model/CPPInterface.h \
-tuscany/sca/model/EntryPoint.h \
-tuscany/sca/model/ExternalService.h \
+tuscany/sca/model/CompositeServiceType.h \
+tuscany/sca/model/CompositeReferenceType.h \
 tuscany/sca/model/Implementation.h \
 tuscany/sca/model/Interface.h \
 tuscany/sca/model/ModelLoader.h \
@@ -45,8 +45,8 @@
 tuscany/sca/util/Logging.h \
 tuscany/sca/util/LogWriter.h \
 tuscany/sca/util/Utils.h \
-tuscany/sca/ws/WSServiceWrapper.h \
-tuscany/sca/ws/EntryPointProxy.h
+tuscany/sca/ws/WSReferenceWrapper.h \
+tuscany/sca/ws/WSServiceProxy.h
 
 
 libtuscany_sca_la_SOURCES = \
@@ -68,8 +68,8 @@
 tuscany/sca/model/Component.cpp \
 tuscany/sca/model/CPPImplementation.cpp \
 tuscany/sca/model/CPPInterface.cpp \
-tuscany/sca/model/EntryPoint.cpp \
-tuscany/sca/model/ExternalService.cpp \
+tuscany/sca/model/CompositeServiceType.cpp \
+tuscany/sca/model/CompositeReferenceType.cpp \
 tuscany/sca/model/Implementation.cpp \
 tuscany/sca/model/Interface.cpp \
 tuscany/sca/model/ModelLoader.cpp \
@@ -84,14 +84,14 @@
 tuscany/sca/model/Wsdl.cpp \
 tuscany/sca/model/WsdlOperation.cpp \
 tuscany/sca/core/ComponentServiceWrapper.cpp \
-tuscany/sca/core/ExternalServiceWrapper.cpp \
+tuscany/sca/core/CompositeReferenceWrapper.cpp \
 tuscany/sca/core/Operation.cpp \
-tuscany/sca/core/SCAEntryPoint.cpp \
+tuscany/sca/core/CompositeService.cpp \
 tuscany/sca/core/SCARuntime.cpp \
 tuscany/sca/core/ServiceProxy.cpp \
 tuscany/sca/core/ServiceWrapper.cpp \
 tuscany/sca/core/TuscanyRuntime.cpp \
-tuscany/sca/ws/EntryPointProxy.cpp
+tuscany/sca/ws/WSServiceProxy.cpp
 
 libtuscany_sca_la_LIBADD = -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo \
     -L$(top_builddir)/runtime/ws_reference/axis2c/src -ltuscany_sca_ws_reference

Modified: incubator/tuscany/cpp/sca/runtime/core/src/osoa/sca/ComponentContextImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/osoa/sca/ComponentContextImpl.cpp?rev=430012&r1=430011&r2=430012&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/osoa/sca/ComponentContextImpl.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/osoa/sca/ComponentContextImpl.cpp Wed Aug  9 02:28:11 2006
@@ -22,7 +22,7 @@
 #include "osoa/sca/ComponentContextImpl.h"
 #include "tuscany/sca/model/WireTarget.h"
 #include "tuscany/sca/core/ComponentServiceWrapper.h"
-#include "tuscany/sca/core/ExternalServiceWrapper.h"
+#include "tuscany/sca/core/CompositeReferenceWrapper.h"
 #include "tuscany/sca/model/CPPImplementation.h"
 #include "tuscany/sca/model/Composite.h"
 
@@ -213,12 +213,12 @@
             // -------------------------
             switch (target->getServiceType())
             {
-            case WireTarget::ExternalServiceType:
+            case WireTarget::CompositeReferenceTypeType:
                 {
                     // ----------------
                     // External Service
                     // ----------------
-                    return ExternalServiceWrapper::createServiceWrapper((ExternalService*)target);
+                    return CompositeReferenceWrapper::createServiceWrapper((CompositeReferenceType*)target);
                 }
                 
             case WireTarget::ComponentServiceType:

Modified: incubator/tuscany/cpp/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.h?rev=430012&r1=430011&r2=430012&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.h Wed Aug  9 02:28:11 2006
@@ -217,16 +217,16 @@
         /**
          * Unable to find the specified entry point in the composite.
          */
-        class SCA_API EntryPointNotFoundException: public ServiceRuntimeException
+        class SCA_API CompositeServiceTypeNotFoundException: public ServiceRuntimeException
         {
         public:
-            EntryPointNotFoundException(const char* msg)
-                : ServiceRuntimeException("EntryPointNotFoundException", Error,
+            CompositeServiceTypeNotFoundException(const char* msg)
+                : ServiceRuntimeException("CompositeServiceTypeNotFoundException", Error,
                 msg)
             {
             }
         private:
-        }; // End EntryPointNotFoundException class definition
+        }; // End CompositeServiceTypeNotFoundException class definition
 
         
         

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp?rev=430012&r1=430011&r2=430012&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp Wed Aug  9 02:28:11 2006
@@ -21,6 +21,7 @@
 
 #include "tuscany/sca/util/Exceptions.h"
 #include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Utils.h"
 #include "tuscany/sca/core/SCARuntime.h"
 #include "tuscany/sca/model/CPPImplementation.h"
 using namespace osoa::sca;
@@ -41,6 +42,9 @@
             : ServiceWrapper(target), service(target)
         {
             LOGENTRY(1,"ComponentServiceWrapper::constructor");
+
+            Utils::breakpoint();
+            
             if (target->getServiceType() != WireTarget::ComponentServiceType)
             {
                 throw ServiceRuntimeException("ComponentServiceWrapper: target is not a component service");

Added: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeReferenceWrapper.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeReferenceWrapper.cpp?rev=430012&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeReferenceWrapper.cpp (added)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeReferenceWrapper.cpp Wed Aug  9 02:28:11 2006
@@ -0,0 +1,102 @@
+/*
+ *
+ *  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/core/CompositeReferenceWrapper.h"
+#include <stdarg.h>
+
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/core/SCARuntime.h"
+
+#include "tuscany/sca/ws/WSReferenceWrapper.h"
+using tuscany::sca::ws::WSReferenceWrapper;
+
+using namespace osoa::sca;
+
+
+namespace tuscany
+{
+    namespace sca
+    {
+        
+        //////////////////////////////////////////////////////////////////////
+        // Construction/Destruction
+        //////////////////////////////////////////////////////////////////////
+        
+        CompositeReferenceWrapper::CompositeReferenceWrapper(tuscany::sca::model::WireTarget* target)
+            : ServiceWrapper(target)
+        {
+            LOGENTRY(1,"CompositeReferenceWrapper::constructor");
+            if (target->getServiceType() != WireTarget::CompositeReferenceTypeType)
+            {
+                throw ServiceRuntimeException("CompositeReferenceWrapper: target is not an CompositeReferenceType");
+            }
+            
+            LOGEXIT(1,"CompositeReferenceWrapper::constructor");
+            
+        }
+        
+        CompositeReferenceWrapper::~CompositeReferenceWrapper()
+        {
+            LOGENTRY(1,"CompositeReferenceWrapper::destructor");
+            LOGEXIT(1,"CompositeReferenceWrapper::destructor");
+        }
+
+        // ======================================================================
+        // createServiceWrapper: create a wrapper for the target CompositeReferenceType
+        // ======================================================================
+        CompositeReferenceWrapper* CompositeReferenceWrapper::createServiceWrapper(CompositeReferenceType* service)
+        {            
+            string msg;
+            CompositeReferenceWrapper* serviceWrapper = 0;
+
+            // -----------------------------------------------
+            // Get the binding for the target component
+            // -----------------------------------------------
+            Binding* targetBinding = service->getBinding();
+            if (!targetBinding)
+            {
+                msg = "External service " + service->getName() + " has no binding defined";
+                throw ServiceNotFoundException(msg.c_str());
+            }
+            
+            // TODO: This only handles ws implementation for now
+            if (targetBinding->getBindingType() == Binding::WS)
+            {
+                // -------------------------------------
+                // Create an instance of the wrapper
+                // -------------------------------------                
+                serviceWrapper = new WSReferenceWrapper(service);
+                
+            }
+            else
+            {
+                // ----------------------
+                // Non WS Binding
+                // ----------------------
+                msg = "Unsupported binding type for externalService: " + service->getName();
+                throw ServiceNotFoundException(msg.c_str());
+            }        
+            
+            return serviceWrapper;
+        }    
+    
+        
+    } // End namespace sca
+} // End namespace tuscany

Propchange: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeReferenceWrapper.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeReferenceWrapper.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeReferenceWrapper.h?rev=430012&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeReferenceWrapper.h (added)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeReferenceWrapper.h Wed Aug  9 02:28:11 2006
@@ -0,0 +1,81 @@
+/*
+ *
+ *  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 $ */
+
+#ifndef tuscany_sca_core_compositereferencewrapper_h
+#define tuscany_sca_core_compositereferencewrapper_h
+
+#include "osoa/sca/export.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+#include "tuscany/sca/core/Operation.h"
+#include "tuscany/sca/model/CompositeReferenceType.h"
+using tuscany::sca::model::CompositeReferenceType;
+
+namespace tuscany
+{
+    namespace sca
+    {
+        
+        /**
+         * Wraps an SCA external service so that it can be called by a 
+         * proxy.
+         * This abstract class will be extended by a class which supports
+         * a specific external service binding (for example, the web services binding).
+         */
+        class SCA_API CompositeReferenceWrapper : public ServiceWrapper
+        {
+        public:
+            /**
+             * Factory method to create a new ExternaServiceWrapper for a given
+             * external service described in the SCA composite.
+             */
+            static CompositeReferenceWrapper* createServiceWrapper(CompositeReferenceType* service);
+
+            /**
+             * Constructor.
+             * @param target The target external service for which this wrapper is to be
+             * created.
+             * @return A wrapper that references the given target.
+             */
+            CompositeReferenceWrapper(tuscany::sca::model::WireTarget* target);
+
+            /**
+             * Destructor.
+             */
+            virtual    ~CompositeReferenceWrapper();
+
+            /**
+             * Return the external service (in the runtime model) that is wrapped by 
+             * the instance of this class.
+             */
+            virtual CompositeReferenceType* getCompositeReferenceType() {return (CompositeReferenceType*)getTarget();};
+
+            /**
+             * All business method calls to the external service go through the invoke method.
+             * This is a delegated method which will be implemented by the subclass.
+             * @param operation The details of the method, paramaters and return value for the
+             * business method to be called on the external service.
+             */
+            virtual void invoke(Operation& operation) = 0;
+        private:
+            
+        };
+    } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_core_compositereferencewrapper_h

Propchange: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeReferenceWrapper.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeService.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeService.cpp?rev=430012&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeService.cpp (added)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeService.cpp Wed Aug  9 02:28:11 2006
@@ -0,0 +1,210 @@
+/*
+ *
+ *  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/core/CompositeService.h"
+
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/core/SCARuntime.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+#include "tuscany/sca/core/CompositeReferenceWrapper.h"
+using namespace osoa::sca;
+
+namespace tuscany
+{
+    namespace sca
+    {
+        // ===========
+        // Constructor
+        // ===========
+        CompositeService::CompositeService(const char* epName)
+            : subsystem(0), compositeService(0), composite(0)
+        {
+            LOGENTRY(1,"CompositeService::constructor");
+            string message;
+    
+            // initialize the system if necessary
+            System* system = SCARuntime::getInstance()->getSystem();
+
+            string subsystemName;
+            string compositeServiceName;
+
+            Utils::tokeniseUri(epName, subsystemName, compositeServiceName);
+
+            // --------------------
+            // locate the Subsystem
+            // --------------------
+            subsystem = system->findSubsystem(subsystemName);
+            if (!subsystem)
+            {
+                throw CompositeServiceTypeNotFoundException(epName);
+            }
+
+            // ---------------------
+            // locate the CompositeServiceType
+            // ---------------------
+            compositeService =  subsystem->findCompositeServiceType(compositeServiceName);
+            if (compositeService)
+            {
+                // found Subsystem CompositeServiceType
+                throw CompositeServiceTypeNotFoundException("Subsystem CompositeServiceType not yet supported");
+            }
+            else
+            {
+                // -----------------------------------
+                // locate the CompositeServiceType in the Composite
+                // -----------------------------------
+                string compositeComponentName;
+                Utils::tokeniseUri(compositeServiceName, compositeComponentName, compositeServiceName);
+                composite = subsystem->findCompositeByComponentName(compositeComponentName);
+                if (composite)
+                {
+                    dataFactory = composite->getDataFactory();
+                    compositeService = composite->findCompositeServiceType(compositeServiceName);
+                }
+            }
+    
+            if (!compositeService)
+            {
+                throw CompositeServiceTypeNotFoundException(epName);
+            }
+
+            // ---------------------------------
+            // Get Wrappers for each wire target
+            // ---------------------------------
+
+            // Get the target services from the CompositeServiceType
+            const CompositeServiceType::TARGETS& targets = compositeService->getTargets();
+            
+            // --------------------
+            // Validate the request
+            // --------------------
+            switch (compositeService->getMultiplicity())
+            {
+            case CompositeServiceType::ONE_MANY:
+            case CompositeServiceType::ONE_ONE:
+                {
+                    if (targets.size() == 0)
+                    {
+                        message = "CompositeServiceType " + compositeService->getName() + " not wired";
+                        throw ServiceNotFoundException(message.c_str());
+                    }
+                }
+            default:
+                {
+                }
+            } // end switch
+
+            for (CompositeServiceType::TARGETS::const_iterator iter = targets.begin();
+            iter!=targets.end();
+            iter++)
+            {
+                ServiceWrapper* service = getServiceWrapper(*iter);
+                if (service)
+                {
+                    services.push_back(service);
+                }
+            }
+        
+            LOGEXIT(1,"CompositeService::constructor");
+        }
+        
+        // ==========
+        // Destructor
+        // ==========
+        CompositeService::~CompositeService()
+        {
+            LOGENTRY(1,"CompositeService::destructor");
+
+            // Delete any ServiceWrappers
+            for (SERVICES::iterator iter = services.begin(); iter < services.end(); iter++)
+            {                
+                delete (*iter);
+            }
+            LOGEXIT(1,"CompositeService::destructor");
+        }
+        
+
+        // ======================================================================
+        // invoke: 
+        // ======================================================================
+        SCA_API void CompositeService::invoke(Operation& operation)
+        {
+            LOGENTRY(1,"CompositeService::invoke");
+            string message;
+
+            // --------------------
+            // Validate the request
+            // --------------------
+            if (services.size() == 0)
+            {
+                message = "CompositeServiceType " + compositeService->getName() + " not wired";
+                throw ServiceNotFoundException(message.c_str());
+            }
+
+            // -------------------
+            // Invoke each target
+            // -------------------
+            for (SERVICES::iterator iter = services.begin(); iter < services.end(); iter++)
+            {                
+                (*iter)->invoke(operation);
+            }
+            LOGEXIT(1,"CompositeService::invoke");
+        }
+
+
+        // ======================================================================
+        // getServiceWrapper: Create and return an instance of the ServiceWrapper
+        // ======================================================================
+        ServiceWrapper* CompositeService::getServiceWrapper(WireTarget* target)
+        {    
+            // -------------------------
+            // Determine type of Service
+            // -------------------------
+            switch (target->getServiceType())
+            {
+            case WireTarget::CompositeReferenceTypeType:
+                {
+                    // ----------------
+                    // External Service
+                    // ----------------
+                    return CompositeReferenceWrapper::createServiceWrapper((CompositeReferenceType*)target);
+                }
+                
+            case WireTarget::ComponentServiceType:
+                {
+                    // -----------------
+                    // Component Service
+                    // -----------------
+                    return ComponentServiceWrapper::createServiceWrapper((Service*)target);
+                }
+                
+            default:
+                {
+                    string message = "Undefined wire target type for : ";
+                    message = message + target->getName();
+                    throw ServiceNotFoundException(message.c_str());
+                }
+            } // end switch
+        }
+        
+        
+    } // End namespace sca
+} // End namespace tuscany

Propchange: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeService.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeService.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeService.h?rev=430012&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeService.h (added)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeService.h Wed Aug  9 02:28:11 2006
@@ -0,0 +1,122 @@
+/*
+ *
+ *  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 $ */
+
+#ifndef tuscany_sca_core_scacompositeservice_h
+#define tuscany_sca_core_scacompositeservice_h
+
+#include "osoa/sca/export.h"
+
+#include <vector>
+using std::vector;
+#include "tuscany/sca/core/ServiceWrapper.h"
+#include "tuscany/sca/model/WireTarget.h"
+#include "tuscany/sca/model/Subsystem.h"
+#include "tuscany/sca/model/CompositeServiceType.h"
+#include "tuscany/sca/model/Composite.h"
+using namespace tuscany::sca::model;
+#include "commonj/sdo/SDO.h"
+using commonj::sdo::DataObjectPtr;
+using commonj::sdo::DataFactoryPtr;
+
+namespace tuscany
+{
+    namespace sca
+    {
+        /**
+         * A runtime class which is used by external bindings to provide the entry
+         * point into the SCA runtime. An entry point will be defined in an SCA
+         * composite, and a binding class will be provided to service the
+         * communication between the external binding (e.g. for web services the
+         * SOAP/HTTP communication) and the SCA runtime. The binding class will
+         * use CompositeService to call into the SCA runtime.
+         */
+        class  CompositeService
+        {
+        public:
+            /**
+             * Constructor to create a new instance which will be associated with
+             * a given entry point in an SCA composite.
+             * @param compositeServiceName The qualified name of the entry point in an 
+             * SCA composite. It is of the form 
+             * "subsystem name"/"composite component name"/"entry point name".
+             */
+            SCA_API CompositeService(const char* compositeServiceName);
+
+            /**
+             * Destructor.
+             */
+            SCA_API virtual    ~CompositeService();
+
+            /**
+             * Invokes an operation on the component to which the SCA entry point
+             * is wired in the SCA composite.
+             * @param operation. The operation request
+             */
+            SCA_API virtual void invoke(Operation& operation);
+
+            /**
+             * Returns a SDO data factory from which all the types associated with the entry point
+             * and composite can be created.
+             */
+            SCA_API DataFactoryPtr getDataFactory() {return dataFactory;}
+
+        protected:
+
+        private:
+            /**
+             * The subsystem in which this entry point is found.
+             */ 
+            Subsystem* subsystem;
+
+            /**
+             * The entry point in the composite.
+             */
+            CompositeServiceType* compositeService;
+
+            /**
+             * The composite component in the subsystem.
+             */
+            Composite* composite;
+
+            /**
+             * Cached data factory which has all the types defined for the composite in which
+             * this entry point is found.
+             */
+            DataFactoryPtr dataFactory;
+
+            typedef vector<ServiceWrapper*> SERVICES;
+            /**
+             * Vector of all the service wrappers created for this entry point. 
+             * Used to destroy the wrappers when this class is destroyed.
+             */
+            SERVICES services;
+
+            /**
+             * Creates and returns the service wrapper for a given target.
+             * @param target The target of the wire for which a service wrapper is
+             * to be created.
+             * @return A service wrapper to be used for invoking the target implementation.
+             */
+            ServiceWrapper* getServiceWrapper(WireTarget* target);
+            
+        };
+    } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_core_scacompositeservice_h

Propchange: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeService.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Binding.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Binding.h?rev=430012&r1=430011&r2=430012&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Binding.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Binding.h Wed Aug  9 02:28:11 2006
@@ -30,7 +30,7 @@
         namespace model
         {
             /**
-             * Information about the binding for EntryPoint and ExternalService. An
+             * Information about the binding for CompositeServiceType and CompositeReferenceType. An
              * abstract class which will be extended by classes that hold specific
              * information for each type of binding.
              */

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CPPInterface.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CPPInterface.cpp?rev=430012&r1=430011&r2=430012&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CPPInterface.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CPPInterface.cpp Wed Aug  9 02:28:11 2006
@@ -18,6 +18,7 @@
 /* $Rev$ $Date: 2005/12/22 11:33:21 $ */
 
 #include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Utils.h"
 #include "tuscany/sca/model/CPPInterface.h"
 
 
@@ -37,6 +38,7 @@
                     bool remote)
                     : header(head), className(classN), remotable(remote)
             {
+                Utils::breakpoint();
                  string::size_type dot = header.rfind(".h"); // this will also find .hpp
                 if (dot != string::npos)
                 {

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.cpp?rev=430012&r1=430011&r2=430012&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.cpp Wed Aug  9 02:28:11 2006
@@ -89,7 +89,6 @@
             void Component::addProperty(const string& name,
                 const string& type,
                 bool many,
-                bool required,
                 const char* defaultValue)
             {
                 // Create a Type in the Properties dataFactory
@@ -213,11 +212,6 @@
 
                 // Set the default
                 
-                
-                // Add to list of required properties
-                if (required)
-                {
-                }
             }
             
             DataFactoryPtr Component::getPropertyDataFactory()

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.h?rev=430012&r1=430011&r2=430012&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.h Wed Aug  9 02:28:11 2006
@@ -121,14 +121,12 @@
                  * @param name The name of the property.
                  * @param type The full name of the type (including uri and local name).
                  * @param many True if this is a many valued property.
-                 * @param required True if this property must have a value set.
                  * @param defaultValue The default value if the property does not have a
                  * value set.
                  */
                 void addProperty(const string& name,
                     const string& type,
                     bool many,
-                    bool required,
                     const char* defaultValue = 0);
     
                 /**

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.cpp?rev=430012&r1=430011&r2=430012&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.cpp Wed Aug  9 02:28:11 2006
@@ -89,36 +89,36 @@
                 return service;
             }
             
-            ExternalService* Composite::findExternalService(const std::string& name)
+            CompositeReferenceType* Composite::findCompositeReferenceType(const std::string& name)
             {
-                LOGENTRY(1, "Composite::findExternalService");
-                ExternalService* foundService = externalServices[name];
-                LOGEXIT(1, "Composite::findExternalService");
+                LOGENTRY(1, "Composite::findCompositeReferenceType");
+                CompositeReferenceType* foundService = externalServices[name];
+                LOGEXIT(1, "Composite::findCompositeReferenceType");
                 return foundService;
             }
             
             
-            EntryPoint* Composite::addEntryPoint(const std::string& name)
+            CompositeServiceType* Composite::addCompositeServiceType(const std::string& name)
             {
-                LOGENTRY(1, "Composite::addEntryPoint");
-                EntryPoint* ep = new EntryPoint(name);
-                entryPoints[name] = ep;
-                LOGEXIT(1, "Composite::addEntryPoint");
-                return findEntryPoint(name);
+                LOGENTRY(1, "Composite::addCompositeServiceType");
+                CompositeServiceType* ep = new CompositeServiceType(name);
+                compositeServices[name] = ep;
+                LOGEXIT(1, "Composite::addCompositeServiceType");
+                return findCompositeServiceType(name);
             }
             
-            EntryPoint* Composite::findEntryPoint(const std::string& name)
+            CompositeServiceType* Composite::findCompositeServiceType(const std::string& name)
             {
-                return entryPoints[name];
+                return compositeServices[name];
             }
 
 
-            ExternalService* Composite::addExternalService(const std::string& name)
+            CompositeReferenceType* Composite::addCompositeReferenceType(const std::string& name)
             {
-                LOGENTRY(1, "Composite::addExternalService");
-                ExternalService* es = new ExternalService(name, this);
+                LOGENTRY(1, "Composite::addCompositeReferenceType");
+                CompositeReferenceType* es = new CompositeReferenceType(name, this);
                 externalServices[name] = es;
-                LOGEXIT(1, "Composite::addExternalService");
+                LOGEXIT(1, "Composite::addCompositeReferenceType");
                 return es;
             }
             
@@ -143,7 +143,7 @@
                     WireTarget* target = findComponentService(iter->getTarget());
                     if (!target)
                     {
-                        target = findExternalService(iter->getTarget());
+                        target = findCompositeReferenceType(iter->getTarget());
                     }
                     if (!target)
                     {
@@ -151,7 +151,7 @@
                     }
                     else
                     {
-                        EntryPoint* entrypoint = findEntryPoint(iter->getSourceComponent());
+                        CompositeServiceType* entrypoint = findCompositeServiceType(iter->getSourceComponent());
                         if (entrypoint)
                         {
                             entrypoint->addTarget(target);

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.h?rev=430012&r1=430011&r2=430012&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.h Wed Aug  9 02:28:11 2006
@@ -32,8 +32,8 @@
 
 
 #include "tuscany/sca/model/Component.h"
-#include "tuscany/sca/model/ExternalService.h"
-#include "tuscany/sca/model/EntryPoint.h"
+#include "tuscany/sca/model/CompositeReferenceType.h"
+#include "tuscany/sca/model/CompositeServiceType.h"
 #include "tuscany/sca/model/Wire.h"
 #include "tuscany/sca/model/Wsdl.h"
 
@@ -92,21 +92,21 @@
                  * @param name The name of the new entry point.
                  * @return The entry point added to the composite.
                  */
-                EntryPoint* addEntryPoint(const std::string& name);
+                CompositeServiceType* addCompositeServiceType(const std::string& name);
 
                 /**
                  * Find an entry point by name.
                  * @param name The name of the entry point to be found.
                  * @return The entry point that was found, or 0 if not found.
                  */
-                EntryPoint* findEntryPoint(const std::string& name);
+                CompositeServiceType* findCompositeServiceType(const std::string& name);
                 
                 /**
                  * Add a new external service to the composite.
                  * @param name The name of the new external service.
                  * @return The external service added to the composite.
                  */
-                ExternalService* addExternalService(const std::string& name);
+                CompositeReferenceType* addCompositeReferenceType(const std::string& name);
 
                 /**
                  * Add a wire to the model.
@@ -138,7 +138,7 @@
                  * @param serviceName The name of the external service to be found.
                  * @return The external service that was found, or 0 if not found.
                  */
-                ExternalService* findExternalService(const std::string& serviceName);
+                CompositeReferenceType* findCompositeReferenceType(const std::string& serviceName);
 
                 /**
                  * Add a WSDL definition to the composite.
@@ -202,17 +202,17 @@
                  */
                 COMPONENT_MAP components;
 
-                typedef map<std::string, ExternalService*> EXTERNALSERVICE_MAP;
+                typedef map<std::string, CompositeReferenceType*> EXTERNALSERVICE_MAP;
                 /**
                  * Map (by name) of all the external services in this composite.
                  */
                 EXTERNALSERVICE_MAP externalServices;
 
-                typedef map<std::string, EntryPoint*> ENTRYPOINT_MAP;
+                typedef map<std::string, CompositeServiceType*> ENTRYPOINT_MAP;
                 /**
                  * Map (by name) of all the entry points in this composite.
                  */
-                ENTRYPOINT_MAP entryPoints;
+                ENTRYPOINT_MAP compositeServices;
 
                 typedef vector<Wire> WIRES;
                 /**

Added: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeReferenceType.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeReferenceType.cpp?rev=430012&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeReferenceType.cpp (added)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeReferenceType.cpp Wed Aug  9 02:28:11 2006
@@ -0,0 +1,55 @@
+/*
+ *
+ *  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/Logging.h"
+#include "tuscany/sca/model/CompositeReferenceType.h"
+
+
+namespace tuscany
+{
+    namespace sca
+    {
+
+        namespace model
+        {
+
+            // Constructor
+            CompositeReferenceType::CompositeReferenceType(const std::string& serviceName, Composite *composite)
+                : WireTarget(serviceName), containingComposite(composite)
+            {
+                LOGENTRY(1, "CompositeReferenceType::constructor");
+                LOGINFO_1(2, "CompositeReferenceType::constructor: CompositeReferenceType name: %s", getName().c_str());
+                LOGEXIT(1, "CompositeReferenceType::constructor");
+            }
+
+            CompositeReferenceType::~CompositeReferenceType()
+            {
+                delete binding;
+            }
+
+            void CompositeReferenceType::setBinding(Binding* bind)
+            {
+                binding = bind;
+            }
+
+
+        } // End namespace model
+
+    } // End namespace sca
+} // End namespace tuscany

Propchange: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeReferenceType.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeReferenceType.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeReferenceType.h?rev=430012&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeReferenceType.h (added)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeReferenceType.h Wed Aug  9 02:28:11 2006
@@ -0,0 +1,97 @@
+/*
+ *
+ *  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 $ */
+
+#ifndef tuscany_sca_model_externalservice_h
+#define tuscany_sca_model_externalservice_h
+
+#include <string>
+
+#include "tuscany/sca/model/WireTarget.h"
+#include "tuscany/sca/model/Binding.h"
+
+namespace tuscany
+{
+    namespace sca
+    {
+
+        namespace model
+        {
+            class Composite;
+
+            /**
+             * Information about an external service.
+             */
+            class CompositeReferenceType : public WireTarget
+            {
+            public:
+                /**
+                 * Constructor.
+                 * @param name The name of the external service.
+                 * @param composite The composite containing this external service.
+                 */
+                CompositeReferenceType(const std::string& name, Composite *composite);
+
+                /**
+                 * Destructor.
+                 */
+                virtual ~CompositeReferenceType();
+
+                /**
+                 * Return the type of service.
+                 * @return Always returns CompositeReferenceTypeType
+                 */
+                virtual Type getServiceType() {return CompositeReferenceTypeType;}
+
+                /**
+                 * Set the binding for this external service.
+                 * @param binding The binding to set.
+                 */
+                virtual void setBinding(Binding* binding);
+
+                /**
+                 * Get the binding set for this external service.
+                 * @return The binding.
+                 */
+                virtual Binding* getBinding() {return binding;};
+
+                /**
+                 * Get the composite containing this external service.
+                 * @return The containing composite.
+                 */
+                Composite* getContainingComposite() {return containingComposite;};
+
+            private:
+                /**
+                 * The binding for this external service.
+                 */
+                Binding* binding;
+
+                /**
+                 * The composite containing this external service.
+                 */
+                Composite* containingComposite;
+
+
+            };
+        } // End namespace model
+    } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_externalservice_h
+

Propchange: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeReferenceType.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeServiceType.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeServiceType.cpp?rev=430012&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeServiceType.cpp (added)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeServiceType.cpp Wed Aug  9 02:28:11 2006
@@ -0,0 +1,101 @@
+/*
+ *
+ *  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/Logging.h"
+#include "tuscany/sca/model/CompositeServiceType.h"
+#include "tuscany/sca/util/Exceptions.h"
+
+
+namespace tuscany
+{
+    namespace sca
+    {
+
+        namespace model
+        {
+
+            // Constructor
+            CompositeServiceType::CompositeServiceType(const std::string& epName) 
+                : name(epName)
+            {
+                LOGENTRY(1, "CompositeServiceType::constructor");
+                LOGINFO_1(2, "CompositeServiceType::constructor: CompositeServiceType name: %s", name.c_str());
+                LOGEXIT(1, "CompositeServiceType::constructor");
+            }
+
+            CompositeServiceType::~CompositeServiceType()
+            {
+            }
+
+            void CompositeServiceType::addTarget(WireTarget* targ)
+            {
+                if (multiplicity == ONE_ONE || multiplicity == ZERO_ONE)
+                {
+                    if (targets.size() > 0)
+                    {
+                        // throw exception
+                        string message = "Duplicate wire for reference: " + name;
+                        throw SystemConfigurationException(message.c_str());
+                    }
+                }
+
+                // TODO - must be remotable
+
+                targets.push_back(targ);
+            }
+            
+            void CompositeServiceType::setMultiplicity(const std::string& multip)
+            {
+                if (multip == "0..1")
+                {
+                    multiplicity = ZERO_ONE;
+                }
+                else if (multip == "1..1")
+                {
+                    multiplicity = ONE_ONE;
+                }
+                else if (multip == "0..n")
+                {
+                    multiplicity = ZERO_MANY;
+                }
+                else if (multip == "1..n")
+                {
+                    multiplicity = ONE_MANY;
+                }
+                else
+                {
+                    string msg = "Invalid multiplicity specified, " + multip + ", for reference: " +name;
+                    throw SystemConfigurationException(msg.c_str());
+                }
+            }
+            
+            void CompositeServiceType::setInterface(Interface* interf)
+            {
+                iface = interf;
+            }
+
+            void CompositeServiceType::setBinding(Binding* bind)
+            {
+                binding = bind;
+            }
+
+        } // End namespace model
+
+    } // End namespace sca
+} // End namespace tuscany

Propchange: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeServiceType.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeServiceType.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeServiceType.h?rev=430012&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeServiceType.h (added)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeServiceType.h Wed Aug  9 02:28:11 2006
@@ -0,0 +1,158 @@
+/*
+ *
+ *  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 $ */
+
+#ifndef tuscany_sca_model_compositeservicetype_h
+#define tuscany_sca_model_compositeservicetype_h
+
+#include <string>
+using std::string;
+#include <vector>
+using std::vector;
+
+#include "tuscany/sca/model/Interface.h"
+#include "tuscany/sca/model/Binding.h"
+#include "tuscany/sca/model/WireTarget.h"
+
+namespace tuscany
+{
+    namespace sca
+    {
+        namespace model
+        {
+            /**
+             * Represents the information about an entry point.
+             */
+            class CompositeServiceType 
+            {
+
+            public:
+                /**
+                 * Constructor.
+                 * @param name The name of the entry point.
+                 */
+                CompositeServiceType(const std::string& name);  
+
+                /**
+                 * Destructor.
+                 */
+                virtual ~CompositeServiceType();
+
+                /**
+                 * Return the name of the entry point.
+                 * @return The name of the entry point.
+                 */
+                const string& getName() {return name;}
+
+                /**
+                 * How many wires can be wired from this entry point.
+                 */
+                enum Multiplicity
+                {
+                    ZERO_ONE,
+                    ONE_ONE,
+                    ZERO_MANY,
+                    ONE_MANY
+                };
+
+                /**
+                 * Set the multiplicity of this entry point.
+                 * @param multiplicity One of 0..1, 1..1, 0..n, 1..n
+                 */
+                void setMultiplicity(const std::string& multiplicity);
+
+                /**
+                 * Return the multiplicity of this entry point (how
+                 * many wires can be wired from this entry point).
+                 * @return The multiplicity.
+                 */
+                Multiplicity getMultiplicity() {return multiplicity;}
+
+                /**
+                 * Set the interface describing this entry point.
+                 * @param iface The interface.
+                 */
+                void setInterface(Interface* iface);
+
+                /**
+                 * Get the interface describing this entry point. Use
+                 * Interface#getType to find out the type of interface 
+                 * describing this entry point.
+                 * @return iface The interface.
+                 */
+                Interface* getInterface() {return iface;}
+
+				/**
+                 * Set the binding connecting this entry point.
+                 * @param binding The Binding.
+                 */
+                void setBinding(Binding* binding);
+
+                /**
+                 * Get the binding connecting this entry point. Use
+                 * Binding#getType to find out the type of binding 
+                 * connecting this entry point.
+                 * @return binding The binding.
+                 */
+                Binding* getBinding() {return binding;}
+
+                /**
+                 * Add a target to the entry point.
+                 * @param target Add a target (derived from a wire) to
+                 * the entry point.
+                 */
+                void addTarget(WireTarget* target);
+                typedef vector<WireTarget*> TARGETS;
+
+                /**
+                 * Get a vector of targets added to this entry point.
+                 */
+                const TARGETS& getTargets() {return targets;}
+            private:
+                /**
+                 * Name of the entry point.
+                 */
+                string name;            
+                
+                /**
+                 * The interface describing this entry point.
+                 */
+                Interface* iface;
+
+                /**
+                 * The binding connecting this entry point.
+                 */
+                Binding* binding;
+
+                /**
+                 * The multiplicity of this entry point..
+                 */
+                Multiplicity multiplicity;
+
+                /**
+                 * The vector of targets added to this entry point.
+                 */
+                TARGETS targets;
+           };
+
+        } // End namespace model
+    } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_compositeservicetype_h
+

Propchange: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/CompositeServiceType.h
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org