CampaignTargetService SOAP error while adding GeoTargetList

9 views
Skip to first unread message

NS

unread,
Mar 31, 2010, 1:58:29 PM3/31/10
to AdWords API Forum
Hello Everyone,

I am very new to the adwords API and we are using ruby client library
(adwords4r 18.0.0).


I updated the gem adword4r to 18.0.0 version yesterday and tried to
update the geotargetting countries in the campaign and I am getting
following SOAP error.


SOAP Error: Unmarshalling Error: Unable to create an instance of
com.google.ads.api.services.campaignmgmt.campaigntarget.v200909.jaxbgen.Geo­
Target
(code: 0)

Here is the code

@campaign_target_srv = @adwords.get_service('CampaignTarget',
latest)

geo_target_list = @campaign_target_srv.module::GeoTargetList.new
geo_target_list.campaignId = @campaign.api_identifier
geo_target_list.targets = []

geo_countries = []
if @params['geotarget_countries']
@params['geotarget_countries'].each do |country|
geo_target_country =
@campaign_target_srv.module::CountryTarget.new
geo_target_country.excluded = false
geo_target_country.countryCode = country
geo_countries << geo_target_country
end
end

geo_target_list.targets << geo_countries if geo_countries.length
> 0

geo_operation =
@campaign_target_srv.module::CampaignTargetOperation.new
geo_operation.operand = geo_target_list
geo_operation.operator = operator

response = @campaign_target_srv.mutate(geo_operation)


Any help would be highly appreciated.


Thanks,
NS


AdWords API Advisor

unread,
Apr 1, 2010, 10:08:27 AM4/1/10
to AdWords API Forum
Hi,

Please see your existing thread for more information:

http://groups.google.com/group/adwords-api/browse_thread/thread/8951605fbbb1a089/

Best,
- Eric Koleda, AdWords API Team

Reply all
Reply to author
Forward
0 new messages