Using svcutil.exe with adCenter API V5


A question that has come up a few times in the community as you are working to migrate to V5 involves the use of svcutil.exe

For example, a developer asked: with adCenter API v4 and with other search engine advertising APIs, we used the wsdl.exe tool and the /sharetypes switch in the Windows framework SDKs to produce a C# code file. This file included all the services for a single search engine API in one namespace. We were able to add it to a master library that all our programs access.

We have been trying to figure out how to make this happen with the v5 files and the SvcUtil.exe tool as you suggest in your documentation, any suggestions?

Our senior development lead, Gopal Madhavan, and development engineer Sean Yao, tested the use of svcutil.exe to verify and see if there were any suggestions.

Here is the reply from Sean:

"They can use "svcutil.exe /mc <url>*" to generate API proxies with shared types in one file.

For example:

svcutil.exe /mc https://adcenterapi.microsoft.com/api/advertiser/v5/reporting/reportingservice.svc?wsdl https://adcenterapi.microsoft.com/Api/Advertiser/V5/CampaignManagement/CampaignManagementService.svc?wsdl /out:CampaignAndReporting.cs

The system will show some warnings, but it works fine, according to Sean.

Also, check documentation at Getting Started with the Microsoft adCenter API for more general information about using svcutil.

Thank you for the questions and please let us know if you have more questions on this issue.

-Chris

Comments (3)

  1. chris@wiederspan.com says:

    The problem is that there is one shared type "Currency" that is duplicated with different definitions. Short of manually changing the generated code, this "breaks" the idea of keeping all of the services in one namespace.

  2. Cnorred says:

    Hi Chris,

    Let me follow up with Gopal and Sean to see if there's something they can offer. I'll post more shortly.

  3. Cnorred says:

    I have sent this to the development team, and you are correct. It has been listed as an update request for a future release. Thank you for the feedback. Keep it coming.

    -Chris

Skip to main content