這是一種標準的普通SOAP Web服務。 SSH在這裏沒有任何關係。我只是curl(一行代碼)把它稱爲:
$ curl -X POST -H "Content-Type: text/xml" \
-H "SOAPAction: \"http://api.eyeblaster.com/IAuthenticationService/ClientLogin\"" \
--data-binary @request.xml \
https://sandbox.mediamind.com/Eyeblaster.MediaMind.API/V2/AuthenticationService.svc
凡request.xml
文件具有以下內容:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.eyeblaster.com/">
<soapenv:Header/>
<soapenv:Body>
<api:ClientLogin>
<api:username>user</api:username>
<api:password>password</api:password>
<api:applicationKey>key</api:applicationKey>
</api:ClientLogin>
</soapenv:Body>
</soapenv:Envelope>
我得到這個美麗的500:
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode>s:Security.Authentication.UserPassIncorrect</faultcode>
<faultstring xml:lang="en-US">The username, password or application key is incorrect.</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>
你試過soapui?
Read more
+1 soapui,一個用於使用基於soap的web服務的非常有用且免費的工具。比使用命令行恕我直言更好。 – fuzzyanalysis
您使用的是哪個版本的捲髮? Mine說:「無法解析主機'--data-binary',並且https是一個」Unsupported protocol「 – Marina
如果我確實做了你所做的,那麼我總是會從mediamind中得到一個錯誤,服務器錯誤發生了。「是否有任何事情你沒有包括在我應該做的答案中(除了用真正的代替un/pw/key)? – Marina