diff options
Diffstat (limited to '')
-rwxr-xr-x | cpp/sca/modules/http/httpd-test | 8 | ||||
-rw-r--r-- | cpp/sca/modules/http/httpd-test.composite (renamed from cpp/sca/test/store-script/catalogs.composite) | 41 | ||||
-rw-r--r-- | cpp/sca/modules/http/httpd-test.scm | 20 |
3 files changed, 33 insertions, 36 deletions
diff --git a/cpp/sca/modules/http/httpd-test b/cpp/sca/modules/http/httpd-test index 04c584496c..1d9b3cb34d 100755 --- a/cpp/sca/modules/http/httpd-test +++ b/cpp/sca/modules/http/httpd-test @@ -22,13 +22,15 @@ echo "Testing..." # Setup ./httpd-conf tmp 8090 htdocs cat >>tmp/conf/httpd.conf <<EOF + <Location /test> -SetHandler mod_tuscany +SetHandler mod_tuscany_eval SCAContribution `pwd`/ +SCAComposite httpd-test.composite SCAComponent httpd-test -SCAImplementation httpd-test.scm </Location> EOF + apachectl -k start -d `pwd`/tmp sleep 1 @@ -70,7 +72,7 @@ fi # Cleanup apachectl -k stop -d `pwd`/tmp -sleep 1 +sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi diff --git a/cpp/sca/test/store-script/catalogs.composite b/cpp/sca/modules/http/httpd-test.composite index 1638ed0a05..875d26ae1b 100644 --- a/cpp/sca/test/store-script/catalogs.composite +++ b/cpp/sca/modules/http/httpd-test.composite @@ -19,25 +19,24 @@ --> <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1" - targetNamespace="http://services" - name="catalogs"> - - <component name="FruitsCatalogWebService"> - <implementation.java class="services.FruitsCatalogImpl"/> - <service name="Catalog"> - <binding.ws/> - </service> - <property name="currencyCode">USD</property> - <reference name="currencyConverter" target="CurrencyConverterWebService"> - <binding.ws/> - </reference> - </component> - - <component name="VegetablesCatalogWebService"> - <implementation.java class="services.VegetablesCatalogImpl"/> - <service name="Catalog"> - <binding.ws/> - </service> - </component> - + targetNamespace="http://test" + name="httpd-test"> + + <component name="httpd-test"> + <t:implementation.scheme uri="httpd-test.scm"/> + <service name="test"> + <t:binding.http uri="test"/> + </service> + </component> + + <component name="httpd-client"> + <t:implementation.scheme uri="httpd-client.scm"/> + <service name="client"> + <t:binding.http uri="client"/> + </service> + <reference name="ref" target="test"> + <t:binding.http/> + </reference> + </component> + </composite> diff --git a/cpp/sca/modules/http/httpd-test.scm b/cpp/sca/modules/http/httpd-test.scm index a3ddf8dda8..0566eaf36f 100644 --- a/cpp/sca/modules/http/httpd-test.scm +++ b/cpp/sca/modules/http/httpd-test.scm @@ -1,33 +1,29 @@ -(; "JSON-RPC test case") +; JSON-RPC test case (define (echo x) x) -(; "ATOMPub test case") +; ATOMPub test case (define (getall) '("Sample Feed" "123456789" - ("Item" "111" (javaClass "services.Item") (name "Apple") (currency "USD") (symbol "$") (price 2.99)) - ("Item" "222" (javaClass "services.Item") (name "Orange") (currency "USD") (symbol "$") (price 3.55)) - ("Item" "333" (javaClass "services.Item") (name "Pear") (currency "USD") (symbol "$") (price 1.55))) + ("Item" "111" ((javaClass "services.Item") (name "Apple") (currencyCode "USD") (currencySymbol "$") (price 2.99))) + ("Item" "222" ((javaClass "services.Item") (name "Orange") (currencyCode "USD") (currencySymbol "$") (price 3.55))) + ("Item" "333" ((javaClass "services.Item") (name "Pear") (currencyCode "USD") (currencySymbol "$") (price 1.55)))) ) (define (get id) - (define entry '((javaClass "services.Item") (name "Apple") (currency "USD") (symbol "$") (price 2.99))) + (define entry '((javaClass "services.Item") (name "Apple") (currencyCode "USD") (currencySymbol "$") (price 2.99))) (cons "Item" (list id entry)) ) (define (post entry) - (display entry) "123456789" ) -(define (put entry) - (display entry) +(define (put id entry) true ) -(define (delete . args) - (display args) +(define (delete id) true ) - |