Problems with add_campaign.pl

5 views
Skip to first unread message

louhic...@gmail.com

unread,
Apr 22, 2009, 5:51:35 PM4/22/09
to AdWords API Forum
Hi all;
I'm using active perl on windows,
I read the tuto on the site of adwords, to create a new campaign on
sandbox env.
My code :

my $campaign = {
'name' => 'SampleCampaignV1',
'budgetAmount' => 100000,
'budgetPeriod' => 'Daily',
'budgetOptimizerSettings' => 100,
'geoTargeting' => {'countryTargets' => {'countries' => ['US']}},
'languageTargeting' => {'languages' => ['en']},
'schedule' => $schedule
};

# Add campaign.
$campaign = $service->addCampaign($campaign, @headers);


But i have this error :



<faultstring>org.xml.sax.SAXException: No deserializer defined for
array type {http://www.w3.org/1999/XMLSchema}ur-type</faultstring>

I dont understant it,
Could someone help me plz

Th x

AdWords API Advisor

unread,
Apr 23, 2009, 3:01:16 PM4/23/09
to AdWords API Forum
Hello,

Off the top of my head I'd say that the problem is the

'budgetOptimizerSettings' => 100,

line. If you're going to specify a budgetOptimizerSettings key, then I
believe the value should be a hash reference whose keys and values
correspond to the settings in

http://code.google.com/apis/adwords/docs/developer/BudgetOptimizerSettings.html

Of course, you could just leave out budgetOptimizerSettings entirely,
which is what the original sample code does.

Cheers,
-Jeff Posnick, AdWords API Team


On Apr 22, 5:51 pm, "louhichi.z...@gmail.com"

louhic...@gmail.com

unread,
Apr 23, 2009, 5:11:00 PM4/23/09
to AdWords API Forum
Hello
Thank you for ur answer
but i deleted the budgetOptimizerSettings, and it works :)


Zied
Reply all
Reply to author
Forward
0 new messages