5 messages in com.googlegroups.google-base-data-api[Google-Base-API] Getting batch:inter...
FromSent OnAttachments
Joutsen27 Jul 2008 12:50 
Eric (Google)27 Jul 2008 15:31 
Tom Wilson29 Jul 2008 17:36 
Eric (Google)29 Jul 2008 23:59 
Joutsen30 Jul 2008 15:23 
Subject:[Google-Base-API] Getting batch:interrupted when using long-lived AuthSub tokens
From:Joutsen (bkel@gmail.com)
Date:07/27/2008 12:50:07 PM
List:com.googlegroups.google-base-data-api

I have used single-use AuthSub tokens for months now to upload to Google Base via the API. There have been no problems. Now, I changed my application to use long-lived AuthSub session tokens and it doesn't work.

I am able to acquire a single-use token and convert it to a long-lived token successfully. The problem is that when I use the long-lived token to submit an upload via the Google Base API, I receive the following error:

<?xml version="1.0" encoding="UTF-8" ?> <atom:feed xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:gm="http://base.google.com/ns-metadata/1.0" xmlns:g="http:// base.google.com/ns/1.0" xmlns:batch="http://schemas.google.com/gdata/ batch"> <atom:id>http://www.google.com/base/feeds/items</atom:id> <atom:updated>2008-07-27T19:02:13.722Z</atom:updated> <atom:title type="text">Batch Feed</atom:title> <atom:link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.google.com/base/feeds/ items" /> <atom:link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml" href="http://www.google.com/base/feeds/ items" /> <atom:link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" href="http://www.google.com/base/feeds/ items/batch" /> <atom:entry> <atom:id>http://www.google.com/base/feeds/items/fatal</atom:id> <atom:updated>2008-07-27T19:02:13.723Z</atom:updated> <atom:title type="text">Fatal Error</atom:title> <atom:content type="text">Feed processing was interrupted.</ atom:content> <batch:interrupted reason="The processing instruction target matching "[xX][mM][lL]" is not allowed." parsed="0" success="0" error="0" unprocessed="0" /> </atom:entry> </atom:feed>

When I compare the XML request made to Google Base using a single-use token (which receives a successful response) and the long-lived token (which returns the above error response), the two requests are identical. I used diff to compare the 2 requests, so I know there's not a space, carriage return or encoding difference occurring.

For reference, here is a sample request that returns the above error response:

[START OF FILE] <?xml version="1.0" encoding="UTF-8" ?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:g="http:// base.google.com/ns/1.0" xmlns:batch="http://schemas.google.com/gdata/ batch"> <entry> <app:control xmlns:app="http://purl.org/atom/app#"> <app:draft>yes</app:draft> </app:control> <batch:id>54</batch:id> <batch:operation type="insert" /> <language>EN</language> <author> <name><![CDATA[test]]></name> <email><![CDATA[as@asdf.com]]></email> </author> <category scheme="http://base.google.com/categories/itemtypes" term="Products" /> <title type="text"><![CDATA[test2]]></title> <g:item_type type="text">Products</g:item_type> <g:brand><![CDATA[Generic]]></g:brand> <g:condition><![CDATA[New]]></g:condition> <g:payment_accepted><![CDATA[Visa]]></g:payment_accepted> <g:payment_accepted><![CDATA[MasterCard]]></g:payment_accepted> <g:payment_accepted><![CDATA[Discover]]></g:payment_accepted> <description></description> <g:expiration_date>2008-07-30</g:expiration_date> <g:id>54</g:id> <link rel="alternate" type="text/html" href="http://localhost/ webpshop60/product.wml/storeid/4/source/GBase/productid/54/test/ test2.htm" /> <g:price>103.00</g:price> <g:currency><![CDATA[USD]]></g:currency> <g:product_type><![CDATA[Home Decor]]></g:product_type> </entry> </feed> [END OF FILE]

The only difference between the successful test and the failed one is the use of single-use or long-lived AuthSub tokens.

Can anyone give me a clue as to why there would be such a difference and how to figure out how to successfully upload to Google Base API using long-lived AuthSub tokens?