BatchJobProcessingError.FILE_FORMAT_ERROR

254 views
Skip to first unread message

Paul

unread,
Apr 18, 2016, 10:52:54 AM4/18/16
to AdWords API Forum
Unfortunately I'm not able to use the AdWords libraries as my PHP software is out of date. Updating will break the rest of te application.
So I have to communicatie with the API myself.

Therefore I'm using BatchJobService.
It works fine when I'm uploading 1 file up to 256k and filling the empty space.
When the changes are bigger and I have to upload more than 1 file, I get an BatchJobProcessingError.FILE_FORMAT_ERROR error.

The upload itself succeeds, I get back an OK status, so it must be AdWords interpretations.

Any idea what can go wrong?
I attached the files.

When I check the files, it seems the split was fine.
xml.zip

Shwetha Vastrad (AdWords API Team)

unread,
Apr 18, 2016, 3:42:57 PM4/18/16
to AdWords API Forum
Hi Paul,

When using incremental uploads with BatchJobService, the input xml should have a format as specified in BatchJobOps.xsd, and you should exchange the uploadUrl of the BatchJob for a resumable upload URL for API versions newer than v201509.

Can you provide BatchJobId so I can look into it? Please use Reply privately to Author when responding. 

Thanks,
Shwetha, AdWords API Team.

Shwetha Vastrad (AdWords API Team)

unread,
Apr 19, 2016, 4:28:31 PM4/19/16
to AdWords API Forum
Hi Paul,

When you are using incremental uploads to upload operations to the BatchJob, there is one additional step you need to do before uploading the XML files containing the batch operations. You need to get the resumable Url by sending a request to the uploadUrl that meets the following specifications:
  • Request method:     POST
  • URL:     Upload URL returned by BatchJobService.mutate
  • Content-Type HTTP header:     application/xml
  • Content-Length HTTP header:     0
  • x-goog-resumable HTTP header:     start
  • Request body: no request body required
If the request is successful, the response returned will have a Location Header whose value is the resumable upload URL. You need to upload the XML files containing the batch operations to this URL. 

More information on working with incremental uploads for batch processing can be found here.

Can you confirm that you are following these steps and getting the error when trying to upload the files to the resumable upload URL?

Thanks,
Shwetha, AdWords API Team

Paul

unread,
Apr 20, 2016, 3:03:26 AM4/20/16
to AdWords API Forum
Hi Shwetha,

Yes I can confirm i followed this steps, I'll send you a private response with the url's and Id's used.
Reply all
Reply to author
Forward
0 new messages