Export (0) Print
Expand All

Create Master Data Manager Web Service Proxy Classes

The Master Data Manager web service lets you make programmatic use of the features of Master Data Services from any computer that can access your Master Data Manager web site. Before you can start writing code to access the web service, you must generate proxy classes. The main proxy class you use to perform web service operations is the Microsoft.MasterDataServices.ServiceClient class, which implements the Microsoft.MasterDataServices.IService interface.

Before you can generate proxy classes, you must enable web service metadata publishing. Follow these steps to do this:

  1. Open the Master Data Services Web.config file in a text editor. This file is in the WebApplication folder of the Master Data Services installation path.

  2. Find the mdsWsHttpBehavior section under <serviceBehaviors>. For the <serviceMetadata> element, set httpGetEnabled to true.

    Note Note

    If you want to enable Web services over Secure Sockets Layer (SSL), set httpsGetEnabled to true in the mdsWsHttpBehavior section of the web.config file. You also need to change mdsWsHTTPBinding so that it is configured for SSL, as well, and comment out the non-SSL section.

  3. Save changes to the file.

  4. Test metadata publishing by browsing to the service URL, for example: http://yourserver/MDS/service/service.svc. If metadata publishing is enabled, a page is displayed that begins with “You have created a service.”

If you have Visual Studio 2010 installed, the simplest way to generate proxy classes is to add a Service Reference to your project. The address of the service reference is the URL of the Master Data Manager web application, appended with /service/service.svc. For example: http://yourserver/MDS/service/service.svc. For more information, see How to: Add, Update, or Remove a Service Reference.

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 create a set of C# proxy classes 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 Manager.

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

  • proxy_name is the name for the generated proxy file.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft