PowerShell New-WebServiceProxy fails to instantiate Clickatell SOAP WebService

When trying to use the Clickatell SOAP WebService via “http://api.clickatell.com/soap/webservice.php?WSDL” you receive a “FileNotFoundException” exception:

 $ws = New-WebServiceProxy -Uri 'http://api.clickatell.com/soap/webservice.php?WSDL' -Namespace sms -Class sms;
New-WebServiceProxy : Could not load file or assembly 'file:///%TEMP%\asqe3oyx.dll' or one of its dependencies. The system cannot find the file specified.
At line:1 char:7
+ $ws = New-WebServiceProxy -Uri 'http://api.clickatell.com/soap/webservice.php?WS ...
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [New-WebServiceProxy], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.NewWebServiceProxy

You effectively have to use the workaround described in the manual by calling the web service under this address: ‘http://api.clickatell.com/soap/webservice_vs.php?WSDL’. The reason behind it seems to be use of a conflicting attribute named ‘callback’.

Trackbacks

  1. […] time ago I mentioned an error and a possible workaround when using PowerShell with the Clickatell SOAP interface. As Clickatell now provides a REST based interface I thought it is time to quickly show you how to […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: