Hi,

I've set up the PHP V4 Integration script (http://code.google.com/apis/
base/samples/php/demo.php.txt) and started using it. I previously
added products via the demo pages (http://www.google.com/base/api/demo/
html/demo.html). These products are shown when I run the integration
script on my own server so I know I am connecting successfully and
curl is functioning correctly. However, when I try and add a new
product using the same script on my server I receive an error 400. I
have captured the verbose information of an update:

---------------------------------------------------------------------------------------------------------
* About to connect() to www.google.com port 80 (#0)
*   Trying 216.239.59.103... * connected
* Connected to www.google.com (216.239.59.103) port 80 (#0)
> POST /base/feeds/items HTTP/1.1
Host: www.google.com
Accept: */*
Content-Type: application/atom+xml
Authorization: AuthSub token="XXXXXXXXXXXXXXXXXX"
X-Google-Key:
key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Content-Length: 893

* The requested URL returned error: 400
* Closing connection #0
---------------------------------------------------------------------------------------------------------

The XML being posted is:

---------------------------------------------------------------------------------------------------------
<?xml version='1.0'?>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:g='http://
base.google.com/ns/1.0'>
    <author>
      <name>Benj</name>
      <email>[email protected]</email>
    </author>
    <category scheme='http://www.google.com/type'
term='googlebase.item'/>
    <title type='text'>He Jingxian's chicken</title>
    <content type='xhtml'>
      <div xmlns='http://www.w3.org/1999/xhtml'>Delectable Sichuan
speciality</div>
    </content>
    <link rel='alternate' type='text/html' href='http://www.host.com/
123456jsh9'/>
    <g:item_type>Recipes</g:item_type>
    <g:cooking_time>30</g:cooking_time>
    <g:main_ingredient>chicken</g:main_ingredient>
    <g:main_ingredient>chili peppers</g:main_ingredient>
    <g:main_ingredient>peanuts</g:main_ingredient>
    <g:spices_used>Szechuan peppercorn</g:spices_used>
    <g:cook_technique>blackened</g:cook_technique>
</entry>
---------------------------------------------------------------------------------------------------------

Any thoughts?
Thanks in advance =)

--

You received this message because you are subscribed to the Google Groups 
"Google Base Data API" 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/google-base-data-api?hl=en.


Reply via email to