PHP5 + Adwords API: scheduleReportJob = no go!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I tried to simply schedule a report job from ext/soap with the code below...
All it would do is tell me that I'm "missing default constructor." Here lies
the rub - I have to specify the job's xsi:type to "KeywordReportJob" - but
where do I do that in PHP5 ext/soap? (answer does NOT lie in documentation).
Also, if I were to manually do a __doRequest, I realized that the xmlns:xsi
namespace isn't set in the SOAP envelope! Any help?

<?php

$ns = 'https://adwords.google.com/api/adwords/v2';
$headers[] = new SoapHeader($ns, 'email', 'x');
$headers[] = new SoapHeader($ns, 'clientEmail', 'x');
$headers[] = new SoapHeader($ns, 'password', 'x');
$headers[] = new SoapHeader($ns, 'useragent', 'x');
$headers[] = new SoapHeader($ns, 'token', 'x');

$client  = new SoapClient("
https://adwords.google.com/api/adwords/v2/ReportService?wsdl";, array("trace"
=> 1));
$client->__setSoapHeaders($headers);
$client->scheduleReportJob(array("job" => array(
      'startDate' => '2005-04-01',
      'endDate'   => '2005-04-01'
  )));

?>

[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux