你们知道如何使用Curl命令行向Web服务测试POST SOAP吗?
我有一个文件(soap.xml),其中附有所有的SOAP消息,但我似乎无法正确地发布它。
谢谢!
你们知道如何使用Curl命令行向Web服务测试POST SOAP吗?
我有一个文件(soap.xml),其中附有所有的SOAP消息,但我似乎无法正确地发布它。
谢谢!
发送字符串:
curl -d "String to post" "http://www.example.com/target"
发布文件的内容:
curl -d @soap.xml "http://www.example.com/target"
我通常使用以下代码来访问SOAP 1.2 Web服务:
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
д»Јз Ғ
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:usa="" rel = "nofollow noreferrer">http://www.xyz.com/SAFSubscriberProvision/">
soapenv:Header/
soapenv:Body
<saf:SubscriberID MSISDN="254727849628"/>
</soapenv:Body>
</soapenv:Envelope> д»Јз Ғ
- bernie-d @soap.txt
参数提供了你想要的。 - Ahmet Karakaya
; action=http://tempuri.org/WhateverAction
。 - Egor Tensin