I'm trying to use the PowerShell command New-WebServiceProxy to create a connection to a WCF Service.
I've got the WCF Services up and running (and working from C# code), but the following PowerShell code fails:
PS C:\>$uri = "http://localhost/Person.svc?wsdl"
PS C:\>$client = New-WebServiceProxy -Uri $uri
New-WebServiceProxy : Exception has been thrown by the target of an invocation
At line:1 char:30
+ $client = New-WebServiceProxy <<<< -Uri $uri
+ CategoryInfo : NotSpecified: (:) [New-WebServiceProxy], TargetInvocationException
+ FullyQualifiedErrorId : System.Reflection.TargetInvocationException,Microsoft.PowerShell.Commands.NewWebServiceProxy
What could be the problem here?
Edit; Don't know if it is relevant, but the Services uses some custom SOAP headers for credentials.