views:

169

answers:

2

I'd like to access a web service with a given (simple) WSDL from within windows powershell.

Is there an easy way to do this?

+2  A: 

One way would be to use WSDL.exe to generate wrapper classes - compile the generated source and use the strongly typed classes from PowerShell. The whole generate - compile - instantiate process can be easily done automatically from PowerShell.

If you are using PowerShell 2.0, use New-WebServiceProxy as suggested in the other answer.

driis
+7  A: 

If you are using Powershell v2.0 the easiest way is with the New-WebserviceProxy. You can read about it here: Call Webservice from powershell. If you are not using v2.0 you can use this technique: Calling a Webservice from powershell (v1.0).

GrayWizardx