I'm trying to use the Zendgdata framework to access a published Google
spreadsheet containing User Names and their locations using Lattitude
and Longitude values to build an on-the-fly Google Map with location
markers:
(My test site is based on coding examples for building a Community
Mapping site which were originally posted by Google's Pamela Fox. URl
link: http://code.google.com/apis/maps/articles/communitymap.html)

When my site's Register-User page try's to access the Zend libraries
as referenced as a includes in this php file:
<?php
ini_set("include_path","e:\WampServer2\bin
\ZendFramework-1.9.2\library");
//ini_set("include_path", ".:/usr/lib/php:/usr/local/lib/php:/home3/
scfruitt/public_html/Zend/library/");
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Spreadsheets');
Zend_Loader::loadClass('Zend_Http_Client');

define("SPREADSHEET_KEY", "tRmabzTc2Jj_Vja4It4gaFg");
define("USER_WORKSHEET_ID", "od6");
define("LOC_WORKSHEET_ID", "od7");

function setupClient() {
  $email = "mrdube...@gmail.com";
  $password = "xxxxnnnn";
  $client = Zend_Gdata_ClientLogin::getHttpClient($email, $password,
          Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME);
  $gdClient = new Zend_Gdata_Spreadsheets($client);
  return $gdClient;
}

function getWkshtListFeed($gdClient, $ssKey, $wkshtId,
$queryString=null) {
  $query = new Zend_Gdata_Spreadsheets_ListQuery();
  $query->setSpreadsheetKey($ssKey);
  $query->setWorksheetId($wkshtId);
  if ($queryString !== null) {
    $query->setSpreadsheetQuery($queryString);
  }
  $listFeed = $gdClient->getListFeed($query);
  return $listFeed;
}

function printFeed($feed)
{
  print "printing feed";
  $i = 0;
  foreach($feed->entries as $entry) {
      if ($entry instanceof Zend_Gdata_Spreadsheets_CellEntry) {
         print $entry->title->text .' '. $entry->content->text . "\n";
      } else if ($entry instanceof Zend_Gdata_Spreadsheets_ListEntry)
{
         print $i .' '. $entry->title->text .' '. $entry->content-
>text . "\n";
      } else {
         print $i .' '. $entry->title->text . "\n";
      }
      $i++;
  }
}

?>

I receive the follow reponse:

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with
message 'Expected response code 200, got 400 Parse error: Encountered
&quot;&lt;EOF&gt;&quot; at line 1, column 5. Was expecting one of:
&lt;DATE&gt; ... &lt;FLOAT&gt; ... &lt;BOOLEAN&gt; ... &quot;!
&quot; ... &lt;STRING&gt; ... &lt;NAME&gt; ... &quot;{&quot; ...
&quot;
(&quot; ... &quot;$&quot; ... ' in /home3/scfruitt/public_html/Zend/
library/Zend/Gdata/App.php:700 Stack trace: #0 /home3/scfruitt/
public_html/Zend/library/Zend/Gdata.php(219): Zend_Gdata_App-
>performHttpRequest('GET', 'http://spreadsh...', Array, NULL, NULL,

NULL) #1 /home3/scfruitt/public_html/Zend/library/Zend/Gdata/App.php
(861): Zend_Gdata->performHttpRequest('GET', 'http://spreadsh...',
Array) #2 /home3/scfruitt/public_html/Zend/library/Zend/Gdata/App.php
(754): Zend_Gdata_App->get('http://spreadsh...', NULL) #3 /home3/
scfruitt/public_html/Zend/library/Zend/Gdata/App.php(205):
Zend_Gdata_App->importUrl('http://spreadsh...', 'Zend_Gdata_Spre...',
N in /home3/scfruitt/public_html/Zend/library/Zend/Gdata/App.php on
line 700
200
******************************************************************************************************
Questions:
Do I need different syntax or args in the above function setupClient()
because of
more recent versions of the ZendGdata framework since Pamela published
this in 2007?.
*****************************************************************************************************
Many thanks in advance...
-Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to