4 messages in com.googlegroups.google-base-data-apiRe: Problem with my API posts
FromSent OnAttachments
Manuel Holtgrewe10 Jul 2007 13:49 
Jeff S12 Jul 2007 10:33 
Manuel Holtgrewe13 Jul 2007 09:21 
P...@09 Aug 2007 06:08 
Subject:Re: Problem with my API posts
From:Jeff S (j.@google.com)
Date:07/12/2007 10:33:39 AM
List:com.googlegroups.google-base-data-api

Hi Manuel,

Since the XML seems to be fine, I suspect there might be a problem with the proxy or the HTTP headers. Are you certain that tcpwatch.py preserves your headers? If this isn't it, the auth header could be the culprit. I once ran into a problem because the auth token from client login ends in a newline and this needs to be stripped off before including it as a header. Could I see the code which parses the token and sends the POST request? I'm guessing the problem may be in one of those two places.

Thank you,

Jeff

On Jul 10, 1:49 pm, Manuel Holtgrewe <zykl@googlemail.com> wrote:

Hi,

I am currently trying to write a Google Base wrapper for Ruby as a part of the google4r (http://google4r.rubyforge.org) project.

However, I am somehow hitting a brick wall: My POSTs fail and Google Base only gives me the following uninformative message:

Oops! There was an error with the page you requested. Please check back later.

My POST request looks as follows:

POST /base/feeds/items HTTP/1.1 X-Google-Key: key=<my google key> Connection: close Accept: */* Content-Type: application/atom+xml Authorization: GoogleLogin auth="<auth key as retrieved by programmatic login>" Content-Length: 1182 Host: 127.0.0.1:8080 # where tcpwatch.py ran

<?xml version='1.0' encoding='UTF-8'?> <entry
xmlns:g='http://base.google.com/ns/1.0'xmlns='http://www.w3.org/2005/Atom'> <id>http://www.example.com/entries/1</id> <title type='text' xmlns='http://www.w3.org/2005/Atom'>First entry!</ title> <updated xmlns='http://www.w3.org/2005/ Atom'>2007-07-10T22:38:39+02:00</updated> <author xmlns='http://www.w3.org/2005/Atom'> <name>John Doe</name> <uri>http://www.example.com</uri> <email>j.@example.com</email> </author> <link href='http://www.example.com/entries/1/de'title='German Translation' hreflang='en' rel='alternate' xmlns='http://www.w3.org/ 2005/Atom'/> <link href='http://www.example.com/entries/2/fr'title='Frensh Translation' hreflang='fr' rel='alternate' xmlns='http://www.w3.org/ 2005/Atom'/> <published xmlns='http://www.w3.org/2005/ Atom'>2007-07-10T22:38:39+02:00</published> <rights type='text' xmlns='http://www.w3.org/2005/Atom'>All mine! Yes, mine alone!</rights> <summary type='html' xmlns='http://www.w3.org/2005/Atom'>The &lt;em&gt;quick&lt;/em&gt; brown fox jumped over the lazy dog!</ summary> <g:item_language>en</g:item_language> <g:item_type>products</g:item_type> </entry>

Sending the same XML through the demo
(here:http://www.google.com/base/api/demo/html/demo.html) works fine.

Can anyone help me with the problem? What could be wrong with my request?

Is there a way to check that the authentication itself works? Changing the API key or Authorization token to obviously wrong values does not affect the result.

It would be great if there was an error console as there is for Google Checkout.

Bests,