summaryrefslogtreecommitdiffstats
path: root/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo')
-rwxr-xr-xsca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h30
-rwxr-xr-xsca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType30
-rwxr-xr-xsca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp79
-rwxr-xr-xsca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.h36
-rw-r--r--sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/Makefile.am16
5 files changed, 191 insertions, 0 deletions
diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h
new file mode 100755
index 0000000000..766fc55fe6
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h
@@ -0,0 +1,30 @@
+/*
+ *
+ * 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$ */
+
+#ifndef CustomerInfo_h
+#define CustomerInfo_h
+
+class CustomerInfo
+{
+public:
+ virtual const char* getCustomerInformation(const char* customerID) = 0;
+
+};
+
+#endif
diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType
new file mode 100755
index 0000000000..52988cb90a
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CustomerInfoService">
+ <interface.cpp header="CustomerInfo/CustomerInfo.h">
+ </interface.cpp>
+ </service>
+
+ <property name="Fred" type="xs:string"/>
+ <property name="Joe" type="xs:integer" many="true"/>
+
+</componentType>
+ \ No newline at end of file
diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp
new file mode 100755
index 0000000000..ed3ff5e2ff
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp
@@ -0,0 +1,79 @@
+/*
+ *
+ * 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$ */
+
+#include "CustomerInfoImpl.h"
+#include <ostream>
+#include <string.h>
+#include "osoa/sca/sca.h"
+#include "commonj/sdo/DataObjectInstance.h"
+using namespace osoa::sca;
+using namespace commonj::sdo;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CustomerInfoImpl::CustomerInfoImpl()
+{
+ cout << "Construct CustomerInfoImpl" << endl;
+
+}
+
+CustomerInfoImpl::~CustomerInfoImpl()
+{
+ cout << "Destroy CustomerInfoImpl" << endl;
+}
+
+//////////////////////////////////////////////////////////////////////
+// Other methods
+//////////////////////////////////////////////////////////////////////
+const char* CustomerInfoImpl::getCustomerInformation(const char* customerID)
+{
+ cout << "In getCustomerInformation with customerid: " << customerID << endl;
+
+
+
+ ComponentContext myContext = ComponentContext::getCurrent();
+
+ DataObjectInstance properties = myContext.getProperties();
+ DataObjectInstance props2 = properties;
+ if (properties)
+ {
+ const char* fredVal = properties->getCString("Fred");
+ cout << "Property Fred value: " << fredVal <<endl;
+
+
+ DataObjectList& joeList = properties->getList("Joe");
+ for (int i=0; i<joeList.size();i++)
+ {
+ cout << "Property Joe value " << i << ": " << joeList.getInteger(i) <<endl;
+ }
+ }
+
+ if (!strcmp("12345", customerID))
+ {
+ return "IBM";
+ }
+ else
+ {
+ throw "Wobbler";
+ }
+
+
+}
diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.h b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.h
new file mode 100755
index 0000000000..c943b1d666
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.h
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#ifndef CustomerInfoImpl_h
+#define CustomerInfoImpl_h
+
+#include "CustomerInfo.h"
+
+
+
+class CustomerInfoImpl : public CustomerInfo
+{
+public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformation(const char* customerID);
+
+};
+
+#endif
diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/Makefile.am
new file mode 100644
index 0000000000..ce4a864b79
--- /dev/null
+++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/Makefile.am
@@ -0,0 +1,16 @@
+lib_LTLIBRARIES = libCustomerInfo.la
+
+libCustomerInfo_la_SOURCES = \
+CustomerInfoImpl.cpp \
+CustomerInfoImpl_CustomerInfoService_Proxy.cpp \
+CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
+
+libCustomerInfo_la_LIBADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \
+ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo
+
+INCLUDES = -I.. \
+ -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include \
+ -I${AXISCPP_DEPLOY}/include
+
+install: \ No newline at end of file