From 8f35436f266d6483335fbc0667e3bf7febd57eb3 Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Mon, 11 Jul 2011 13:14:19 +0200 Subject: [PATCH] Modified export script to test new get methods by code in web services. FEA: ItEr75S12AllowExportOneEntity --- scripts/rest-clients/export.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/rest-clients/export.sh b/scripts/rest-clients/export.sh index 775b6be74..90348af81 100755 --- a/scripts/rest-clients/export.sh +++ b/scripts/rest-clients/export.sh @@ -7,21 +7,25 @@ read loginName printf "Password: " read password +code=$2 + if [ "$2" = "--prod" ]; then baseServiceURL=$PRODUCTION_BASE_SERVICE_URL certificate=$PRODUCTION_CERTIFICATE + code=$3 elif [ "$2" = "--dev" ]; then - baseServiceURL=$DEVELOPMENT_BASE_SERVICE_URL - certificate=$DEVELOPMENT_CERTIFICATE + baseServiceURL=$DEVELOPMENT_BASE_SERVICE_URL + certificate=$DEVELOPMENT_CERTIFICATE + code=$3 else - baseServiceURL=$DEMO_BASE_SERVICE_URL - certificate=$DEMO_CERTIFICATE + baseServiceURL=$DEMO_BASE_SERVICE_URL + certificate=$DEMO_CERTIFICATE fi authorization=`echo -n "$loginName:$password" | base64` result=`curl -sv -X GET $certificate --header "Authorization: Basic $authorization" \ - $baseServiceURL/$1` + $baseServiceURL/$1/$code` if hash tidy &> /dev/null; then echo $result | tidy -xml -i -q -utf8