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?