Anyone seen my keys? Authsub problem

1 view
Skip to first unread message

NMAGOCIO

unread,
Sep 24, 2009, 12:17:38 AM9/24/09
to Google Contacts API
I have an App I am working on that authenticates the user using
AuthSub and stores their token in JDO so they don't need to
authenticate for each services call. However, when I go to use the
token to call a service I get:
java.lang.NullPointerException: No authentication header information

sessionToken = t.getToken(); //pulled from JDO
resp.getWriter().println("Produces: " + sessionToken); //
Produces: CNz80-C_HxC4if-rBQ

ContactsService myService = new ContactsService("contacts");
myService.setAuthSubToken(sessionToken, null);
URL feedUrl = new URL("http://www.google.com/m8/feeds/contacts/default/
full?max-results=10");

//Fails here
ContactFeed resultFeed = myService.getFeed(feedUrl,
ContactFeed.class);


Do I need to append something to the token String before setting it in
MyService?

NMAGOCIO

unread,
Nov 6, 2009, 11:03:07 PM11/6/09
to Google Contacts API
Still hoping someone can help!

I put this project on hold for other projects and now find myself back
here trying to get that last little piece.
Basically I have followed the authsub example up to the point it goes
to the jsp page to pull calendar items. I would like to simply go to a
class that that lists contacts.

I have looked all over the web for a Java tutorial that accesses gdata
but nothing... tons on python but I am using Java and eclipse.

Julian (Google)

unread,
Nov 17, 2009, 10:47:33 AM11/17/09
to Google Contacts API
Hi,

What error are you getting when it fails at getFeed? What scope are
you using?

-Julian

On Nov 7, 4:03 am, NMAGOCIO <nmago...@gmail.com> wrote:
> Still hoping someone can help!
>
> I put this project on hold for other projects and now find myself back
> here trying to get that last little piece.
> Basically I have followed theauthsubexample up to the point it goes
Reply all
Reply to author
Forward
0 new messages