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-competitor-analysis.html 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 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
