summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/samples
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-09-20 23:30:12 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-09-20 23:30:12 +0000
commit98a4810fb6c655c22206a3167a74e669a31897d9 (patch)
tree7d0c7c28af52d7157037417b8c3427fb1277dd8e /sca-cpp/trunk/samples
parent9ab96ef11a8e3b7f88ef78fd87b4100dbaa66767 (diff)
Minor change, renamed getcatalog to items.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@999159 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/samples')
-rw-r--r--sca-cpp/trunk/samples/store-cpp/htdocs/test/items-request.txt1
-rw-r--r--sca-cpp/trunk/samples/store-cpp/htdocs/test/items-result.txt1
-rw-r--r--sca-cpp/trunk/samples/store-gae/fruits-catalog.py2
-rw-r--r--sca-cpp/trunk/samples/store-gae/htdocs/index.html4
-rw-r--r--sca-cpp/trunk/samples/store-gae/htdocs/test/items-result.txt (renamed from sca-cpp/trunk/samples/store-gae/htdocs/test/getcatalog-result.txt)0
-rwxr-xr-xsca-cpp/trunk/samples/store-gae/server-test4
-rw-r--r--sca-cpp/trunk/samples/store-gae/store.py4
-rw-r--r--sca-cpp/trunk/samples/store-python/fruits-catalog.py2
-rw-r--r--sca-cpp/trunk/samples/store-python/htdocs/index.html4
-rwxr-xr-xsca-cpp/trunk/samples/store-python/server-test4
-rw-r--r--sca-cpp/trunk/samples/store-python/store.py4
11 files changed, 16 insertions, 14 deletions
diff --git a/sca-cpp/trunk/samples/store-cpp/htdocs/test/items-request.txt b/sca-cpp/trunk/samples/store-cpp/htdocs/test/items-request.txt
new file mode 100644
index 0000000000..ecf564cb98
--- /dev/null
+++ b/sca-cpp/trunk/samples/store-cpp/htdocs/test/items-request.txt
@@ -0,0 +1 @@
+{"id": 1, "method": "items", "params": []}
diff --git a/sca-cpp/trunk/samples/store-cpp/htdocs/test/items-result.txt b/sca-cpp/trunk/samples/store-cpp/htdocs/test/items-result.txt
new file mode 100644
index 0000000000..34a2420298
--- /dev/null
+++ b/sca-cpp/trunk/samples/store-cpp/htdocs/test/items-result.txt
@@ -0,0 +1 @@
+{"id":1,"result":[{"javaClass":"services.Item","name":"Apple","currencyCode":"USD","currencySymbol":"$","price":2.99},{"javaClass":"services.Item","name":"Orange","currencyCode":"USD","currencySymbol":"$","price":3.55},{"javaClass":"services.Item","name":"Pear","currencyCode":"USD","currencySymbol":"$","price":1.55}]} \ No newline at end of file
diff --git a/sca-cpp/trunk/samples/store-gae/fruits-catalog.py b/sca-cpp/trunk/samples/store-gae/fruits-catalog.py
index 2a6d726fdc..43e1900d33 100644
--- a/sca-cpp/trunk/samples/store-gae/fruits-catalog.py
+++ b/sca-cpp/trunk/samples/store-gae/fruits-catalog.py
@@ -17,7 +17,7 @@
# Catalog implementation
-def getcatalog(converter, currencyCode):
+def items(converter, currencyCode):
code = currencyCode()
def convert(price):
return converter("convert", "USD", code, price)
diff --git a/sca-cpp/trunk/samples/store-gae/htdocs/index.html b/sca-cpp/trunk/samples/store-gae/htdocs/index.html
index 2f61b1f946..9f0e436b11 100644
--- a/sca-cpp/trunk/samples/store-gae/htdocs/index.html
+++ b/sca-cpp/trunk/samples/store-gae/htdocs/index.html
@@ -36,7 +36,7 @@ var shoppingTotal = new tuscany.sca.Reference("shoppingTotal");
var catalogItems;
-function catalog_getcatalogResponse(items, exception) {
+function catalog_itemsResponse(items, exception) {
if (exception) {
alert(exception.message);
return;
@@ -137,7 +137,7 @@ function deleteCart() {
function init() {
try {
- catalog.apply("getcatalog", catalog_getcatalogResponse);
+ catalog.apply("items", catalog_itemsResponse);
shoppingCart.apply("getemail", shoppingCart_getemailResponse);
shoppingCart.apply("gethost", shoppingCart_gethostResponse);
shoppingCart.get("", shoppingCart_getResponse);
diff --git a/sca-cpp/trunk/samples/store-gae/htdocs/test/getcatalog-result.txt b/sca-cpp/trunk/samples/store-gae/htdocs/test/items-result.txt
index 6c2d599106..6c2d599106 100644
--- a/sca-cpp/trunk/samples/store-gae/htdocs/test/getcatalog-result.txt
+++ b/sca-cpp/trunk/samples/store-gae/htdocs/test/items-result.txt
diff --git a/sca-cpp/trunk/samples/store-gae/server-test b/sca-cpp/trunk/samples/store-gae/server-test
index acaf3b2f0d..4d42e9a5f5 100755
--- a/sca-cpp/trunk/samples/store-gae/server-test
+++ b/sca-cpp/trunk/samples/store-gae/server-test
@@ -33,8 +33,8 @@ rc=$?
# Test Catalog
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl -b tmp/cookies.txt http://localhost:8090/references/Store/catalog -X POST -H "Content-type: application/json-rpc" --data @../store-cpp/htdocs/test/getcatalog-request.txt >tmp/getcatalog-result.txt 2>/dev/null
- diff tmp/getcatalog-result.txt htdocs/test/getcatalog-result.txt
+ $curl_prefix/bin/curl -b tmp/cookies.txt http://localhost:8090/references/Store/catalog -X POST -H "Content-type: application/json-rpc" --data @../store-cpp/htdocs/test/items-request.txt >tmp/items-result.txt 2>/dev/null
+ diff tmp/items-result.txt htdocs/test/items-result.txt
rc=$?
fi
diff --git a/sca-cpp/trunk/samples/store-gae/store.py b/sca-cpp/trunk/samples/store-gae/store.py
index 0b4e0f72fd..becd1d14a5 100644
--- a/sca-cpp/trunk/samples/store-gae/store.py
+++ b/sca-cpp/trunk/samples/store-gae/store.py
@@ -26,8 +26,8 @@ def getall(catalog, shoppingCart, shoppingTotal):
def get(id, catalog, shoppingCart, shoppingTotal):
return shoppingCart("get", id)
-def getcatalog(catalog, shoppingCart, shoppingTotal):
- return catalog("getcatalog")
+def items(catalog, shoppingCart, shoppingTotal):
+ return catalog("items")
def gettotal(catalog, shoppingCart, shoppingTotal):
return shoppingCart("gettotal")
diff --git a/sca-cpp/trunk/samples/store-python/fruits-catalog.py b/sca-cpp/trunk/samples/store-python/fruits-catalog.py
index 2a6d726fdc..43e1900d33 100644
--- a/sca-cpp/trunk/samples/store-python/fruits-catalog.py
+++ b/sca-cpp/trunk/samples/store-python/fruits-catalog.py
@@ -17,7 +17,7 @@
# Catalog implementation
-def getcatalog(converter, currencyCode):
+def items(converter, currencyCode):
code = currencyCode()
def convert(price):
return converter("convert", "USD", code, price)
diff --git a/sca-cpp/trunk/samples/store-python/htdocs/index.html b/sca-cpp/trunk/samples/store-python/htdocs/index.html
index c27e54f753..50c9e52e7e 100644
--- a/sca-cpp/trunk/samples/store-python/htdocs/index.html
+++ b/sca-cpp/trunk/samples/store-python/htdocs/index.html
@@ -36,7 +36,7 @@ var shoppingTotal = new tuscany.sca.Reference("shoppingTotal");
var catalogItems;
-function catalog_getcatalogResponse(items, exception) {
+function catalog_itemsResponse(items, exception) {
if (exception){
alert(exception.message);
return;
@@ -120,7 +120,7 @@ function deleteCart() {
function init() {
try {
- catalog.apply("getcatalog", catalog_getcatalogResponse);
+ catalog.apply("items", catalog_itemsResponse);
shoppingCart.get("", shoppingCart_getResponse);
} catch(e){
alert(e);
diff --git a/sca-cpp/trunk/samples/store-python/server-test b/sca-cpp/trunk/samples/store-python/server-test
index dd94ccabde..1612bc59e2 100755
--- a/sca-cpp/trunk/samples/store-python/server-test
+++ b/sca-cpp/trunk/samples/store-python/server-test
@@ -32,8 +32,8 @@ rc=$?
# Test Catalog
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/references/Store/catalog -X POST -H "Content-type: application/json-rpc" --data @../store-cpp/htdocs/test/getcatalog-request.txt >tmp/getcatalog-result.txt 2>/dev/null
- diff tmp/getcatalog-result.txt ../store-cpp/htdocs/test/getcatalog-result.txt
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/catalog -X POST -H "Content-type: application/json-rpc" --data @../store-cpp/htdocs/test/items-request.txt >tmp/items-result.txt 2>/dev/null
+ diff tmp/items-result.txt ../store-cpp/htdocs/test/items-result.txt
rc=$?
fi
diff --git a/sca-cpp/trunk/samples/store-python/store.py b/sca-cpp/trunk/samples/store-python/store.py
index 0b4e0f72fd..becd1d14a5 100644
--- a/sca-cpp/trunk/samples/store-python/store.py
+++ b/sca-cpp/trunk/samples/store-python/store.py
@@ -26,8 +26,8 @@ def getall(catalog, shoppingCart, shoppingTotal):
def get(id, catalog, shoppingCart, shoppingTotal):
return shoppingCart("get", id)
-def getcatalog(catalog, shoppingCart, shoppingTotal):
- return catalog("getcatalog")
+def items(catalog, shoppingCart, shoppingTotal):
+ return catalog("items")
def gettotal(catalog, shoppingCart, shoppingTotal):
return shoppingCart("gettotal")