Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any New-WebServiceProxy alternative?

I'm trying to consume a SOAP web service at PowerShell 6. I used to do this task with the New-WebServiceProxy command on early versions but no longer exists on PowerShell 6. Is there any similar command?

like image 458
Cristian Fernando Santos Avatar asked Jul 25 '18 15:07

Cristian Fernando Santos


1 Answers

I'm using currently PowerShell 7 and the lack of New-WebServiceProxy affect me in several Scripts that was running with this CmdLet as expected in PS 5.1.

As 'danno' answered before, Invoke-WebRequest is the natural option in Core editions.

Googling I found two sites with examples to implement a workaround for SOAP Web Services:

https://www.itprotoday.com/powershell/getting-started-soap-based-web-services-and-powershell

... and ...

https://www.powershellbros.com/send-soap-message-powershell/

Maybe someone says it that this is go back, but really works!

like image 123
Alfredo Guillén Avatar answered Oct 21 '22 12:10

Alfredo Guillén