Hello everyone,

I'm migrating from MutateJobService to BatchJobService and to get started 
am experimenting with a test account and a script derived 
from v201601\CampaignManagement\AddKeywordsUsingIncrementalBatchJob.php

I can add batches of *Keywords* and *Negative Keywords* no problem.

However when I attempt to add a batch of TextAds I'm being returned the 
following error, which would indicate an issue with the input file 
<https://developers.google.com/adwords/api/docs/reference/v201601/BatchJobService.BatchJobProcessingError#trigger>
.

Processing error [0]: errorType=BatchJobProcessingError, trigger=, 
errorString=BatchJobProcessingError.FILE_FORMAT_ERROR, fieldPath=, reason=
FILE_FORMAT_ERROR

I'm building my TextAd in the usual fashion, see below, *but I don't know 
what I'm doing to disturb the file formatting*.

Any help would be appreciated.

Many thanks

   $textAd = new TextAd();
   $textAd->headline = 'Cruise #' . uniqid();
   $textAd->description1 = 'Visit the Red Planet in style.';
   $textAd->description2 = 'Low-gravity fun for everyone!';
   $textAd->displayUrl = 'www.example.com';
   $textAd->finalUrls = array('http://www.example.com');
   // Create ad group ad.
   $adGroupAd = new AdGroupAd();
   $adGroupAd->adGroupId = $adGroupId;
   $adGroupAd->ad = $textAd;
   // Set additional settings (optional).
   $adGroupAd->status = 'ENABLED';

// Create AdGroupCriterionOperation.
$operation = new AdGroupCriterionOperation();
$operation->operand = $adGroupAd;
$operation->operator = 'ADD';

Here is the soap log:

[Apr 08 2016 12:45:14.000000 - INFO] POST 
/api/adwords/cm/v201601/BatchJobService HTTP/1.1
Host: adwords.google.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.5.12
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 682
Authorization: Bearer 
ya29..vgI82mE2oDDj7y-BTMRqJ7BObPQgr4Ij5LEEJSwT60gHzTyHIwRZAetY

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201601";>
  <SOAP-ENV:Header>
    <ns1:RequestHeader>
      <ns1:clientCustomerId>4702283134</ns1:clientCustomerId>
      <ns1:developerToken>VoKD8l67LEE-vCKnep03Zg</ns1:developerToken>
      <ns1:userAgent>FBT AdwordsLongtail Application (AwApi-PHP/8.2.1, 
Common-PHP/8.2.1, PHP/5.5.12)</ns1:userAgent>
      <ns1:partialFailure>true</ns1:partialFailure>
    </ns1:RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:mutate>
      <ns1:operations>
        <ns1:operator>ADD</ns1:operator>
        <ns1:operand/>
      </ns1:operations>
    </ns1:mutate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Date: Fri, 08 Apr 2016 10:45:09 GMT
Expires: Fri, 08 Apr 2016 10:45:09 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Accept-Ranges: none
Vary: Accept-Encoding
Transfer-Encoding: chunked

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Header>
    <ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201601";>
      <requestId>00052ff6e38ae4400a0dffc5a80b783f</requestId>
      <serviceName>BatchJobService</serviceName>
      <methodName>mutate</methodName>
      <operations>1</operations>
      <responseTime>314</responseTime>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <mutateResponse 
xmlns="https://adwords.google.com/api/adwords/cm/v201601";>
      <rval>
        <ListReturnValue.Type>BatchJobReturnValue</ListReturnValue.Type>
        <value>
          <id>46829465</id>
          <status>AWAITING_FILE</status>
          <uploadUrl>
            <url>***</url>
            <expiration>20160415 104509 Etc/GMT</expiration>
          </uploadUrl>
          <diskUsageQuotaBalance>1048682</diskUsageQuotaBalance>
        </value>
      </rval>
    </mutateResponse>
  </soap:Body>
</soap:Envelope>

[Apr 08 2016 12:45:36.000000 - INFO] POST 
/api/adwords/cm/v201601/BatchJobService HTTP/1.1
Host: adwords.google.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.5.12
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 925
Authorization: Bearer 
ya29..vgI82mE2oDDj7y-BTMRqJ7BObPQgr4Ij5LEEJSwT60gHzTyHIwRZAetY

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201601";>
  <SOAP-ENV:Header>
    <ns1:RequestHeader>
      <ns1:clientCustomerId>4702283134</ns1:clientCustomerId>
      <ns1:developerToken>VoKD8l67LEE-vCKnep03Zg</ns1:developerToken>
      <ns1:userAgent>FBT AdwordsLongtail Application (AwApi-PHP/8.2.1, 
Common-PHP/8.2.1, PHP/5.5.12)</ns1:userAgent>
      <ns1:partialFailure>true</ns1:partialFailure>
    </ns1:RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:get>
      <ns1:selector>
        <ns1:fields>Id</ns1:fields>
        <ns1:fields>Status</ns1:fields>
        <ns1:fields>DownloadUrl</ns1:fields>
        <ns1:fields>ProcessingErrors</ns1:fields>
        <ns1:fields>ProgressStats</ns1:fields>
        <ns1:predicates>
          <ns1:field>Id</ns1:field>
          <ns1:operator>EQUALS</ns1:operator>
          <ns1:values>46829465</ns1:values>
        </ns1:predicates>
      </ns1:selector>
    </ns1:get>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Date: Fri, 08 Apr 2016 10:45:31 GMT
Expires: Fri, 08 Apr 2016 10:45:31 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Accept-Ranges: none
Vary: Accept-Encoding
Transfer-Encoding: chunked

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Header>
    <ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201601";>
      <requestId>00052ff6e4d025e00ac154b23b0b48f0</requestId>
      <serviceName>BatchJobService</serviceName>
      <methodName>get</methodName>
      <operations>1</operations>
      <responseTime>357</responseTime>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201601";>
      <rval>
        <totalNumEntries>1</totalNumEntries>
        <Page.Type>BatchJobPage</Page.Type>
        <entries>
          <id>46829465</id>
          <status>CANCELED</status>
          <progressStats>
            <numOperationsExecuted>0</numOperationsExecuted>
            <numOperationsSucceeded>0</numOperationsSucceeded>
            <estimatedPercentExecuted>0</estimatedPercentExecuted>
            <numResultsWritten>0</numResultsWritten>
          </progressStats>
          <downloadUrl>
            <url>***</url>
            <expiration>20160508 104515 Etc/GMT</expiration>
          </downloadUrl>
          <processingErrors>
            <fieldPath/>
            <trigger/>
            
<errorString>BatchJobProcessingError.FILE_FORMAT_ERROR</errorString>
            <ApiError.Type>BatchJobProcessingError</ApiError.Type>
            <reason>FILE_FORMAT_ERROR</reason>
          </processingErrors>
        </entries>
      </rval>
    </getResponse>
  </soap:Body>
</soap:Envelope>




-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/11b19c84-5bcf-42ce-b909-938f57915918%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Batch processi... Alan Coleman

Reply via email to