質問

Curl コマンド ラインを使用して SOAP を POST し、Web サービスをテストする方法を知っていますか?

すべての 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 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

端末よりもふわふわしたインターフェイスが欲しい場合は、 http://hurl.it/ すごい。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top