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 2010/01/25 08:28:51 UTC

svn commit: r902721 - in /tuscany/sca-cpp/trunk: ./ components/ components/chat/ components/log/ components/queue/ components/store/ components/webservice/ modules/http/ modules/server/

Author: jsdelfino
Date: Mon Jan 25 07:28:50 2010
New Revision: 902721

URL: http://svn.apache.org/viewvc?rev=902721&view=rev
Log:
Added skeletons and build options for a few more utility components. Minor refactoring of the web service component.

Added:
    tuscany/sca-cpp/trunk/components/chat/
    tuscany/sca-cpp/trunk/components/chat/Makefile.am
      - copied, changed from r902540, tuscany/sca-cpp/trunk/components/store/Makefile.am
    tuscany/sca-cpp/trunk/components/chat/chat.composite
      - copied, changed from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.composite
    tuscany/sca-cpp/trunk/components/log/
    tuscany/sca-cpp/trunk/components/log/Makefile.am
      - copied, changed from r902540, tuscany/sca-cpp/trunk/components/store/Makefile.am
    tuscany/sca-cpp/trunk/components/log/log.composite
      - copied, changed from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.composite
    tuscany/sca-cpp/trunk/components/queue/
    tuscany/sca-cpp/trunk/components/queue/Makefile.am
      - copied, changed from r902540, tuscany/sca-cpp/trunk/components/store/Makefile.am
    tuscany/sca-cpp/trunk/components/queue/queue.composite
      - copied, changed from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.composite
    tuscany/sca-cpp/trunk/components/store/store.composite
      - copied, changed from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.composite
    tuscany/sca-cpp/trunk/components/webservice/axis2.hpp
      - copied, changed from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.hpp
    tuscany/sca-cpp/trunk/components/webservice/webservice-client.cpp
      - copied, changed from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.cpp
    tuscany/sca-cpp/trunk/components/webservice/webservice-listener.cpp
      - copied, changed from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.cpp
Removed:
    tuscany/sca-cpp/trunk/components/webservice/webservice.cpp
    tuscany/sca-cpp/trunk/components/webservice/webservice.hpp
Modified:
    tuscany/sca-cpp/trunk/components/Makefile.am
    tuscany/sca-cpp/trunk/components/store/Makefile.am
    tuscany/sca-cpp/trunk/components/webservice/Makefile.am
    tuscany/sca-cpp/trunk/components/webservice/axiom-test.cpp
    tuscany/sca-cpp/trunk/components/webservice/axis2-test.cpp
    tuscany/sca-cpp/trunk/components/webservice/client-test.cpp
    tuscany/sca-cpp/trunk/components/webservice/webservice.composite
    tuscany/sca-cpp/trunk/configure.ac
    tuscany/sca-cpp/trunk/modules/http/httpd.hpp
    tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp

