Skip Menu |

This queue is for tickets about the Yahoo-Marketing CPAN distribution.

Report information
The Basics
Id: 25346
Status: resolved
Priority: 0/
Queue: Yahoo-Marketing

People
Owner: JLAVALLEE [...] cpan.org
Requestors: tcadell [...] clicktracks.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: BasicReportRequest reportType is undefined
Date: Thu, 8 Mar 2007 14:46:24 -0800
To: <bug-Yahoo-Marketing [...] rt.cpan.org>
From: "Tim Cadell" <tcadell [...] clicktracks.com>
Yahoo-Marketing-0.09 Perl v5.8.7 Linux pilsner 2.6.12-9-386 #1 Mon Oct 10 13:14:36 BST 2005 i686 GNU/Linux SOAP::Lite version 0.67 I'm using the latest version of the Perl Yahoo::Marketing libraries available on CPAN (0.09) and I'm having no real problems with anything except the BasicReportRequest. I'm calling it with startDate, endDate, reportName and reportType set. my($self, %data) = @_; my $request = Yahoo::Marketing::BasicReportRequest->new; foreach my $key (keys %data) { $request->$key($data{$key}); } my $requestId = $self->processFunction('addReportRequestForAccountID', accountID => $self->{accountId}, reportRequest => $request); Here is the actual XML (use SOAP::Lite +trace) request: <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ysm="https://global.marketing.ews.yahooapis.com/services" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><wsse:Se curity xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext"><wsse:UsernameToke n soapenc:arrayType="xsd:string[2]" xsi:type="soapenc:Array"><wsse:Username xsi:type="xsd:string">clicktrack</wsse:Username><wsse:Password xsi:type="xsd:string">PASSWORD</wsse:Password></wsse:UsernameToken></wsse:Se Show quoted text
xsi:type="xsd:string">ProductionKey4994.</license><masterAccountID xmlns="https://global.marketing.ews.yahooapis.com/services" xsi:type="xsd:string">184904</masterAccountID><onBehalfOfUsername xmlns="https://global.marketing.ews.yahooapis.com/services" xsi:type="xsd:string">clicktrack</onBehalfOfUsername><onBehalfOfPassword xmlns="https://global.marketing.ews.yahooapis.com/services" xsi:type="xsd:string">PASSWORD</onBehalfOfPassword></soap:Header><soap:Body> <addReportRequestForAccountID xmlns="https://global.marketing.ews.yahooapis.com/services"><accountID xsi:type="xsd:string">6776483620</accountID><reportRequest xsi:type="tns:BasicReportRequest"><endDate xsi:type="xsd:dateTime">2007-03-06T20:17:31Z</endDate><reportName xsi:type="xsd:string">Studebaker Keyword Report</reportName><reportType xsi:type="tns:BasicReportType">KeywordSummary</reportType><startDate xsi:type="xsd:dateTime">2007-03-06T20:17:31Z</startDate></reportRequest></ad Show quoted text
dReportRequestForAccountID></soap:Body></soap:Envelope>
You'll note that the reportType is defined, but that the namespace isn't defined anywhere else (tns:BasicReportType). The fault returned is that reportType is required and undefined (error E1011). Tim Cadell ClickTracks Analytics, Inc. Senior Unix Engineer (831) 621-6384

Message body is not shown because it is too large.

