ItEr43S09ImplantacionAplicacionItEr42S13: Added script to get XML Schema of web services.
This commit is contained in:
parent
ecad5b92a4
commit
6df3a08603
2 changed files with 43 additions and 14 deletions
|
|
@ -6,6 +6,13 @@
|
|||
|
||||
+ When working with the local application:
|
||||
|
||||
* Get XML Schema for any service:
|
||||
|
||||
- get-xml-schema.sh <service-path>
|
||||
|
||||
Example:
|
||||
- get-xml-schema.sh criteriontypes
|
||||
|
||||
* [Optional] For clarity: remove "navaldev" database + reload Jetty.
|
||||
|
||||
* Import criterion types:
|
||||
|
|
@ -42,21 +49,9 @@
|
|||
- update-order.sh order-update-sample.xml (authenticate with
|
||||
wswriter/wswriter)
|
||||
|
||||
+ When working with the online demo:
|
||||
+ When working with the online demo add "--prod" argument to every command.
|
||||
Example:
|
||||
|
||||
* import-criterions-types.sh --prod criterion-types-sample.xml
|
||||
(authenticate with wswriter/wswriter)
|
||||
|
||||
* export-criterion-types.sh --prod (authenticate with wsreader/wsreader)
|
||||
|
||||
* import-resources.sh --prod resources-sample.xml
|
||||
(authenticate with wswriter/wswriter)
|
||||
|
||||
* export-order-element.sh --prod ORDER-ELEMENT-CODE (authenticate with
|
||||
wsreader/wsreader)
|
||||
|
||||
* import-order.sh --prod order-sample.xml (authenticate with
|
||||
wswriter/wswriter)
|
||||
|
||||
* update-order.sh --prod order-update-sample.xml (authenticate with
|
||||
wswriter/wswriter)
|
||||
|
|
|
|||
34
scripts/rest-clients/get-xml-schema.sh
Executable file
34
scripts/rest-clients/get-xml-schema.sh
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ./rest-common-env.sh
|
||||
|
||||
printf "Login name: "
|
||||
read loginName
|
||||
printf "Password: "
|
||||
read password
|
||||
|
||||
baseServiceURL=$DEVELOPMENT_BASE_SERVICE_URL
|
||||
certificate=$DEVELOPMENT_CERTIFICATE
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
if [ "$i" = "--prod" ]; then
|
||||
baseServiceURL=$PRODUCTION_BASE_SERVICE_URL
|
||||
certificate=$PRODUCTION_CERTIFICATE
|
||||
else
|
||||
service=$i
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$service" = "" ]; then
|
||||
printf "Missing service path\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
authorization=`./base64.sh $loginName:$password`
|
||||
|
||||
|
||||
wget --no-check-certificate \
|
||||
--header "Authorization: Basic $authorization" \
|
||||
-O $service-schema.xml \
|
||||
$baseServiceURL/$service/?_wadl&_type=xml
|
||||
Loading…
Add table
Reference in a new issue