Hi, i'm trying to access contacts but i got an error.
I already got access token with oAuth2, then i have a servlet with the code:
*public void doGet(HttpServletRequest req, HttpServletResponse resp)*
* throws IOException {*
* resp.setContentType("text/plain");*
* String AccessToken= req.getParameter("accessToken");*
* *
* *
* ContactsService myService = new ContactsService("CloudOffice");*
* myService.setHeader("Authorization", "Oauth <OAUTH_TOKEN>")*
* // Authorize the service object.*
* *
* // Request the feed*
* URL feedUrl = new
URL("https://www.google.com/m8/feeds/contacts/default/full");*
* resp.getWriter().println(feedUrl.toString());*
* *
* ContactFeed resultFeed=new ContactFeed();*
* try {*
* resultFeed = myService.getFeed(feedUrl, ContactFeed.class);*
* } catch (ServiceException e) {*
* // TODO Auto-generated catch block*
* e.printStackTrace();*
* }*
*
*
but i got the error 505:
Problem accessing /contactaccess. Reason:
com/google/gdata/client/contacts/ContactsService
Caused by:
java.lang.NoClassDefFoundError: com/google/gdata/client/contacts/ContactsService
at
contactAccess.ContactAccessServlet.doGet(ContactAccessServlet.java:25)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
...
It looks like i'm missing something...
can you help me?
--
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html