Share via


Generating the Web Service Proxy (Master Data Services)

You can use a proxy class to access Master Data Services programmatically through the Web service. There are two ways to add a proxy class to your development project: by using the Svcutil.exe command-line tool in the .NET Framework, or by adding a Web reference in Microsoft Visual Studio.

Adding the proxy by using Svcutil.exe

You must have either Microsoft Visual Studio or the Microsoft Windows SDK installed in order to have Svcutil.exe on your computer. If you use Visual Studio, you must use the Visual Studio command prompt to run the command. For more information, see ServiceModel Metadata Utility Tool (Svcutil.exe) and Generating a WCF Client from Service Metadata.

To add the proxy class by using Svcutil.exe, use a command such as the following:

svcutil.exe http://<server_name:port>/<virtual_path>/Service/Service.svc 
/out:<proxy_name>.cs /messageContract /tcv:Version35 
/noconfig /ct:System.Collections.ObjectModel.Collection`1 
/namespace:*,Microsoft.MasterDataServices

Where:

  • servername:port are the computer name and port number of the computer that hosts Master Data Services.

  • virtual_path is the virtual path of Master Data Services in Internet Information Services (IIS).

  • proxy_name is the C# class name for the generated proxy.

Adding the proxy by using a Web reference

You can also add a proxy by providing a Web reference in a Visual Studio project. For more information, see How to: Add and Remove Web References.