Add first work package for REST API implementation
[anna.git] / example / diameter / launcher / deployments / advanced / answerXml.sh
index ce4aa40..7a98cad 100755 (executable)
@@ -1,13 +1,9 @@
 #!/bin/bash
-> curl_log.txt
-TRACE="--trace-ascii curl_log.txt"
-SERVER=`cat .httpServer`
-
 echo
 echo
-echo "Use: $0 [xml_file] [2e]"
+echo "Use: $0 [json file for REST API] [2e]"
 echo
-echo "Programm 'xml_file' answer to the diameter client or to the server (entity) when"
+echo "Program answer to the diameter client or to the server (entity) when"
 echo "'2e' parameter is provided. If missing xml file, current programmed answers will"
 echo "be shown: '$0' (answers to client), '$0 2e' (answers to server)."
 echo
@@ -16,7 +12,7 @@ then
    if test "$1" = "2e"
    then
      operation="answerxml2e"
-   else 
+   else
      [[ ! -f "$1" ]] && { echo "ERROR: file '$1' not found" ; echo; echo; exit ; }
      operation="answerxml|$1"
      [[ "$2" = "2e" ]] && operation="answerxml2e|$1"
@@ -25,5 +21,4 @@ else
    operation="answerxml"
 fi
 echo
-curl -m 1 --data "$operation" $TRACE ${SERVER}
-
+./operation.sh "$operation"