RT-Send-CC: jeff [...] zeroclue.com
Hi, are you able to provide some example code that reproduces the error? On Thu Mar 08 17:46:33 2007, tcadell@clicktracks.com wrote: Show quoted text
> Yahoo-Marketing-0.09 > > Perl v5.8.7 > > Linux pilsner 2.6.12-9-386 #1 Mon Oct 10 13:14:36 BST 2005 i686 GNU/Linux > > SOAP::Lite version 0.67 > > > > I'm using the latest version of the Perl Yahoo::Marketing > > libraries available on CPAN (0.09) and I'm having no real problems with > > anything except the BasicReportRequest. I'm calling it with startDate, > > endDate, reportName and reportType set. > > > > my($self, %data) = @_; > > > > my $request = Yahoo::Marketing::BasicReportRequest->new; > > foreach my $key (keys %data) { > > $request->$key($data{$key}); > > } > > my $requestId = $self->processFunction('addReportRequestForAccountID', > > accountID => $self->{accountId}, reportRequest => $request); > > > > > > > > Here is the actual XML (use SOAP::Lite +trace) request: > > > > > > > > <?xml version="1.0" encoding="UTF-8"?><soap:Envelope > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > > xmlns:ysm="https://global.marketing.ews.yahooapis.com/services" > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > > soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > >
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><wsse:Se Show quoted text
> > curity > >
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext"><wsse:UsernameToke Show quoted text
> > n soapenc:arrayType="xsd:string[2]"
xsi:type="soapenc:Array"><wsse:Username Show quoted text
> > xsi:type="xsd:string">clicktrack</wsse:Username><wsse:Password > >
xsi:type="xsd:string">PASSWORD</wsse:Password></wsse:UsernameToken></wsse:Se Show quoted text
>
> curity><license
xmlns="https://global.marketing.ews.yahooapis.com/services" Show quoted text
> > xsi:type="xsd:string">ProductionKey4994.</license><masterAccountID > > xmlns="https://global.marketing.ews.yahooapis.com/services" > > xsi:type="xsd:string">184904</masterAccountID><onBehalfOfUsername > > xmlns="https://global.marketing.ews.yahooapis.com/services" > > xsi:type="xsd:string">clicktrack</onBehalfOfUsername><onBehalfOfPassword > > xmlns="https://global.marketing.ews.yahooapis.com/services" > >
xsi:type="xsd:string">PASSWORD</onBehalfOfPassword></soap:Header><soap:Body> Show quoted text
> > <addReportRequestForAccountID > > xmlns="https://global.marketing.ews.yahooapis.com/services"><accountID > > xsi:type="xsd:string">6776483620</accountID><reportRequest > > xsi:type="tns:BasicReportRequest"><endDate > > xsi:type="xsd:dateTime">2007-03-06T20:17:31Z</endDate><reportName > > xsi:type="xsd:string">Studebaker Keyword Report</reportName><reportType > > xsi:type="tns:BasicReportType">KeywordSummary</reportType><startDate > >
xsi:type="xsd:dateTime">2007-03-06T20:17:31Z</startDate></reportRequest></ad Show quoted text
>
> dReportRequestForAccountID></soap:Body></soap:Envelope>
> > > > > > > > You'll note that the reportType is defined, but that the namespace isn't > > defined anywhere else (tns:BasicReportType). The fault returned is that > > reportType is required and undefined (error E1011). > > > > Tim Cadell > > ClickTracks Analytics, Inc. > > Senior Unix Engineer > > (831) 621-6384 > > >
RT-Send-CC: tcadell [...] gmail.com, jeff [...] zeroclue.com
Hi, the attached script is very close to what you're doing, and produces the expected results against the sandbox. See the attached output file (SOAP requests reformatted for readability).
#!/usr/local/bin/perl use strict; use warnings; use Data::Dumper; use Yahoo::Marketing::BasicReportRequest; use Yahoo::Marketing::BasicReportService; use SOAP::Lite +trace => 'debug'; my $report_service = Yahoo::Marketing::BasicReportService->new->parse_config( section => 'sandbox' ); my $account_id = $report_service->account; sub get_report { my %data = @_; my $request = Yahoo::Marketing::BasicReportRequest->new; foreach my $key (keys %data) { $request->$key($data{$key}); } return $report_service->addReportRequestForAccountID( accountID => $account_id, reportRequest => $request ); } my $start_date = DateTime->now; $start_date->subtract( days => 7 ); my $end_date = DateTime->now; my $report_id = get_report( startDate => $start_date, endDate => $end_date, reportType => 'KeywordSummary', reportName => 'Some Keyword Report', ); print "\n\nGot report ID: $report_id\n";
Download test_basic_report_service.out
application/octet-stream 3.4k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #25346] BasicReportRequest reportType is undefined
Date: Thu, 15 Mar 2007 19:58:55 -0700
To: bug-Yahoo-Marketing [...] rt.cpan.org
From: "Tim Cadell" <tcadell [...] gmail.com>
Thanks, I'll try it and see what the difference is. Maybe I've got other problems with SOAP or something. I'll let you know. Tim On 3/15/07, Jeff Lavallee via RT <bug-Yahoo-Marketing@rt.cpan.org> wrote: Show quoted text
> > > <URL: http://rt.cpan.org/Ticket/Display.html?id=25346 > > > > Hi, the attached script is very close to what you're doing, and produces > the expected results against the sandbox. See the attached output file > (SOAP requests reformatted for readability). > > > > #!/usr/local/bin/perl > > use strict; use warnings; > > use Data::Dumper; > use Yahoo::Marketing::BasicReportRequest; > use Yahoo::Marketing::BasicReportService; > use SOAP::Lite +trace => 'debug'; > > my $report_service = > Yahoo::Marketing::BasicReportService->new->parse_config( section => > 'sandbox' ); > my $account_id = $report_service->account; > > sub get_report { > my %data = @_; > > my $request = Yahoo::Marketing::BasicReportRequest->new; > > foreach my $key (keys %data) { > $request->$key($data{$key}); > } > > return $report_service->addReportRequestForAccountID( > accountID => $account_id, reportRequest => $request > ); > } > > > > my $start_date = DateTime->now; > $start_date->subtract( days => 7 ); > my $end_date = DateTime->now; > > my $report_id = get_report( > startDate => $start_date, > endDate => $end_date, > reportType => 'KeywordSummary', > reportName => 'Some Keyword Report', > ); > > print "\n\nGot report ID: $report_id\n"; > > >
-- Tim Cadell A good friend will come and bail you out of jail... but, a true friend will be sitting next to you saying, Damn...that was fun !
Problem was due to incorrect URI setting