-
Notifications
You must be signed in to change notification settings - Fork 0
/
curl-test.sh
66 lines (54 loc) · 2.12 KB
/
curl-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# getCapabilites --------------------------------------------------------------
curl -v \
-H "Content-Type: application/json" \
-X POST \
-d @getCapabilities.json \
http://my.sos.server:8080/52n-sos-webapp/service
echo "Press ENTER key to continue..."
read
# getCapabilites - write answer to response.json ------------------------------
curl -v \
-H "Content-Type: application/json" \
-X POST \
-d @getCapabilities.json \
http://my.sos.server:8080/52n-sos-webapp/service > response.json
echo "Press ENTER key to continue..."
read
# JSON getObservation with token authorization --------------------------------
curl -v \
-H "Content-Type: application/json" \
-H "Authorization: IamTheSecretToken-c1db8eb9f3f7" \
-X POST \
-d @../insertObservation/insertObservation.json \
http://my.sos.server:8080/52n-sos-webapp/service
echo "Press ENTER key to continue..."
read
# insertSensor SOAP with token authorization ----------------------------------
curl -v \
-H "Content-Type: application/soap+xml;charset=UTF-8" \
-H "Authorization: IamTheSecretToken-c1db8eb9f3f7" \
-X POST \
-d @../InsertSensor/insertSensor-SOAP.xml \
http://my.sos.server:8080/52n-sos-webapp/service
echo "Press ENTER key to continue..."
read
# insertSensor SOAP with token authorization ----------------------------------
# https protected server with self-signed certificate (add -k switch)
curl -v -k \
-H "Content-Type: application/soap+xml;charset=UTF-8" \
-H "Authorization: IamTheSecretToken-c1db8eb9f3f7" \
-X POST \
-d @../InsertSensor/insertSensor-SOAP.xml \
https://my.sos.server:8080/52n-sos-webapp/service
echo "Press ENTER key to continue..."
read
# insertSensor SOAP with token authorization, write response to response.xml --
curl -v \
-H "Content-Type: application/soap+xml;charset=UTF-8" \
-H "Authorization: IamTheSecretToken-c1db8eb9f3f7" \
-X POST \
-d @../InsertSensor/insertSensor-SOAP.xml \
http://my.sos.server:8080/52n-sos-webapp/service > response.xml
echo "Press ENTER key to quit..."
read