Problems with Perl Examples

11 views
Skip to first unread message

trav...@gmail.com

unread,
Mar 10, 2005, 6:30:56 AM3/10/05
to adwor...@googlegroups.com
It would seem to me that if you're going to give examples then you'd at
least make sure they worked, but it seems not. I've taken the first
Perl example, the one for adding a new campaign, and tried to use it.
I've got the latest SOAP::Lite installed (0.65 beta 3) and have made
the obvious fixes to the Google code (like actually adding the use
SOAP::Lite line at the top), but keep getting...

document/literal support is EXPERIMENTAL in SOAP::Lite at
/usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2736.
Type 'Campaign' can't be found in a schema class 'SOAP::Serializer'

I've commented out the two lines that do the language and specific
geotargeting, because I know having it automatically casting to the
correct SOAP types is a likely cause of issues, but that doesn't seem
to be helping any. I've already searched the list, but nobody else has
reported this error.

We have plenty of other SOAP code running on our server, so I know the
environment is setup correctly.

Thoughts anyone?

Bill

unread,
Mar 11, 2005, 2:26:14 PM3/11/05
to adwor...@googlegroups.com
I had similar errors, and so fell back to using SOAP::Lite v0.60a.

I'm getting CustomReports, so I had to make some changes. The perl
examples have this:

my $report = {
'name' => 'test',
'aggregationType' => 'Summary',
'startDate' => '2005-02-15T00:00:00',
'endDate' => '2005-02-15T00:00:00',
'campaigns' => [ 3428923 ],
'customOptions' =>
["AveragePosition","Clicks","Cpc","Impressions"],
};

That needs to change to this:

my $report = {
'name' => 'test',
'aggregationType' => 'Summary',
'startDate' => '2005-02-15T00:00:00',
'endDate' => '2005-02-15T00:00:00',
'campaigns' => SOAP::Data->name(campaigns => qw/3428923/),
'customOptions' => SOAP::Data->name(customOptions =>
qw/AveragePosition Clicks Cpc Impressions/)

Then it'll work.

-B

Bob B.

unread,
Mar 11, 2005, 2:50:32 PM3/11/05
to adwor...@googlegroups.com
I'm using SOAP::Lite 0.60 and everything is working fine. You might
want to not use a beta release in your production code. One other
possibility, when I see stuff like "Type 'Campaign' can't be found ..."
it usually means I forgot to load the service.

Reply all
Reply to author
Forward
0 new messages