Modified: tuscany/sca-cpp/trunk/components/Makefile.am
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/Makefile.am?rev=902721&r1=902720&r2=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/components/Makefile.am Mon Jan 25 07:28:50 2010
@@ -15,7 +15,7 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
-SUBDIRS = cache store webservice
+SUBDIRS = cache chat log queue store webservice
 
 includedir = $(prefix)/include/components
 nobase_include_HEADERS = */*.hpp

Copied: tuscany/sca-cpp/trunk/components/chat/Makefile.am (from r902540, tuscany/sca-cpp/trunk/components/store/Makefile.am)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/chat/Makefile.am?p2=tuscany/sca-cpp/trunk/components/chat/Makefile.am&p1=tuscany/sca-cpp/trunk/components/store/Makefile.am&r1=902540&r2=902721&rev=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/store/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/components/chat/Makefile.am Mon Jan 25 07:28:50 2010
@@ -15,5 +15,6 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
-INCLUDES = -I. -I$(top_builddir)/kernel -I${LIBXML2_INCLUDE} -I${APR_INCLUDE}
+if WANT_STORE
 
+endif

Copied: tuscany/sca-cpp/trunk/components/chat/chat.composite (from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.composite)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/chat/chat.composite?p2=tuscany/sca-cpp/trunk/components/chat/chat.composite&p1=tuscany/sca-cpp/trunk/components/webservice/webservice.composite&r1=902540&r2=902721&rev=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/webservice.composite (original)
+++ tuscany/sca-cpp/trunk/components/chat/chat.composite Mon Jan 25 07:28:50 2010
@@ -20,13 +20,13 @@
 <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
   xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
   targetNamespace="http://tuscany.apache.org/xmlns/sca/components"
-  name="webservice">
+  name="chat">
         
-    <component name="webservice">
-        <implementation.cpp path=".libs" library="libwebservice"/>
-        <property name="uri">http://localhost:9090/axis2/services/echo</property>
-        <service name="webservice">
-            <t:binding.http uri="webservice"/>
+    <component name="chat">
+        <implementation.cpp path=".libs" library="libchat"/>
+        <property name="jid">sample@apache.org</property>
+        <service name="chat">
+            <t:binding.http uri="chat"/>
         </service>
     </component>     
 

Copied: tuscany/sca-cpp/trunk/components/log/Makefile.am (from r902540, tuscany/sca-cpp/trunk/components/store/Makefile.am)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/log/Makefile.am?p2=tuscany/sca-cpp/trunk/components/log/Makefile.am&p1=tuscany/sca-cpp/trunk/components/store/Makefile.am&r1=902540&r2=902721&rev=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/store/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/components/log/Makefile.am Mon Jan 25 07:28:50 2010
@@ -15,5 +15,3 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
-INCLUDES = -I. -I$(top_builddir)/kernel -I${LIBXML2_INCLUDE} -I${APR_INCLUDE}
-

Copied: tuscany/sca-cpp/trunk/components/log/log.composite (from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.composite)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/log/log.composite?p2=tuscany/sca-cpp/trunk/components/log/log.composite&p1=tuscany/sca-cpp/trunk/components/webservice/webservice.composite&r1=902540&r2=902721&rev=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/webservice.composite (original)
+++ tuscany/sca-cpp/trunk/components/log/log.composite Mon Jan 25 07:28:50 2010
@@ -20,13 +20,13 @@
 <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
   xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
   targetNamespace="http://tuscany.apache.org/xmlns/sca/components"
-  name="webservice">
+  name="log">
         
-    <component name="webservice">
-        <implementation.cpp path=".libs" library="libwebservice"/>
-        <property name="uri">http://localhost:9090/axis2/services/echo</property>
-        <service name="webservice">
-            <t:binding.http uri="webservice"/>
+    <component name="log">
+        <implementation.cpp path=".libs" library="liblog"/>
+        <property name="file">sample.log</property>property>
+        <service name="log">
+            <t:binding.http uri="log"/>
         </service>
     </component>     
 

Copied: tuscany/sca-cpp/trunk/components/queue/Makefile.am (from r902540, tuscany/sca-cpp/trunk/components/store/Makefile.am)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/queue/Makefile.am?p2=tuscany/sca-cpp/trunk/components/queue/Makefile.am&p1=tuscany/sca-cpp/trunk/components/store/Makefile.am&r1=902540&r2=902721&rev=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/store/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/components/queue/Makefile.am Mon Jan 25 07:28:50 2010
@@ -15,5 +15,6 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
-INCLUDES = -I. -I$(top_builddir)/kernel -I${LIBXML2_INCLUDE} -I${APR_INCLUDE}
+if WANT_QUEUE
 
+endif

Copied: tuscany/sca-cpp/trunk/components/queue/queue.composite (from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.composite)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/queue/queue.composite?p2=tuscany/sca-cpp/trunk/components/queue/queue.composite&p1=tuscany/sca-cpp/trunk/components/webservice/webservice.composite&r1=902540&r2=902721&rev=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/webservice.composite (original)
+++ tuscany/sca-cpp/trunk/components/queue/queue.composite Mon Jan 25 07:28:50 2010
@@ -20,13 +20,26 @@
 <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
   xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
   targetNamespace="http://tuscany.apache.org/xmlns/sca/components"
-  name="webservice">
+  name="queue">
         
-    <component name="webservice">
-        <implementation.cpp path=".libs" library="libwebservice"/>
-        <property name="uri">http://localhost:9090/axis2/services/echo</property>
-        <service name="webservice">
-            <t:binding.http uri="webservice"/>
+    <component name="queue-sender">
+        <implementation.cpp path=".libs" library="libqueue-sender"/>
+        <property name="uri">amqp://localhost:5672/print</property>
+        <service name="queue-sender">
+            <t:binding.http uri="print-sender"/>
+        </service>
+    </component>
+
+    <component name="queue-listener">
+        <implementation.cpp path=".libs" library="libqueue-listener"/>
+        <property name="uri">amqp://localhost:5672/print</property>
+        <reference name="relay" target="print"/>
+    </component>
+
+    <component name="print">
+        <t:implementation.scheme script="print.scm"/>
+        <service name="print">
+            <t:binding.http uri="print"/>
         </service>
     </component>     
 

Modified: tuscany/sca-cpp/trunk/components/store/Makefile.am
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/store/Makefile.am?rev=902721&r1=902720&r2=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/store/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/components/store/Makefile.am Mon Jan 25 07:28:50 2010
@@ -15,5 +15,6 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
-INCLUDES = -I. -I$(top_builddir)/kernel -I${LIBXML2_INCLUDE} -I${APR_INCLUDE}
+if WANT_STORE
 
+endif

Copied: tuscany/sca-cpp/trunk/components/store/store.composite (from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.composite)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/store/store.composite?p2=tuscany/sca-cpp/trunk/components/store/store.composite&p1=tuscany/sca-cpp/trunk/components/webservice/webservice.composite&r1=902540&r2=902721&rev=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/webservice.composite (original)
+++ tuscany/sca-cpp/trunk/components/store/store.composite Mon Jan 25 07:28:50 2010
@@ -20,13 +20,12 @@
 <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
   xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
   targetNamespace="http://tuscany.apache.org/xmlns/sca/components"
-  name="webservice">
+  name="store">
         
-    <component name="webservice">
-        <implementation.cpp path=".libs" library="libwebservice"/>
-        <property name="uri">http://localhost:9090/axis2/services/echo</property>
-        <service name="webservice">
-            <t:binding.http uri="webservice"/>
+    <component name="store">
+        <implementation.cpp path=".libs" library="libstore"/>
+        <service name="store">
+            <t:binding.http uri="store"/>
         </service>
     </component>     
 

Modified: tuscany/sca-cpp/trunk/components/webservice/Makefile.am
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/webservice/Makefile.am?rev=902721&r1=902720&r2=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/components/webservice/Makefile.am Mon Jan 25 07:28:50 2010
@@ -22,10 +22,13 @@
 INCLUDES = -I${AXIS2C_INCLUDE}
 
 compdir=$(prefix)/components/webservice
-comp_LTLIBRARIES = libwebservice.la
+comp_LTLIBRARIES = libwebservice-client.la libwebservice-listener.la
 
-libwebservice_la_SOURCES = webservice.cpp
-libwebservice_la_LDFLAGS = -lxml2 -L${AXIS2C_LIB} -R${AXIS2C_LIB} -laxis2_engine
+libwebservice_client_la_SOURCES = webservice-client.cpp
+libwebservice_client_la_LDFLAGS = -lxml2 -L${AXIS2C_LIB} -R${AXIS2C_LIB} -laxis2_engine
+
+libwebservice_listener_la_SOURCES = webservice-listener.cpp
+libwebservice_listener_la_LDFLAGS = -lxml2 -L${AXIS2C_LIB} -R${AXIS2C_LIB} -laxis2_engine
 
 axiom_test_SOURCES = axiom-test.cpp
 axiom_test_LDFLAGS = -lxml2 -L${AXIS2C_LIB} -R${AXIS2C_LIB} -laxis2_engine

Modified: tuscany/sca-cpp/trunk/components/webservice/axiom-test.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/webservice/axiom-test.cpp?rev=902721&r1=902720&r2=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/axiom-test.cpp (original)
+++ tuscany/sca-cpp/trunk/components/webservice/axiom-test.cpp Mon Jan 25 07:28:50 2010
@@ -31,7 +31,7 @@
 #include "monad.hpp"
 #include "value.hpp"
 #include "perf.hpp"
-#include "webservice.hpp"
+#include "axis2.hpp"
 
 namespace tuscany {
 namespace webservice {

Modified: tuscany/sca-cpp/trunk/components/webservice/axis2-test.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/webservice/axis2-test.cpp?rev=902721&r1=902720&r2=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/axis2-test.cpp (original)
+++ tuscany/sca-cpp/trunk/components/webservice/axis2-test.cpp Mon Jan 25 07:28:50 2010
@@ -31,7 +31,7 @@
 #include "monad.hpp"
 #include "value.hpp"
 #include "perf.hpp"
-#include "webservice.hpp"
+#include "axis2.hpp"
 
 namespace tuscany {
 namespace webservice {

Copied: tuscany/sca-cpp/trunk/components/webservice/axis2.hpp (from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.hpp)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/webservice/axis2.hpp?p2=tuscany/sca-cpp/trunk/components/webservice/axis2.hpp&p1=tuscany/sca-cpp/trunk/components/webservice/webservice.hpp&r1=902540&r2=902721&rev=902721&view=diff
==============================================================================
    (empty)

Modified: tuscany/sca-cpp/trunk/components/webservice/client-test.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/webservice/client-test.cpp?rev=902721&r1=902720&r2=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/client-test.cpp (original)
+++ tuscany/sca-cpp/trunk/components/webservice/client-test.cpp Mon Jan 25 07:28:50 2010
@@ -36,7 +36,6 @@
 namespace tuscany {
 namespace webservice {
 
-const string url("http://localhost:8090/webservice");
 
 bool testEval() {
     http::CURLSession cs;
@@ -47,7 +46,7 @@
             + (list<value>() + "@xmlns:ns1" + string("http://ws.apache.org/axis2/services/echo"))
             + (list<value>() + "text" + string("Hello World!")));
 
-    const failable<value> rval = http::evalExpr(mklist<value>(func, arg), url, cs);
+    const failable<value> rval = http::evalExpr(mklist<value>(func, arg), "http://localhost:8090/echo-client", cs);
     assert(hasContent(rval));
 
     const list<value> r = mklist<value>(

Copied: tuscany/sca-cpp/trunk/components/webservice/webservice-client.cpp (from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.cpp)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/webservice/webservice-client.cpp?p2=tuscany/sca-cpp/trunk/components/webservice/webservice-client.cpp&p1=tuscany/sca-cpp/trunk/components/webservice/webservice.cpp&r1=902540&r2=902721&rev=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/webservice.cpp (original)
+++ tuscany/sca-cpp/trunk/components/webservice/webservice-client.cpp Mon Jan 25 07:28:50 2010
@@ -20,7 +20,7 @@
 /* $Rev$ $Date$ */
 
 /**
- * Web service component implementation.
+ * Web service client component implementation.
  */
 
 #include "string.hpp"
