Error: Use XML attributes to specify a unique XML name and/or namespace for the type

795 views
Skip to first unread message

Susan

unread,
Nov 25, 2009, 7:34:34 AM11/25/09
to AdWords API Forum, rekha...@gmail.com, vi...@namosolutions.com
I have a issue when I am trying to consume theV2009 AdwordCampaign
Service API in my dot NET application.
I am using production URLs of campaign service in my Application
Production:https://adwords.google.com/api/adwords/cm/v200906/
CampaignService?wsdl
I have added the web reference to my application and named as
"GoogleCampaignServiceV2009"
and tried to create object for the campaign service as below

GoogleCampaignServiceV2009.CampaignService CampService = new
GoogleCampaignServiceV2009.CampaignService();

I am getting an error which i am mentioning below while trying the
same

Types 'System.Web.Services.Protocols.SoapHeader' and
'GoogleCampaignServiceV2009.SoapHeader' both use the XML type name,
'SoapHeader', from namespace 'https://adwords.google.com/api/adwords/
cm/v200909'. Use XML attributes to specify a unique XML name and/or
namespace for the type.

Please look into it and let me know if I am missing anything.

Thanks and regards,
Susan

AdWords API Advisor

unread,
Nov 25, 2009, 4:57:01 PM11/25/09
to AdWords API Forum
Hi Susan,

This is a known issue, and is caused by a name conflict between an
AdWords API class and a native .NET class. In general, it isn't
possible to use Visual Studio Web References with the v2009 API. A
work around has been applied in the AdWords API .NET Client Library
and we recommend developers use it to make calls against the v2009
API.

http://code.google.com/p/google-api-adwords-dotnet/

Best,
- Eric Koleda, AdWords API Team
Reply all
Reply to author
Forward
0 new messages