From f87b9f1e48df02c26e0bbe3f8f1664c2b0862e52 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sun, 18 Oct 2009 22:25:08 +0000 Subject: Some fixes to the JSON and httpd support. Added support for Atom. Adjusted store test. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@826545 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/sca/test/store-script/htdocs/store.html | 21 ++++++++++++--------- cpp/sca/test/store-script/htdocs/store.js | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'cpp/sca/test/store-script/htdocs') diff --git a/cpp/sca/test/store-script/htdocs/store.html b/cpp/sca/test/store-script/htdocs/store.html index 42f58ab40c..4a2c65d07c 100644 --- a/cpp/sca/test/store-script/htdocs/store.html +++ b/cpp/sca/test/store-script/htdocs/store.html @@ -31,7 +31,7 @@ //var shoppingCart = new tuscany.sca.Reference("shoppingCart"); //@Reference - //var shoppingTotal = new tuscany.sca.Reference("shoppingTotal"); + var shoppingTotal = new tuscany.sca.Reference("shoppingTotal"); var catalogItems; @@ -42,13 +42,16 @@ } var catalog = ""; - for (var i=0; i' + item + '
'; - } - document.getElementById('catalog').innerHTML=catalog; - catalogItems = items; + for (var i=0; i' + item + '
'; + } + document.getElementById('catalog').innerHTML=catalog; + catalogItems = items; + + // TEMP + shoppingTotal.getTotal(shoppingTotal_getTotalResponse); } function shoppingCart_getResponse(feed) { @@ -65,7 +68,7 @@ if (entries.length != 0) { try { - //shoppingTotal.getTotal(shoppingTotal_getTotalResponse); + shoppingTotal.getTotal(shoppingTotal_getTotalResponse); } catch(e){ alert(e); diff --git a/cpp/sca/test/store-script/htdocs/store.js b/cpp/sca/test/store-script/htdocs/store.js index 47af7c01f7..526d36790a 100644 --- a/cpp/sca/test/store-script/htdocs/store.js +++ b/cpp/sca/test/store-script/htdocs/store.js @@ -652,7 +652,7 @@ tuscany.sca.Property = function (name) { tuscany.sca.referenceMap = new Object(); tuscany.sca.referenceMap.catalog = new JSONRpcClient("/Catalog").Service; //tuscany.sca.referenceMap.shoppingCart = new AtomClient("/ShoppingCart/Cart"); -//tuscany.sca.referenceMap.shoppingTotal = new JSONRpcClient("/ShoppingCart/Total").Service; +tuscany.sca.referenceMap.shoppingTotal = new JSONRpcClient("/ShoppingCart/Total").Service; tuscany.sca.Reference = function (name) { return tuscany.sca.referenceMap[name]; } -- cgit v1.2.3