Rob -
Thank you so much. I can promise you we will not figure it out. We
are out of ideas. Any guidance you can provide would be very much
appreciated.
Thanks,
Todd Sowers
--
Todd Sowers
DList.com
phone: 646-827-6766
t...@dlist.com
www.dlist.com
On Jan 16, 2009, at 3:54 PM, Rob Lockstone wrote:
I don't have time to look at it now, but will this weekend if you
don't figure it out.
Rob
On Jan 16, 2009, at 12:36, Todd Sowers wrote:
Rob -
There are no errors. When we call the function, we ask it to
return the result set count. In our case it should be 37. However
it returns 0.
The API we are using is the Google Contacts Data API (http://code.google.com/apis/contacts/docs/2.0/developers_guide_java.html
)
This is the test class which should return data. It returns nothing.
import com.google.gdata.client.contacts.ContactsService;
import com.google.gdata.data.contacts.ContactEntry;
import com.google.gdata.data.contacts.ContactFeed;
import com.google.gdata.util.AuthenticationException;
import com.google.gdata.util.ServiceException;
import com.google.gdata.client.Query;
import com.manmatch.Constants;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* This is a test template
*/
public class Contacts {
public static void main(String[] args) {
Log log = LogFactory.getLog(Constants.PACKAGE);
try {
// Create a new Contacts service
ContactsService myService = new ContactsService("My
Application");
myService
.setUserCredentials
("****INSERT_GOOGLE_USER_NAME
*******","*******INSERT_GOOGLE_PASSWORD********");
// Get a list of all entries
URL metafeedUrl = new URL("http://www.google.com/m8/feeds/contacts/default/full
");
log.info("Getting Contacts entries...\n");
//ContactFeed resultFeed = myService.getFeed(metafeedUrl,
ContactFeed.class);
Query myQuery = new
com.google.gdata.client.Query(metafeedUrl);
myQuery.setMaxResults(5);
ContactFeed resultFeed = myService.query(myQuery,
ContactFeed.class);
List<ContactEntry> entries = resultFeed.getEntries();
for(int i=0; i<entries.size(); i++) {
ContactEntry entry = entries.get(i);
log.info("\t" + entry.getTitle().getPlainText());
}
log.info("\nTotal Entries: "+entries.size());
}
catch(AuthenticationException e) {
e.printStackTrace();
}
catch(MalformedURLException e) {
e.printStackTrace();
}
catch(ServiceException e) {
e.printStackTrace();
}
catch(IOException e) {
e.printStackTrace();
}
}
}
If we run this class in Eclipse as a Java application, it returns
the contact data without issue.
Any help here would be greatly appreciated. Thanks again.
--
Todd Sowers
DList.com
phone: 646-827-6766
t...@dlist.com
www.dlist.com
--
Todd Sowers
DList.com
phone: 646-827-6766
t...@dlist.com
www.dlist.com
On Jan 16, 2009, at 3:19 PM, Rob Lockstone wrote:
What Google API requests are resulting in errors? And what are the
errors?
Rob
On Jan 16, 2009, at 10:13, Todd Sowers wrote:
Rob -
Yes we have tried using the Apache Xerces parser and it doesn't
work
The only time the Google API returns records is when we do not
include
the following:
<server>
...
<!-- Requires Apache's xerces.jar and xml-apis.jar libraries. -->
<system-property
javax
.xml
.parsers
.DocumentBuilderFactory
="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
<system-property
javax
.xml
.parsers
.SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
<!-- Requires Apache's xalan.jar library. -->
<system-property
javax
.xml
.transform
.TransformerFactory
="org.apache.xalan.processor.TransformerFactoryImpl"/>
...
</server>
In this case, hibernate returns errors.
We just are at a lose as what to do. We absolutely need to use
Hibernate, most of our application is developed using it. By
including the fore mentioned tags Hibernate works fine, but the
Google
API returns nothing.
Todd
_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest
_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest
_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest