views:

47

answers:

0

I'm trying to execute a wcf service operation from PowerShell using the following script.

$uri = "http://myserver.com/myservice.svc?wsdl"
$proxy = New-WebServiceProxy -Uri $uri
$proxy.CleanupExpiredTransactions()

However, I am getting the following exception.

Exception calling "CleanupExpiredTransactions" with "0" argument(s):
"Object reference not set to an instance of an object." At :line:5 char:33 + $proxy.CleanupExpiredTransactions <<<< ()

Object[] parameters) at WebServiceProxy.ExportServiceGateway.CleanupExpiredTransactions() at CleanupExpiredTransactions(Object , Object[] ) at System.Management.Automation.MethodInformation.Invoke(Object target, Object[] arguments) at System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object target, Object[] arguments, MethodInformation methodInformation, Object[] originalArguments)

Does anyone have any ideas as to what I'm doing wrong?