summaryrefslogtreecommitdiffstats
path: root/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca
diff options
context:
space:
mode:
authordims <dims@13f79535-47bb-0310-9956-ffa450edef68>2008-06-17 00:23:01 +0000
committerdims <dims@13f79535-47bb-0310-9956-ffa450edef68>2008-06-17 00:23:01 +0000
commitbdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a (patch)
tree38a92061c0793434c4be189f1d70c3458b6bc41d /tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca
Move Tuscany from Incubator to top level.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca')
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/Makefile.am23
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/Makefile.am18
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/Makefile.am18
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/Makefile.am38
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.cpp97
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.h74
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.cpp46
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.h72
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/Makefile.am18
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/Makefile.am18
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/Makefile.am38
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.cpp97
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.h74
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.cpp47
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.h71
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/xsd/sca-binding-sca.xsd37
16 files changed, 786 insertions, 0 deletions
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/Makefile.am b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/Makefile.am
new file mode 100644
index 0000000000..50dfb45557
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/Makefile.am
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+SUBDIRS = reference service
+datadir=$(prefix)/extensions/sca
+
+nobase_data_DATA = xsd/*.xsd
+
+EXTRA_DIST = xsd
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/Makefile.am b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/Makefile.am
new file mode 100644
index 0000000000..18e9ba89b9
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/Makefile.am
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+SUBDIRS = axis2c
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/Makefile.am b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/Makefile.am
new file mode 100644
index 0000000000..2b9491ec1c
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/Makefile.am
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+SUBDIRS = src
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/Makefile.am b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/Makefile.am
new file mode 100644
index 0000000000..75eba52f73
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/Makefile.am
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+libdir=$(prefix)/extensions/sca/reference/lib
+lib_LTLIBRARIES = libtuscany_sca_binding_reference.la
+
+noinst_HEADERS = \
+tuscany/sca/binding/*.h \
+tuscany/sca/binding/model/*.h
+
+libtuscany_sca_binding_reference_la_SOURCES = \
+tuscany/sca/binding/SCAServiceBindingExtension.cpp \
+tuscany/sca/binding/model/SCAServiceBinding.cpp
+
+libtuscany_sca_binding_reference_la_LIBADD = \
+ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -ltuscany_sdo_axiom \
+ -L$(top_builddir)/runtime/core/src -ltuscany_sca \
+ -L$(top_builddir)/runtime/extensions/ws/reference/axis2c/src -ltuscany_sca_ws_reference
+
+INCLUDES = -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include \
+ -I$(top_builddir)/runtime/extensions/ws/reference/axis2c/src
+
+AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.cpp b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.cpp
new file mode 100644
index 0000000000..b12702bf43
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.cpp
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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$ */
+
+#include "SCAServiceBindingExtension.h"
+#include "model/SCAServiceBinding.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/core/SCARuntime.h"
+
+extern "C"
+{
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void tuscany_sca_extension_initialize()
+ {
+ tuscany::sca::binding::SCAServiceBindingExtension::initialize();
+ }
+}
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace binding
+ {
+ // ===================================================================
+ // Constructor for the SCAServiceBinding class.
+ // ===================================================================
+ SCAServiceBindingExtension::SCAServiceBindingExtension()
+ {
+ LOGENTRY(1, "SCAServiceBindingExtension::constructor");
+ LOGEXIT(1, "SCAServiceBindingExtension::constructor");
+ }
+
+ // ===================================================================
+ // Destructor for the SCAServiceBindingExtension class.
+ // ===================================================================
+ SCAServiceBindingExtension::~SCAServiceBindingExtension()
+ {
+ LOGENTRY(1, "SCAServiceBindingExtension::destructor");;
+ LOGEXIT(1, "SCAServiceBindingExtension::destructor");
+ }
+
+ const string SCAServiceBindingExtension::extensionName("sca");
+ const string SCAServiceBindingExtension::typeQName("http://www.osoa.org/xmlns/sca/1.0#SCABinding");
+
+
+ // ===================================================================
+ // loadModelElement - load the info from binding.ws
+ // ===================================================================
+ ServiceBinding* SCAServiceBindingExtension::getServiceBinding(Composite *composite, Service* service, DataObjectPtr scdlBinding)
+ {
+ string bindingType = scdlBinding->getType().getName();
+ if (bindingType == "SCABinding")
+ {
+ string uri = scdlBinding->getCString("uri");
+
+ SCAServiceBinding* serviceBinding = new SCAServiceBinding(service, uri);
+
+ return serviceBinding;
+ }
+ else
+ {
+ return NULL;
+ }
+ }
+
+ void SCAServiceBindingExtension::initialize()
+ {
+ LOGENTRY(1, "SCAServiceBindingExtension::initialize");;
+ SCARuntime::getInstance()->registerServiceBindingExtension(new SCAServiceBindingExtension());
+ LOGEXIT(1, "SCAServiceBindingExtension::initialize");;
+ }
+
+ } // End namespace ws
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.h b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.h
new file mode 100644
index 0000000000..4cd05bee16
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.h
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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$ */
+
+#ifndef tuscany_sca_extension_binding_scaservicebindingextension_h
+#define tuscany_sca_extension_binding_scaservicebindingextension_h
+
+#include "tuscany/sca/extension/ServiceBindingExtension.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace binding
+ {
+
+ class SCAServiceBindingExtension : public ServiceBindingExtension
+ {
+ public:
+ /**
+ * Default constructor
+ */
+ SCAServiceBindingExtension();
+
+ /**
+ * Destructor
+ */
+ virtual ~SCAServiceBindingExtension();
+
+ /**
+ * return the name of the extension
+ */
+ virtual const string& getExtensionName() {return extensionName;}
+
+ /**
+ * return the QName of schema elemant for this implementation extension
+ * (e.g. "http://www.osoa.org/xmlns/sca/1.0#binding.ws")
+ */
+ virtual const string& getExtensionTypeQName() {return typeQName;}
+
+ virtual ServiceBinding* getServiceBinding(Composite* composite, Service* service, DataObjectPtr scdlBinding);
+
+ static void initialize();
+
+ private:
+ static const string extensionName;
+ static const string typeQName;
+
+ };
+
+
+ } // End namespace binding
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif //tuscany_sca_extension_binding_scaservicebindingextension_h
+
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.cpp
new file mode 100644
index 0000000000..a6b052f04f
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.cpp
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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$ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/binding/model/SCAServiceBinding.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace binding
+ {
+
+ // Constructor
+ SCAServiceBinding::SCAServiceBinding(Service* service, const string& uri)
+ : WSServiceBinding(service, uri, "", "")
+ {
+ }
+
+ // Destructor
+ SCAServiceBinding::~SCAServiceBinding()
+ {
+ }
+
+ } // End namespace binding
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.h b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.h
new file mode 100644
index 0000000000..90eb222b7b
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.h
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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$ */
+
+#ifndef tuscany_sca_extension_binding_model_scaservicebinding_h
+#define tuscany_sca_extension_binding_model_scaservicebinding_h
+
+#include "tuscany/sca/model/ServiceBinding.h"
+#include "tuscany/sca/model/Service.h"
+#include "tuscany/sca/ws/model/WSServiceBinding.h"
+
+#include <string>
+using std::string;
+
+using namespace tuscany::sca::model;
+using namespace tuscany::sca::ws;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace binding
+ {
+ /**
+ * Information about an SCA service binding for service or a reference.
+ */
+ class SCAServiceBinding : public WSServiceBinding
+ {
+ public:
+
+ /**
+ * Constructor.
+ * @param uri The uri of the binding.
+ */
+ SCAServiceBinding(model::Service* service, const string& uri);
+
+ /**
+ * Destructor.
+ */
+ virtual ~SCAServiceBinding();
+
+ /**
+ * Returns the type of binding.
+ */
+ virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#SCABinding"; };
+
+ private:
+
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_extension_ws_model_wsservicebinding_h
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/Makefile.am b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/Makefile.am
new file mode 100644
index 0000000000..18e9ba89b9
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/Makefile.am
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+SUBDIRS = axis2c
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/Makefile.am b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/Makefile.am
new file mode 100644
index 0000000000..feadf9e317
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/Makefile.am
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+SUBDIRS = src \ No newline at end of file
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/Makefile.am b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/Makefile.am
new file mode 100644
index 0000000000..b03e398106
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/Makefile.am
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+libdir=$(prefix)/extensions/sca/service/lib
+lib_LTLIBRARIES = libtuscany_sca_binding_service.la
+
+noinst_HEADERS = \
+tuscany/sca/binding/*.h \
+tuscany/sca/binding/model/*.h
+
+libtuscany_sca_binding_service_la_SOURCES = \
+tuscany/sca/binding/SCAReferenceBindingExtension.cpp \
+tuscany/sca/binding/model/SCAReferenceBinding.cpp
+
+libtuscany_sca_binding_service_la_LIBADD = \
+ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -ltuscany_sdo_axiom \
+ -L$(top_builddir)/runtime/core/src -ltuscany_sca \
+ -L$(top_builddir)/runtime/extensions/ws/service/axis2c/src -ltuscany_sca_ws_service
+
+INCLUDES = -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include \
+ -I$(top_builddir)/runtime/extensions/ws/service/axis2c/src
+
+AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.cpp b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.cpp
new file mode 100644
index 0000000000..7fb9b4af64
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.cpp
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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$ */
+
+
+#include "SCAReferenceBindingExtension.h"
+#include "model/SCAReferenceBinding.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/core/SCARuntime.h"
+
+
+extern "C"
+{
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void tuscany_sca_extension_initialize()
+ {
+ tuscany::sca::binding::SCAReferenceBindingExtension::initialize();
+ }
+}
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace binding
+ {
+ // ===================================================================
+ // Constructor for the SCAReferenceBinding class.
+ // ===================================================================
+ SCAReferenceBindingExtension::SCAReferenceBindingExtension()
+ {
+ LOGENTRY(1, "SCAReferenceBindingExtension::constructor");
+ LOGEXIT(1, "SCAReferenceBindingExtension::constructor");
+ }
+
+ // ===================================================================
+ // Destructor for the SCAReferenceBindingExtension class.
+ // ===================================================================
+ SCAReferenceBindingExtension::~SCAReferenceBindingExtension()
+ {
+ LOGENTRY(1, "SCAReferenceBindingExtension::destructor");;
+ LOGEXIT(1, "SCAReferenceBindingExtension::destructor");
+ }
+
+ const string SCAReferenceBindingExtension::extensionName("sca");
+ const string SCAReferenceBindingExtension::typeQName("http://www.osoa.org/xmlns/sca/1.0#SCABinding");
+
+ // ===================================================================
+ // loadModelElement - load the info from binding.ws
+ // ===================================================================
+ ReferenceBinding* SCAReferenceBindingExtension::getReferenceBinding(Composite *composite, Reference* reference, DataObjectPtr scdlBinding)
+ {
+ string bindingType = scdlBinding->getType().getName();
+ if (bindingType == "SCABinding")
+ {
+ string uri = scdlBinding->getCString("uri");
+
+ SCAReferenceBinding* serviceBinding = new SCAReferenceBinding(reference, uri);
+
+ return serviceBinding;
+ }
+ else
+ {
+ return NULL;
+ }
+ }
+
+ void SCAReferenceBindingExtension::initialize()
+ {
+ LOGENTRY(1, "SCAReferenceBindingExtension::initialize");;
+ SCARuntime::getInstance()->registerReferenceBindingExtension(new SCAReferenceBindingExtension());
+ LOGEXIT(1, "SCAReferenceBindingExtension::initialize");;
+ }
+
+ } // End namespace binding
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.h b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.h
new file mode 100644
index 0000000000..9f5ddd55eb
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.h
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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$ */
+
+#ifndef tuscany_sca_extension_binding_scareferencebindingextension_h
+#define tuscany_sca_extension_binding_scareferencebindingextension_h
+
+#include "tuscany/sca/extension/ReferenceBindingExtension.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace binding
+ {
+
+ class SCAReferenceBindingExtension : public ReferenceBindingExtension
+ {
+ public:
+ /**
+ * Default constructor
+ */
+ SCAReferenceBindingExtension();
+
+ /**
+ * Destructor
+ */
+ virtual ~SCAReferenceBindingExtension();
+
+ /**
+ * return the name of the extension
+ */
+ virtual const string& getExtensionName() {return extensionName;}
+
+ /**
+ * return the QName of schema elemant for this implementation extension
+ * (e.g. "http://www.osoa.org/xmlns/sca/1.0#binding.ws")
+ */
+ virtual const string& getExtensionTypeQName() {return typeQName;}
+
+ virtual ReferenceBinding* getReferenceBinding(Composite* composite, Reference *reference, DataObjectPtr scdlBinding);
+
+ static void initialize();
+
+ private:
+ static const string extensionName;
+ static const string typeQName;
+
+ };
+
+
+ } // End namespace binding
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_extension_binding_scareferencebindingextension_h
+
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.cpp
new file mode 100644
index 0000000000..6e7b4eaccc
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.cpp
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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$ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/binding/model/SCAReferenceBinding.h"
+#include "tuscany/sca/ws/model/WSReferenceBinding.h"
+#include "tuscany/sca/core/ServiceProxy.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace binding
+ {
+
+ // Constructor
+ SCAReferenceBinding::SCAReferenceBinding(Reference* reference, const string& uri)
+ : WSReferenceBinding(reference, uri, "", "")
+ {
+ }
+
+ // Destructor
+ SCAReferenceBinding::~SCAReferenceBinding()
+ {
+ }
+
+ } // End namespace binding
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.h b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.h
new file mode 100644
index 0000000000..445a00be82
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.h
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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$ */
+
+#ifndef tuscany_sca_extension_binding_model_scareferencebinding_h
+#define tuscany_sca_extension_binding_model_scareferencebinding_h
+
+#include "tuscany/sca/model/ReferenceBinding.h"
+#include "tuscany/sca/ws/model/WSReferenceBinding.h"
+
+using namespace tuscany::sca::model;
+using namespace tuscany::sca::ws;
+
+#include <string>
+using std::string;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace binding
+ {
+ /**
+ * Information about a web service binding for service or a reference.
+ */
+ class SCAReferenceBinding : public WSReferenceBinding
+ {
+ public:
+
+ /**
+ * Constructor.
+ * @param uri The uri of the binding.
+ */
+ SCAReferenceBinding(Reference* reference, const string&uri);
+
+ /**
+ * Destructor.
+ */
+ virtual ~SCAReferenceBinding();
+
+ /**
+ * Returns the type of binding.
+ */
+ virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#SCABinding"; };
+
+ private:
+
+ };
+
+ } // End namespace binding
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_extension_binding_model_scareferencebinding_h
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/xsd/sca-binding-sca.xsd b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/xsd/sca-binding-sca.xsd
new file mode 100644
index 0000000000..1051c3910c
--- /dev/null
+++ b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/sca/xsd/sca-binding-sca.xsd
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+ elementFormDefault="qualified">
+
+ <element name="binding.sca" type="sca:SCABinding" substitutionGroup="sca:binding"/>
+ <complexType name="SCABinding">
+ <complexContent>
+ <extension base="sca:Binding">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax" />
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>