Quantcast
Channel: SQL Server Master Data Services forum
Viewing all articles
Browse latest Browse all 1311

Powershell New-WebServiceProxy fails for MDS Web Service

$
0
0

It looks like the WSDL generated for the MDS web service is not valid. If you run the following in Powershell it fails:

PS > $svc = New-WebServiceProxy –Uri 'http://localhost/MDS/service/service.svc?wsdl'

New-WebServiceProxy : Exception has been thrown by the target of an invocation.
At line:1 char:8
+ $svc = New-WebServiceProxy –Uri 'http://lonw00053482/MDS/service/service.svc?wsd ...
+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-WebServiceProxy], TargetInvocationException
    + FullyQualifiedErrorId : System.Reflection.TargetInvocationException,Microsoft.PowerShell.Commands.NewWebServiceProxy

PS > $Error[0].Exception.InnerException.ToString()

System.InvalidOperationException: Method Service.SecurityPrincipalsClone can not be reflected. ---> System.InvalidOperationException: The XML element 'SecurityPrincipalsRequest' from namespace 'http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09' references a method and a type. Change the method's message name using WebMethodAttribute or change the type's root element using the XmlRootAttribute.

I can probably manually generate a proxy assembly but it would be far easier if anyone knows a workaround for this.


James


Viewing all articles
Browse latest Browse all 1311

Trending Articles