Curl wiersz poleceń do korzystania z webServices?

Wiecie, jak mogę użyć wiersza poleceń Curl, aby opublikować SOAP, aby przetestować serwis internetowy?

Mam plik (soap.xml), który ma wszystkie wiadomości soap dołączone do niego po prostu nie wydaje się być w stanie poprawnie go opublikować.

Dzięki!

Author: Jason Etheridge, 2008-09-17

5 answers

Wysłanie ciągu:

curl -d "String to post" "http://www.example.com/target"

Zamieszczanie zawartości pliku:

curl -d @soap.xml "http://www.example.com/target"
 41
Author: lbz,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2008-09-17 14:49:30

Do SOAP 1.2 Webservice normalnie używam

curl --header "content-type: application/soap+xml" --data @filetopost.xml http://domain/path
 33
Author: Kris C,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-01-01 15:30:11

Źle. To mi nie pasuje.

Dla mnie to działa:

curl 
-H 'SOAPACTION: "urn:samsung.com:service:MainTVAgent2:1#CheckPIN"'   
-X POST 
-H 'Content-type: text/xml'   
-d @/tmp/pinrequest.xml 
192.168.1.5:52235/MainTVServer2/control/MainTVAgent2
 26
Author: Zibri,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2018-07-06 21:11:56
curl -H "Content-Type: text/xml; charset=utf-8" \
-H "SOAPAction:" \
-d @soap.txt -X POST http://someurl
 8
Author: Ahmet Karakaya,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2012-11-20 14:32:52

Jeśli chcesz mieć bardziej puszysty interfejs niż terminal, http://hurl.it / jest super.

 4
Author: oliland,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2010-04-24 12:43:18