Author: jsdelfino
Date: Sun Mar 13 19:24:02 2011
New Revision: 1081203
URL: http://svn.apache.org/viewvc?rev=1081203&view=rev
Log:
Add a reusable component that returns the contents of a configured url.
Added:
tuscany/sca-cpp/trunk/components/http/
tuscany/sca-cpp/trunk/components/http/Makefile.am (contents, props
changed)
- copied, changed from r1079292,
tuscany/sca-cpp/trunk/modules/edit/mkapplinks
tuscany/sca-cpp/trunk/components/http/client-test.cpp
tuscany/sca-cpp/trunk/components/http/http.composite
tuscany/sca-cpp/trunk/components/http/httpget.componentType
tuscany/sca-cpp/trunk/components/http/httpget.cpp
tuscany/sca-cpp/trunk/components/http/server-test (contents, props
changed)
- copied, changed from r1079292,
tuscany/sca-cpp/trunk/components/Makefile.am
tuscany/sca-cpp/trunk/components/http/url-test.scm
tuscany/sca-cpp/trunk/modules/edit/apps/testget/
tuscany/sca-cpp/trunk/modules/edit/apps/testget/app.composite
tuscany/sca-cpp/trunk/modules/edit/apps/testget/app.html
Modified:
tuscany/sca-cpp/trunk/README
tuscany/sca-cpp/trunk/components/Makefile.am
tuscany/sca-cpp/trunk/components/filedb/Makefile.am
tuscany/sca-cpp/trunk/configure.ac
tuscany/sca-cpp/trunk/modules/edit/apps/testlogic/app.composite
tuscany/sca-cpp/trunk/modules/edit/dashboards/joe@localhost
tuscany/sca-cpp/trunk/modules/edit/dashboards/[email protected]
tuscany/sca-cpp/trunk/modules/edit/htdocs/main.html
tuscany/sca-cpp/trunk/modules/edit/mkapplinks
tuscany/sca-cpp/trunk/modules/edit/palettes/url/palette.composite
Modified: tuscany/sca-cpp/trunk/README
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/README?rev=1081203&r1=1081202&r2=1081203&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/README (original)
+++ tuscany/sca-cpp/trunk/README Sun Mar 13 19:24:02 2011
@@ -12,13 +12,15 @@ implemented using OpenID and OAuth.
Several useful SCA components are provided on top of the SCA runtime, which
can be used to help assemble distributed SCA composite applications:
-Cache: Key/value memory cache, using Memcached;
+Cache: key/value memory cache, using Memcached;
Chat: XMPP chat, using Apache Vysper and Libstrophe;
-Log: distributed logger, using Facebook Scribe.
-Nosqldb: Key/value 'NoSQL' persistent store, using TinyCDB;
+Filedb: key/value 'NoSQL' persistent store, using plain files;
+Http: HTTP client, using Libcurl;
+Log: distributed logger, using Facebook Scribe;
+Nosqldb: key/value 'NoSQL' persistent store, using TinyCDB;
Queue: AMQP queuing, using Apache Qpid/C;
Sqldb: SQL database, using PostgreSQL;
-Webservice: Web service gateway, using Apache Axis2/C;
+Webservice: Web service gateway, using Apache Axis2/C.
These components present a simple ATOMPub REST interface, allowing you to send
a message to a queue, a chat connection, or add an entry to a cache or a
@@ -55,13 +57,15 @@ Here's a rough guide to the Tuscany SCA
| |-- kernel SCA runtime kernel
| |
| |-- modules Modules that plug into the runtime
- | | |-- atom AtomPub encoding
+ | | |-- atom AtomPub data encoding
+ | | |-- edit Composite app editor
| | |-- http HTTP protocol
| | |-- java Support for Java components
- | | |-- json JSON-RPC encoding
+ | | |-- json JSON data encoding
| | |-- oauth User signin using OAuth
| | |-- openid User signin using OpenID
| | |-- python Support for Python components
+ | | |-- rss RSS data encoding
| | |-- scheme Support for Scheme components
| | |-- server Apache HTTPD server integration
| | |-- wsgi Python WSGI server integration
@@ -69,6 +73,8 @@ Here's a rough guide to the Tuscany SCA
| |-- components Useful SCA components
| | |-- cache Memcached key/value cache
| | |-- chat XMPP chat
+ | | |-- filedb Plain file NoSQL database
+ | | |-- http HTTP client
| | |-- log Scribe logger
| | |-- nosqldb TinyCDB NoSQL database
| | |-- queue AMQP message queue
Modified: tuscany/sca-cpp/trunk/components/Makefile.am
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/Makefile.am?rev=1081203&r1=1081202&r2=1081203&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/components/Makefile.am Sun Mar 13 19:24:02 2011
@@ -15,5 +15,5 @@
# specific language governing permissions and limitations
# under the License.
-SUBDIRS = cache chat log nosqldb filedb queue sqldb webservice
+SUBDIRS = cache chat http log nosqldb filedb queue sqldb webservice
Modified: tuscany/sca-cpp/trunk/components/filedb/Makefile.am
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/filedb/Makefile.am?rev=1081203&r1=1081202&r2=1081203&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/filedb/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/components/filedb/Makefile.am Sun Mar 13 19:24:02 2011
@@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-INCLUDES = -I${TINYCDB_INCLUDE}
-
incl_HEADERS = *.hpp
incldir = $(prefix)/include/components/filedb
Copied: tuscany/sca-cpp/trunk/components/http/Makefile.am (from r1079292,
tuscany/sca-cpp/trunk/modules/edit/mkapplinks)
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/http/Makefile.am?p2=tuscany/sca-cpp/trunk/components/http/Makefile.am&p1=tuscany/sca-cpp/trunk/modules/edit/mkapplinks&r1=1079292&r2=1081203&rev=1081203&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/mkapplinks (original)
+++ tuscany/sca-cpp/trunk/components/http/Makefile.am Sun Mar 13 19:24:02 2011
@@ -1,5 +1,3 @@
-#!/bin/sh
-
# 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
@@ -17,18 +15,22 @@
# specific language governing permissions and limitations
# under the License.
-# Create app links and sub-directories if needed
-for n in `ls apps | awk '{ printf "apps/%s/nuvem\n", $1 }'`; do
- if [ ! -e "$n" ]; then
- ln -s ../../../../../nuvem/nuvem-parallel/nuvem "$n"
- fi
-done
-
-for n in `ls apps | awk '{ printf "apps/%s/htdocs\n", $1 }'`; do
- if [ ! -e "$n" ]; then
- mkdir "$n"
- ln -s ../../../htdocs/login "$n/login"
- ln -s ../../../htdocs/logout "$n/logout"
- fi
-done
+compdir=$(prefix)/components/http
+
+EXTRA_DIST = http.composite httpget.componentType *.scm
+
+comp_LTLIBRARIES = libhttpget.la
+noinst_DATA = libhttpget.so
+
+libhttpget_la_SOURCES = httpget.cpp
+libhttpget_la_LDFLAGS = -lxml2 -lmozjs -curl
+libhttpget.so:
+ ln -s .libs/libhttpget.so
+
+client_test_SOURCES = client-test.cpp
+client_test_LDFLAGS = -lxml2 -lcurl -lmozjs
+
+dist_noinst_SCRIPTS = server-test
+noinst_PROGRAMS = client-test
+TESTS = server-test
Added: tuscany/sca-cpp/trunk/components/http/client-test.cpp
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/http/client-test.cpp?rev=1081203&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/components/http/client-test.cpp (added)
+++ tuscany/sca-cpp/trunk/components/http/client-test.cpp Sun Mar 13 19:24:02
2011
@@ -0,0 +1,84 @@
+/*
+ * 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$ */
+
+/**
+ * Test file database component.
+ */
+
+#include <assert.h>
+#include "stream.hpp"
+#include "string.hpp"
+
+#include "list.hpp"
+#include "value.hpp"
+#include "monad.hpp"
+#include "perf.hpp"
+#include "../../modules/http/http.hpp"
+
+namespace tuscany {
+namespace http {
+
+const string uri("http://localhost:8090/httpget");
+
+bool testGet() {
+ http::CURLSession cs("", "", "");
+
+ const failable<value> val = http::get(uri, cs);
+ assert(hasContent(val));
+ assert(contains(string(car<value>(cadr<value>(content(val)))), "It
works"));
+
+ return true;
+}
+
+struct getLoop {
+ http::CURLSession cs;
+ getLoop(http::CURLSession cs) : cs(cs) {
+ }
+ const bool operator()() const {
+ const failable<value> val = http::get(uri, cs);
+ assert(hasContent(val));
+ assert(contains(string(car<value>(cadr<value>(content(val)))), "It
works"));
+ return true;
+ }
+};
+
+bool testGetPerf() {
+ http::CURLSession cs("", "", "");
+
+ const lambda<bool()> gl = getLoop(cs);
+ cout << "HTTP get test " << time(gl, 5, 200) << " ms" << endl;
+
+ return true;
+}
+
+}
+}
+
+int main() {
+ tuscany::cout << "Testing..." << tuscany::endl;
+
+ tuscany::http::testGet();
+ tuscany::http::testGetPerf();
+
+ tuscany::cout << "OK" << tuscany::endl;
+
+ return 0;
+}
Added: tuscany/sca-cpp/trunk/components/http/http.composite
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/http/http.composite?rev=1081203&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/components/http/http.composite (added)
+++ tuscany/sca-cpp/trunk/components/http/http.composite Sun Mar 13 19:24:02
2011
@@ -0,0 +1,40 @@
+<?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.
+-->
+<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="http">
+
+ <component name="httpget">
+ <implementation.cpp path="." library="libhttpget"/>
+ <service name="httpget">
+ <t:binding.http uri="httpget"/>
+ </service>
+ <reference name="url" target="url-test"/>
+ </component>
+
+ <component name="url-test">
+ <t:implementation.scheme script="url-test.scm"/>
+ <service name="url-test">
+ <t:binding.http uri="url-test"/>
+ </service>
+ </component>
+
+</composite>
Added: tuscany/sca-cpp/trunk/components/http/httpget.componentType
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/http/httpget.componentType?rev=1081203&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/components/http/httpget.componentType (added)
+++ tuscany/sca-cpp/trunk/components/http/httpget.componentType Sun Mar 13
19:24:02 2011
@@ -0,0 +1,28 @@
+<?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.
+-->
+<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/components">
+
+ <service name="http"/>
+ <reference name="url"/>
+
+</composite>
Added: tuscany/sca-cpp/trunk/components/http/httpget.cpp
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/http/httpget.cpp?rev=1081203&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/components/http/httpget.cpp (added)
+++ tuscany/sca-cpp/trunk/components/http/httpget.cpp Sun Mar 13 19:24:02 2011
@@ -0,0 +1,90 @@
+/*
+ * 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$ */
+
+/**
+ * HTTP client component implementation.
+ */
+
+#include "string.hpp"
+#include "function.hpp"
+#include "list.hpp"
+#include "value.hpp"
+#include "monad.hpp"
+#include "../../modules/http/http.hpp"
+
+namespace tuscany {
+namespace httpget {
+
+/**
+ * Evaluate an HTTP get.
+ */
+const failable<value> get(const lambda<value(const list<value>&)> url,
http::CURLSession& ch) {
+ debug("httpget::get");
+ const value u = url(mklist<value>("get", list<value>()));
+ debug(u, "httpget::get::url");
+ return http::get(u, ch);
+}
+
+/**
+ * Component implementation lambda function.
+ */
+class applyhttp {
+public:
+ applyhttp(const lambda<value(const list<value>&)> url, http::CURLSession&
ch) : url(url), ch(ch) {
+ }
+
+ const value operator()(const list<value>& params) const {
+ debug(params, "httpget::applyhttp::params");
+ const value func(car(params));
+ if (func == "get")
+ return get(url, ch);
+ return tuscany::mkfailure<tuscany::value>();
+ }
+
+private:
+ const lambda<value(const list<value>&)> url;
+ http::CURLSession& ch;
+};
+
+/**
+ * Start the component.
+ */
+const failable<value> start(const list<value>& params) {
+ // Create a CURL session
+ http::CURLSession& ch = *(new (gc_new<http::CURLSession>())
http::CURLSession("", "", ""));
+
+ // Return the component implementation lambda function
+ return value(lambda<value(const list<value>&)>(applyhttp(car(params),
ch)));
+}
+
+}
+}
+
+extern "C" {
+
+const tuscany::value apply(const tuscany::list<tuscany::value>& params) {
+ const tuscany::value func(car(params));
+ if (func == "start")
+ return tuscany::httpget::start(cdr(params));
+ return tuscany::mkfailure<tuscany::value>();
+}
+
+}
Copied: tuscany/sca-cpp/trunk/components/http/server-test (from r1079292,
tuscany/sca-cpp/trunk/components/Makefile.am)
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/http/server-test?p2=tuscany/sca-cpp/trunk/components/http/server-test&p1=tuscany/sca-cpp/trunk/components/Makefile.am&r1=1079292&r2=1081203&rev=1081203&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/components/http/server-test Sun Mar 13 19:24:02 2011
@@ -1,3 +1,5 @@
+#!/bin/sh
+
# 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
@@ -15,5 +17,23 @@
# specific language governing permissions and limitations
# under the License.
-SUBDIRS = cache chat log nosqldb filedb queue sqldb webservice
+# Setup
+../../modules/http/httpd-conf tmp localhost 8090 ../../modules/http/htdocs
+../../modules/server/server-conf tmp
+../../modules/server/scheme-conf tmp
+cat >>tmp/conf/httpd.conf <<EOF
+SCAContribution `pwd`/
+SCAComposite http.composite
+EOF
+
+../../modules/http/httpd-start tmp
+sleep 2
+
+# Test
+./client-test 2>/dev/null
+rc=$?
+# Cleanup
+../../modules/http/httpd-stop tmp
+sleep 2
+return $rc
Propchange: tuscany/sca-cpp/trunk/components/http/server-test
------------------------------------------------------------------------------
svn:executable = *
Added: tuscany/sca-cpp/trunk/components/http/url-test.scm
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/http/url-test.scm?rev=1081203&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/components/http/url-test.scm (added)
+++ tuscany/sca-cpp/trunk/components/http/url-test.scm Sun Mar 13 19:24:02 2011
@@ -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.
+
+; URL test case
+
+(define (get id)
+ "http://localhost:8090/index.html"
+)
+
Modified: tuscany/sca-cpp/trunk/configure.ac
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/configure.ac?rev=1081203&r1=1081202&r2=1081203&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/configure.ac (original)
+++ tuscany/sca-cpp/trunk/configure.ac Sun Mar 13 19:24:02 2011
@@ -907,6 +907,7 @@ AC_CONFIG_FILES([Makefile
components/chat/Makefile
components/nosqldb/Makefile
components/filedb/Makefile
+ components/http/Makefile
components/queue/Makefile
components/sqldb/Makefile
components/webservice/Makefile
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testget/app.composite
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testget/app.composite?rev=1081203&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testget/app.composite (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testget/app.composite Sun Mar 13
19:24:02 2011
@@ -0,0 +1,65 @@
+<?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.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
targetNamespace="http://testget" name="testget">
+ <service name="get" promote="get"/>
+ <component t:x="25" t:y="25" name="get" t:title="http get" t:color="green1">
+ <implementation.cpp path="lib/http" library="libhttpget"/>
+ <service name="get"/>
+ <reference target="text" name="url"/>
+ </component>
+ <component t:x="89" t:y="25" name="text" t:title="text" t:color="orange1">
+ <t:implementation.python script="nuvem/text.py"/>
+ <service name="text"/>
+ <property>http://www.google.com</property>
+ </component>
+ <service name="get2" promote="get2"/>
+ <component t:x="24" t:y="91" name="get2" t:title="http get" t:color="green1">
+ <implementation.cpp path="lib/http" library="libhttpget"/>
+ <service name="get"/>
+ <reference target="text2" name="url"/>
+ </component>
+ <service name="get3" promote="get3"/>
+ <component t:x="23" t:y="175" name="get3" t:title="http get" t:color="green1">
+ <implementation.cpp path="lib/http" library="libhttpget"/>
+ <service name="get"/>
+ <reference target="text3" name="url"/>
+ </component>
+ <component t:x="87" t:y="175" name="text3" t:title="text" t:color="orange1">
+ <t:implementation.python script="nuvem/text.py"/>
+ <service name="text"/>
+
<property>http://www.weather.gov/forecasts/xml/sample_products/browser_interface/ndfdXMLclient.php?whichClient=NDFDgen&lat=38.99&lon=-77.01&listLatLon=&lat1=&lon1=&lat2=&lon2=&resolutionSub=&listLat1=&listLon1=&listLat2=&listLon2=&resolutionList=&endPoint1Lat=&endPoint1Lon=&endPoint2Lat=&endPoint2Lon=&listEndPoint1Lat=&listEndPoint1Lon=&listEndPoint2Lat=&listEndPoint2Lon=&zipCodeList=&listZipCodeList=&centerPointLat=&centerPointLon=&distanceLat=&distanceLon=&resolutionSquare=&listCenterPointLat=&listCenterPointLon=&listDistanceLat=&listDistanceLon=&listResolutionSquare=&citiesLevel=&listCitiesLevel=&sector=&gmlListLatLon=&featureType=&requestedTime=&startTime=&endTime=&compType=&propertyName=&product=time-series&begin=2004-01-01T00%3A00%3A00&end=2015-03-10T00%3A00%3A00&maxt=maxt&Submi
t=Submit</property>
+ </component>
+ <component t:x="88" t:y="91" name="text2" t:title="text" t:color="orange1">
+ <t:implementation.python script="nuvem/text.py"/>
+ <service name="text"/>
+
<property>http://maps.googleapis.com/maps/api/directions/json?origin=Boston,MA&destination=Concord,MA&waypoints=Charlestown,MA|Lexington,MA&sensor=false</property>
+ </component>
+ <service name="get4" promote="get4"/>
+ <component t:x="26" t:y="267" name="get4" t:title="http get" t:color="green1">
+ <implementation.cpp path="lib/http" library="libhttpget"/>
+ <service name="get"/>
+ <reference target="text4" name="url"/>
+ </component>
+ <component t:x="90" t:y="267" name="text4" t:title="text" t:color="orange1">
+ <t:implementation.python script="nuvem/text.py"/>
+ <service name="text"/>
+ <property>http://feedproxy.google.com/TechCrunch</property>
+ </component>
+</composite>
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testget/app.html
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testget/app.html?rev=1081203&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testget/app.html (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testget/app.html Sun Mar 13
19:24:02 2011
@@ -0,0 +1,20 @@
+<?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.
+-->
+<DIV id="page"/>
Modified: tuscany/sca-cpp/trunk/modules/edit/apps/testlogic/app.composite
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testlogic/app.composite?rev=1081203&r1=1081202&r2=1081203&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testlogic/app.composite (original)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testlogic/app.composite Sun Mar 13
19:24:02 2011
@@ -26,15 +26,10 @@
<reference target="text" name="then"/>
<reference target="text2" name="else"/>
</component>
- <component t:x="123" t:y="21" name="item" t:title="item" t:color="yellow1">
- <t:implementation.python script="nuvem/item.py"/>
- <service name="item"/>
- <property>item</property>
- </component>
<component t:x="75" t:y="24" name="greater" t:title="gt" t:color="magenta1">
<t:implementation.python script="nuvem/greater.py"/>
<service name="greater"/>
- <reference target="item" name="value1"/>
+ <reference target="number2" name="value1"/>
<reference target="number" name="value2"/>
</component>
<component t:x="118" t:y="66" name="number" t:title="number"
t:color="orange1">
@@ -52,4 +47,9 @@
<service name="text"/>
<property>not greater than 5</property>
</component>
+ <component t:x="88" t:y="25" name="number2" t:title="number"
t:color="orange1">
+ <t:implementation.python script="nuvem/number.py"/>
+ <service name="number"/>
+ <property>3</property>
+ </component>
</composite>
Modified: tuscany/sca-cpp/trunk/modules/edit/dashboards/joe@localhost
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/dashboards/joe%40localhost?rev=1081203&r1=1081202&r2=1081203&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/dashboards/joe@localhost (original)
+++ tuscany/sca-cpp/trunk/modules/edit/dashboards/joe@localhost Sun Mar 13
19:24:02 2011
@@ -1 +1 @@
-((entry (title "An Empty Test App") (id "test")) (entry (title "Test Values
and Lists") (id "testvalues")) (entry (title "Test Social Components") (id
"testsocial")) (entry (title "Test URL Components") (id "testurl")) (entry
(title "Test Logic Components") (id "testlogic")) (entry (title "Test Text
Processing Components") (id "testtext")) (entry (title "An App that shows my
Social Profiles") (id "me360")) (entry (title "An App that shows Friends Near
Me") (id "nearme")))
+((entry (title "An Empty Test App") (id "test")) (entry (title "Test Values
and Lists") (id "testvalues")) (entry (title "Test Social Components") (id
"testsocial")) (entry (title "Test URL Components") (id "testurl")) (entry
(title "Test Logic Components") (id "testlogic")) (entry (title "Test Text
Processing Components") (id "testtext")) (entry (title "Test HTTP Get
Component") (id "testget")) (entry (title "An App that shows my Social
Profiles") (id "me360")) (entry (title "An App that shows Friends Near Me") (id
"nearme")))
Modified: tuscany/sca-cpp/trunk/modules/edit/dashboards/[email protected]
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/dashboards/joe%40sca-store.com?rev=1081203&r1=1081202&r2=1081203&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/dashboards/[email protected] (original)
+++ tuscany/sca-cpp/trunk/modules/edit/dashboards/[email protected] Sun Mar 13
19:24:02 2011
@@ -1 +1 @@
-((entry (title "An Empty Test App") (id "test")) (entry (title "Test Values
and Lists") (id "testvalues")) (entry (title "Test Social Components") (id
"testsocial")) (entry (title "Test URL Components") (id "testurl")) (entry
(title "Test Logic Components") (id "testlogic")) (entry (title "Test Text
Processing Components") (id "testtext")) (entry (title "An App that shows my
Social Profiles") (id "me360")) (entry (title "An App that shows Friends Near
Me") (id "nearme")))
+((entry (title "An Empty Test App") (id "test")) (entry (title "Test Values
and Lists") (id "testvalues")) (entry (title "Test Social Components") (id
"testsocial")) (entry (title "Test URL Components") (id "testurl")) (entry
(title "Test Logic Components") (id "testlogic")) (entry (title "Test Text
Processing Components") (id "testtext")) (entry (title "Test HTTP Get
Component") (id "testget")) (entry (title "An App that shows my Social
Profiles") (id "me360")) (entry (title "An App that shows Friends Near Me") (id
"nearme")))
Modified: tuscany/sca-cpp/trunk/modules/edit/htdocs/main.html
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/htdocs/main.html?rev=1081203&r1=1081202&r2=1081203&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/htdocs/main.html (original)
+++ tuscany/sca-cpp/trunk/modules/edit/htdocs/main.html Sun Mar 13 19:24:02 2011
@@ -34,13 +34,13 @@
<p>Try the <a href="dash" target="_parent">App Dashboard</a> to manage your
collection of apps.</p>
<h2>Composition Editor</h2>
-<p>Try the <a href="graph/?app=myprofile" target="_parent">Composition
Editor</a> to compose the logic of an app.</p>
+<p>Try the <a href="graph/?app=testvalues" target="_parent">Composition
Editor</a> to compose the logic of an app.</p>
<h2>Page Editor</h2>
-<p>Try the <a href="page/?app=myprofile" target="_parent">Page Editor</a> to
draw an app page.</p>
+<p>Try the <a href="page/?app=testvalues" target="_parent">Page Editor</a> to
draw an app page.</p>
<h2>App Settings Editor</h2>
-<p>Try the <a href="app/?app=myprofile" target="_parent">App Settings
Editor</a> to edit the settings of app.</p>
+<p>Try the <a href="app/?app=testvalues" target="_parent">App Settings
Editor</a> to edit the settings of app.</p>
</div>
Modified: tuscany/sca-cpp/trunk/modules/edit/mkapplinks
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/mkapplinks?rev=1081203&r1=1081202&r2=1081203&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/mkapplinks (original)
+++ tuscany/sca-cpp/trunk/modules/edit/mkapplinks Sun Mar 13 19:24:02 2011
@@ -24,6 +24,12 @@ for n in `ls apps | awk '{ printf "apps/
fi
done
+for n in `ls apps | awk '{ printf "apps/%s/lib\n", $1 }'`; do
+ if [ ! -e "$n" ]; then
+ ln -s ../../../../components "$n"
+ fi
+done
+
for n in `ls apps | awk '{ printf "apps/%s/htdocs\n", $1 }'`; do
if [ ! -e "$n" ]; then
mkdir "$n"
Modified: tuscany/sca-cpp/trunk/modules/edit/palettes/url/palette.composite
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/palettes/url/palette.composite?rev=1081203&r1=1081202&r2=1081203&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/palettes/url/palette.composite (original)
+++ tuscany/sca-cpp/trunk/modules/edit/palettes/url/palette.composite Sun Mar
13 19:24:02 2011
@@ -26,8 +26,8 @@
<service name="path" promote="path"/>
<service name="params" promote="params"/>
<service name="user" promote="user"/>
- <service name="realm" promote="realm"/>
<service name="email" promote="email"/>
+ <service name="get" promote="get"/>
<component name="host" t:title="host" t:color="green1">
<t:implementation.python script="nuvem/host.py"/>
@@ -53,16 +53,16 @@
<property name="user"></property>
</component>
- <component name="realm" t:title="realm" t:color="green1">
- <t:implementation.python script="nuvem/realm.py"/>
- <service name="realm"/>
- <property name="realm"></property>
- </component>
-
<component name="email" t:title="email" t:color="green1">
<t:implementation.python script="nuvem/email.py"/>
<service name="email"/>
<property name="email"></property>
</component>
+ <component name="get" t:title="http get" t:color="green1">
+ <implementation.cpp path="lib/http" library="libhttpget"/>
+ <service name="get"/>
+ <reference name="url"/>
+ </component>
+
</composite>