Adwords API BatchJobService returns FILE_FORMAT_ERROR

77 views
Skip to first unread message

Dexter N

unread,
Feb 7, 2017, 1:31:52 PM2/7/17
to AdWords API Forum
Hi,

I have an issue regards to BatchJobService.

here is my following that i send but it returns as FILE_FORMAT_ERROR

(
    [headers] => Array
        (
            [Content-Type] => application/xml
            [Content-Length] => 803
            [Content-Range] => bytes 0-802/803
        )

    [body] => <?xml version="1.0" encoding="UTF-8"?>
<ns1:mutate xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201605"><operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:AdGroupOperation"><operand xsi:type="ns1:AdGroup"><id>-1</id><campaignId>749463505</campaignId><name>Birthday Template</name><biddingStrategyConfiguration xsi:type="ns1:BiddingStrategyConfiguration"><biddingStrategyType>MANUAL_CPC</biddingStrategyType><biddingStrategySource>CAMPAIGN</biddingStrategySource><bids xsi:type="ns1:CpcBid"><bid xsi:type="ns1:Money"><microAmount>3000000</microAmount><ComparableValueType>Money</ComparableValueType></bid><cpcBidSource>ADGROUP</cpcBidSource><BidsType>CpcBid</BidsType></bids></biddingStrategyConfiguration></operand><operator>ADD</operator></operations></ns1:mutate>
    [length] => 803
)

Batch Job Id is 443127757

Shwetha Vastrad (AdWords API Team)

unread,
Feb 7, 2017, 4:00:19 PM2/7/17
to AdWords API Forum
Hi Dexter,

When performing incremental uploads of BatchJob operations, the request body must be a multiple of 256K (262144) bytes. If the XML which contains the operations is smaller than 256K, it should be padded to 262144 bytes. Could you try this out and let me know if your BatchJobs are successful? The AddCompleteCampaignsUsingBatchJob Java example demonstrates how to use BatchJobService. Code samples in other languages are provided here

Regards,
Shwetha, AdWords API Team.

shweta.so...@gmail.com

unread,
Nov 30, 2018, 6:20:12 AM11/30/18
to AdWords API and Google Ads API Forum
Hi Shwetha,

I am facing the same issue with BatchJobService. I am using batch job service for Feed Creation and it is throwing me an error saying "FILE_FORMAT_ERROR". Even I am not able to print the SOAP logs. Following is the property I am using for logging the SOAP requests and responses:

log4j.category.com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger=INFO, CONSOLE
log4j.category.com.google.api.ads.adwords.lib.client.AdWordsServiceClient.requestInfoLogger=INFO, CONSOLE
log4j.category.com.google.api.ads.adwords.lib.utils.report_download=INFO, CONSOLE
log4j.category.com.google.api.ads.adwords.lib.utils.batch_job=INFO, CONSOLE 

My Batch Job Id is 919715814.


Regards,
Shweta


Teja Makani

unread,
Nov 30, 2018, 11:56:10 AM11/30/18
to AdWords API and Google Ads API Forum
Hello Swetha,

The FILE_FORMAT_ERROR occurs when the entire batch upload request is not formed correctly or does not meet the upload requirements listed here. Looks like there is another thread going on for enabling SOAP logs. To avoid confusion please followup on that thread and try to enable SOAP logging. Please do verify the input file and share the SOAP logs if you are still facing an issue. While sharing the details you could use reply privately to the author option.

Regards,
Sai Teja, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages