107

https://sandbox.mediamind.com/Eyeblaster.MediaMind.API/V2/AuthenticationService.svc?wsdlへの SOAP Web サービス呼び出しを行い、パラメーターを渡すときに ClientLogin 操作を使用する必要があります: ApplicationKey、Password、および UserName . 応答は UserSecurityToken です。それらはすべて文字列です。

私がやろうとしていることを完全に説明するリンクは次のとおりです: https://sandbox.mediamind.com/Eyeblaster.MediaMind.API.Doc/?v=3

コマンドラインでこれを行うにはどうすればよいですか? (Windows および/または Linux が役立ちます)

4

8 に答える 8

165

これは、標準の通常の SOAP Web サービスです。SSH はここでは何もしません。(ワンライナー)で呼び出しました:

$ 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>

は試しましたか?

続きを読む

于 2012-08-31T21:35:15.123 に答える
26

Linux コマンド ラインでは、次のコマンドを実行するだけです。

curl -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:"  -d @your_soap_request.xml -X POST https://ws.paymentech.net/PaymentechGateway
于 2013-11-22T07:44:46.520 に答える
3

PowerShell の代替手段を探している Windows ユーザーには、こちら (POST を使用) があります。読みやすくするために、複数の行に分割しました。

$url = 'https://sandbox.mediamind.com/Eyeblaster.MediaMind.API/V2/AuthenticationService.svc'
$headers = @{
    'Content-Type' = 'text/xml';
    'SOAPAction' = 'http://api.eyeblaster.com/IAuthenticationService/ClientLogin'
}
$envelope = @'
    <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
        <Body>
            <yourEnvelopeContentsHere/>
        </Body>
    </Envelope>
'@     # <--- This line must not be indented

Invoke-WebRequest -Uri $url -Headers $headers -Method POST -Body $envelope
于 2018-11-21T14:19:24.367 に答える
2

Windows の場合:

以下を MSFT.vbs として保存します。

set SOAPClient = createobject("MSSOAP.SOAPClient")
SOAPClient.mssoapinit "https://sandbox.mediamind.com/Eyeblaster.MediaMind.API/V2/AuthenticationService.svc?wsdl"
WScript.Echo "MSFT = " & SOAPClient.GetQuote("MSFT")

次に、コマンド プロンプトから次を実行します。

C:\>MSFT.vbs

参照: http://blogs.msdn.com/b/bgroth/archive/2004/10/21/246155.aspx

于 2012-08-31T21:35:46.880 に答える