Hi, The namespace should be "https://adwords.google.com/api/adwords/v13", even when the request is made to the sandbox endpoint.
Best, - Eric Koleda, AdWords API Team On Jan 12, 4:59 pm, adword user <[email protected]> wrote: > Hello, > I am trying to get reports using v13 api. > > $soapHeaders = '<email>'.$email.'</email>' > > .'<password>'.$password.'</password>' > > .'<useragent>'.$useragent.'</useragent>' > > .'<developerToken>'.$developer_token.'</developerToken>' > > .'<applicationToken>'.$application_token.'</applicationToken>'; > > $xmlvar = new SoapVar($soapHeaders, > > XSD_ANYXML > > ); > > $namespace = 'https://sandbox.google.com/api/adwords/v13'; > > $endpoint = 'https://sandbox.google.com/api/adwords/v13/ReportService?wsdl'; > > $client = new SoapClient($endpoint, array( > > 'features' => SOAP_SINGLE_ELEMENT_ARRAYS, > > 'encoding' => 'utf-8')); > > $header = new SoapHeader($namespace, 'Header', $xmlvar); > > $client->__setSoapHeaders($header); > > try { > $reports = $client->getAllJobs(); > $id = $reports->getAllJobsReturn[1]->id; > > echo $id; > > $response = $client->getGzipReportDownloadUrl($id); > > var_dump($response); > > } > > catch (Exception $ex) > > { > > echo $ex->getMessage(); > > } > > I get the error. > > The request xml was invalid. > > What am i doing wrong? -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en
