Hello Tom and Alex,

thank you for answering.

@Tom
we didn't change the settings. The api connects to www.google.com,
logs in to https://www.google.com/accounts/ClientLogin and posts the
item to http://www.google.com/base/feeds/items?dry-run=true
.
@Alex
the message returned by the api is: "Service not found". I've looked
up some other threads in this forum and changed e.g. the accountType.
Unfortunately, the result stays the same.

tk

On 23 Mrz., 08:50, Alex <[email protected]> wrote:
> The API returns details about the error as part of the response.
> Can you tell what the message returned by the API server is?
>
> The Zend Library seem to not display this information as part of the
> exception.
> In this case, you have two options to get the full response:
> 1) insert manually one entry, exactly as the one you insert programatically,
>
> using the demo page located 
> here:http://www.google.com/base/api/demo/html/demo.html
> and then check what the response is
> 2) debug the Zend library code and figure out what is the body of the
> response.
>
> If you have more information, or  you have a solution,
> please post back so that other developers can benefit from it.
>
> Alex
>
> On Sun, Mar 22, 2009 at 10:51 AM, Tom Wilson <[email protected]
>
>
>
> > wrote:
>
> > What URL are you authenticating against?
>
> > Tom Wilson
> > Freelance Google Base Developer and Consultant
> >www.tomthedeveloper.com
>
> > Google Base Tools -http://dev.tomthedeveloper.com/googlebase
> > Featured Project :
> >http://google-code-featured.blogspot.com/2008/02/google-base-competit...
>
> > On Mar 18, 4:33 pm, tk <[email protected]> wrote:
> > > Hello,
>
> > > we're implementing the google base api into an online shop system (in
> > > php). But now we need some help.
>
> > > We tried both authentication types (ClientAuth and AuthSub). Both are
> > > working. But as we try to insert our articles we get a
> > > Zend_Gdata_App_HttpException. The source code below shows our trials
> > > with the german attributes, but we also tried the given examples in
> > > the ZendFramework manual and the given examples in the manual here in
> > > the google api documentation - always with the same response: A
> > > Zend_Gdata_App_HttpException with the message "Expected response code
> > > 200, got 404".
>
> > > --- sourcecode for the german feed
>
> > > //authentication
> > > $service = Zend_Gdata_Gbase::AUTH_SERVICE_NAME;
> > > $client =  Zend_Gdata_ClientLogin::getHttpClient($username, $password,
> > > $service);
> > > $service = new Zend_Gdata_Gbase($client);
>
> > > //create new item
> > > $new_entry = $service->newItemEntry();
>
> > > $new_entry->title = $service->newTitle(trim($article_values
> > > ['art_name']));
>
> > > $new_entry->content = $service->newContent(trim($article_values
> > > ['long_desc']));
> > > $new_entry->content->type = "text";
>
> > > $new_entry->itemType = "Produkte";
> > > $new_entry->itemType->type = "text";
>
> > > $new_entry->link = array($service->newLink
> > > ($url_to_article,"alternate","text/html"));
>
> > > $new_entry->addGbaseAttribute("target_country","DE","text");
> > > $new_entry->addGbaseAttribute("item_language","de","text");
> > > $new_entry->addGbaseAttribute("id",$article_values['id'],"int");
> > > $new_entry->addGbaseAttribute("menge",$article_values
> > > ['quantity'],"int");
> > > $new_entry->addGbaseAttribute("preis",$article_values
> > > ['price_per_unit']." EUR","floatUnit");
> > > $new_entry->addGbaseAttribute("zustand","neu","text");
>
> > > if ($article_values["weight"]>0) {
>
> > $new_entry->addGbaseAttribute("gewicht",$article_values["weight"]."
> > > g","numberUnit");
>
> > > }
>
> > > if (strlen($article_values["ean"])>0) {
>
> > $new_entry->addGbaseAttribute("ean",$article_values["ean"],"text");
>
> > > }
>
> > > if (strlen($url_to_article_image)>0) {
> > >         $new_entry->addGbaseAttribute("bild_url",$url_to_article,"text");
>
> > > }
>
> > > $created_entry = $service->insertGbaseItem($new_entry, true);
>
> > > --- sourcecode for the german feed
>
> > > At this point the exception, that says "Expected response code 200,
> > > got 404", is thrown.
>
> > > Where is the mistake? Did we forget anything to do?
> > > Any Ideas?
>
> > > Thank you for your response,
> > > tk
>
> --
> Alex Dovlecel, Google Switzerland GmbH
> Company Identifikationsnummer: CH-020.4.028.116-1
--~--~---------~--~----~------------~-------~--~----~
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