How to do a SOAP wsdl web services call from the command line

后端 未结 8 551
失恋的感觉
失恋的感觉 2020-11-30 17:40

I need to make a SOAP webservice call to https://sandbox.mediamind.com/Eyeblaster.MediaMind.API/V2/AuthenticationService.svc?wsdl and to use the operation ClientLogin while

8条回答
  •  长情又很酷
    2020-11-30 18:08

    For Windows users looking for a PowerShell alternative, here it is (using POST). I've split it up onto multiple lines for readability.

    $url = 'https://sandbox.mediamind.com/Eyeblaster.MediaMind.API/V2/AuthenticationService.svc'
    $headers = @{
        'Content-Type' = 'text/xml';
        'SOAPAction' = 'http://api.eyeblaster.com/IAuthenticationService/ClientLogin'
    }
    $envelope = @'
        
            
                
            
        
    '@     # <--- This line must not be indented
    
    Invoke-WebRequest -Uri $url -Headers $headers -Method POST -Body $envelope
    

提交回复
热议问题