@@ -28,13 +28,13 @@
 #include "list.hpp"
 #include "value.hpp"
 #include "monad.hpp"
-#include "webservice.hpp"
+#include "axis2.hpp"
 
 namespace tuscany {
 namespace webservice {
 
 /**
- * Apply a Web service function / operation using Axis2.
+ * Apply a function provided by a remote Web service using Axis2.
  */
 const failable<value> apply(const value& func, const list<value>& params) {
     const Axis2Context ax;

Copied: tuscany/sca-cpp/trunk/components/webservice/webservice-listener.cpp (from r902540, tuscany/sca-cpp/trunk/components/webservice/webservice.cpp)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/webservice/webservice-listener.cpp?p2=tuscany/sca-cpp/trunk/components/webservice/webservice-listener.cpp&p1=tuscany/sca-cpp/trunk/components/webservice/webservice.cpp&r1=902540&r2=902721&rev=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/webservice.cpp (original)
+++ tuscany/sca-cpp/trunk/components/webservice/webservice-listener.cpp Mon Jan 25 07:28:50 2010
@@ -20,7 +20,7 @@
 /* $Rev$ $Date$ */
 
 /**
- * Web service component implementation.
+ * Web service listener component implementation.
  */
 
 #include "string.hpp"
@@ -28,26 +28,24 @@
 #include "list.hpp"
 #include "value.hpp"
 #include "monad.hpp"
-#include "webservice.hpp"
+#include "../../modules/http/httpd.hpp"
+#include "axis2.hpp"
 
 namespace tuscany {
 namespace webservice {
 
 /**
- * Apply a Web service function / operation using Axis2.
+ * Handle an HTTP request.
  */
-const failable<value> apply(const value& func, const list<value>& params) {
-    const Axis2Context ax;
+const failable<value> handle(const list<value>& params) {
 
-    // Extract parameters
-    const value doc = car<value>(params);
-    const lambda<value(const list<value>&)> l = cadr<value>(params);
+    // Extract HTTPD request and relay reference
+    unused request_rec* r = httpd::request(car(params));
+    const lambda<value(const list<value>&)> relay = cadr(params);
 
-    // Call the URI property lambda function to get the configured URI
-    const value uri = l(list<value>());
+    //TODO Hook Axis2/C server module here
 
-    // Evaluate using Axis2
-    return evalExpr(mklist<value>(func, doc, uri), ax);
+    return value(true);
 }
 
 }
@@ -56,7 +54,10 @@
 extern "C" {
 
 const tuscany::value apply(const tuscany::list<tuscany::value>& params) {
-    return tuscany::webservice::apply(car(params), cdr(params));
+    const tuscany::value func(car(params));
+    if (func == "handle")
+        return tuscany::webservice::handle(cdr(params));
+    return tuscany::mkfailure<tuscany::value>(tuscany::string("Function not supported: ") + func);
 }
 
 }

Modified: tuscany/sca-cpp/trunk/components/webservice/webservice.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/webservice/webservice.composite?rev=902721&r1=902720&r2=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/webservice.composite (original)
+++ tuscany/sca-cpp/trunk/components/webservice/webservice.composite Mon Jan 25 07:28:50 2010
@@ -20,13 +20,28 @@
 <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
   xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
   targetNamespace="http://tuscany.apache.org/xmlns/sca/components"
-  name="webservice">
+  name="webservice-client">
         
-    <component name="webservice">
-        <implementation.cpp path=".libs" library="libwebservice"/>
+    <component name="webservice-client">
+        <implementation.cpp path=".libs" library="libwebservice-client"/>
         <property name="uri">http://localhost:9090/axis2/services/echo</property>
-        <service name="webservice">
-            <t:binding.http uri="webservice"/>
+        <service name="webservice-client">
+            <t:binding.jsonrpc uri="echo-client"/>
+        </service>
+    </component>     
+
+    <component name="webservice-listener">
+        <implementation.cpp path=".libs" library="libwebservice-listener"/>
+        <service name="webservice-listener">
+            <t:binding.http uri="echo-listener"/>
+        </service>
+        <reference name="relay" target="echo"/>
+    </component>
+
+    <component name="echo">
+        <t:implementation.scheme script="echo.scm"/>
+        <service name="echo">
+            <t:binding.jsonrpc uri="echo"/>
         </service>
     </component>     
 

Modified: tuscany/sca-cpp/trunk/configure.ac
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/configure.ac?rev=902721&r1=902720&r2=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/configure.ac (original)
+++ tuscany/sca-cpp/trunk/configure.ac Mon Jan 25 07:28:50 2010
@@ -360,9 +360,9 @@
 AC_SUBST(AXIS2C_INCLUDE)
 AC_SUBST(AXIS2C_LIB)
 
-# Enable Web service support.
-AC_MSG_CHECKING([whether to enable Web service support])
-AC_ARG_ENABLE(webservice, [AS_HELP_STRING([--enable-webservice], [enable Web service support [default=no]])],
+# Enable Web service component.
+AC_MSG_CHECKING([whether to enable the Web service component])
+AC_ARG_ENABLE(webservice, [AS_HELP_STRING([--enable-webservice], [enable Web service component [default=no]])],
 [ case "${enableval}" in
   no)
     AC_MSG_RESULT(no)
@@ -377,11 +377,71 @@
   LIBS="-L${AXIS2C_LIB} ${default_LIBS}"
   AC_CHECK_LIB([axis2_engine], [axis2_svc_client_create], [], [AC_MSG_ERROR([couldn't find a suitable libaxis2_engine, use --with-axis2c=PATH])])
   AM_CONDITIONAL([WANT_WEBSERVICE], true)
-  AC_DEFINE([WANT_WEBSERVICE], 1, [enable Web service support])
+  AC_DEFINE([WANT_WEBSERVICE], 1, [enable Web service component])
 else
   AM_CONDITIONAL([WANT_WEBSERVICE], false)
 fi
 
+# Enable Store component.
+AC_MSG_CHECKING([whether to enable the Store component])
+AC_ARG_ENABLE(store, [AS_HELP_STRING([--enable-store], [enable Store component [default=no]])],
+[ case "${enableval}" in
+  no)
+    AC_MSG_RESULT(no)
+    ;;
+  *)
+    AC_MSG_RESULT(yes)
+    want_store=true
+    ;;
+  esac ],
+[ AC_MSG_RESULT(no)])
+if test "${want_store}" = "true"; then
+  AM_CONDITIONAL([WANT_STORE], true)
+  AC_DEFINE([WANT_STORE], 1, [enable Store component])
+else
+  AM_CONDITIONAL([WANT_STORE], false)
+fi
+
+# Enable Queue component.
+AC_MSG_CHECKING([whether to enable the Queue component])
+AC_ARG_ENABLE(queue, [AS_HELP_STRING([--enable-queue], [enable Queue component [default=no]])],
+[ case "${enableval}" in
+  no)
+    AC_MSG_RESULT(no)
+    ;;
+  *)
+    AC_MSG_RESULT(yes)
+    want_queue=true
+    ;;
+  esac ],
+[ AC_MSG_RESULT(no)])
+if test "${want_queue}" = "true"; then
+  AM_CONDITIONAL([WANT_QUEUE], true)
+  AC_DEFINE([WANT_QUEUE], 1, [enable Queue component])
+else
+  AM_CONDITIONAL([WANT_QUEUE], false)
+fi
+
+# Enable Chat component.
+AC_MSG_CHECKING([whether to enable the Chat component])
+AC_ARG_ENABLE(chat, [AS_HELP_STRING([--enable-chat], [enable Chat component [default=no]])],
+[ case "${enableval}" in
+  no)
+    AC_MSG_RESULT(no)
+    ;;
+  *)
+    AC_MSG_RESULT(yes)
+    want_chat=true
+    ;;
+  esac ],
+[ AC_MSG_RESULT(no)])
+if test "${want_chat}" = "true"; then
+  AM_CONDITIONAL([WANT_CHAT], true)
+  AC_DEFINE([WANT_CHAT], 1, [enable Chat component])
+else
+  AM_CONDITIONAL([WANT_CHAT], false)
+fi
+
 # Configure GCC C++ and LD options.
 AC_SUBST([CXXFLAGS], ["${cxxflags}"])
 AC_SUBST([LDFLAGS], ["${ldflags}"])
@@ -400,6 +460,9 @@
                  modules/server/Makefile
                  components/Makefile
                  components/cache/Makefile
+                 components/log/Makefile
+                 components/chat/Makefile
+                 components/queue/Makefile
                  components/store/Makefile
                  components/webservice/Makefile
                  samples/Makefile

Modified: tuscany/sca-cpp/trunk/modules/http/httpd.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/httpd.hpp?rev=902721&r1=902720&r2=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/httpd.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/http/httpd.hpp Mon Jan 25 07:28:50 2010
@@ -264,6 +264,20 @@
     return content(rc);
 }
 
+/**
+ * Convert an HTTPD request struct to a value
+ */
+const value requestValue(request_rec* r) {
+    return value((const value*)r);
+}
+
+/**
+ * Convert a value to an HTTPD request struc
+ */
+request_rec* request(const value& v) {
+    return (request_rec*)(const value*)gc_ptr<value>(v);
+}
+
 }
 }
 

Modified: tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp?rev=902721&r1=902720&r2=902721&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp Mon Jan 25 07:28:50 2010
@@ -169,7 +169,12 @@
         return OK;
     }
 
-    return HTTP_NOT_IMPLEMENTED;
+    // Unknown content type, wrap the HTTP request struct in a value and pass it to
+    // the component implementation function
+    const failable<value> val = failableResult(impl(cons<value>("handle", mklist<value>(httpd::requestValue(r)))));
+    if (!hasContent(val))
+        return mkfailure<int>(reason(val));
+    return OK;
 }
 
 /**