Curl 명령 줄을 사용하여 웹 서비스를 테스트하기 위해 POST SOAP) 할 수있는 방법을 알고 있습니까?
모든 비누 메시지가 첨부 된 파일 (soap.xml)이 있는데 제대로 게시 할 수없는 것 같습니다.
감사!
문자열 게시 :
curl -d "String to post" "http://www.example.com/target"
파일 내용 게시 :
curl -d @soap.xml "http://www.example.com/target"
SOAP 1.2 웹 서비스의 경우 일반적으로 사용합니다
curl --header "content-type: application/soap+xml" --data @filetopost.xml http://domain/path
잘못된. 그것은 나를 위해 작동하지 않습니다.
나를 위해 이것은 작동합니다.
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
curl -H "Content-Type: text/xml; charset=utf-8" \
-H "SOAPAction:" \
-d @soap.txt -X POST http://someurl
터미널보다 Fluffier 인터페이스를 원한다면 http://hurl.it/ 이 최고입니다.