subhadipdas / opensocial-java-client

Automatically exported from code.google.com/p/opensocial-java-client
0 stars 0 forks source link

java.lang.NullPointerException when get person on Hi5 #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
i am trying to get person(viewer) on hi5 but getting 
java.lang.NullPointerException when get the response

java.lang.NullPointerException
    at org.opensocial.Response.getParser(Response.java:90)
    at org.opensocial.Response.parseRestResponse(Response.java:83)
    at org.opensocial.Client.submitRestRequest(Client.java:200)
    at org.opensocial.Client.send(Client.java:153)
    at org.opensocial.Client.send(Client.java:108)
    at org.opensocial.ClientTest.testNoEndpointsSet(ClientTest.java:54)
    at org.opensocial.ClientTest.main(ClientTest.java:65)

my code :

public void testGetViewer() throws RequestException, IOException {
    Client client = new Client(new Hi5Provider(true), new 
OAuth2LeggedScheme(
        CONSUMER_KEY, CONSUMER_SECRET, VIEWER_ID));

    Request request = PeopleService.getViewer();
    Response response = client.send(request);

    Person self = response.getEntry();
  }

can someone tell what's wrong with my code???

Original issue reported on code.google.com by nale....@gmail.com on 6 May 2010 at 6:32

GoogleCodeExporter commented 9 years ago
I got the same exception while getting activities from Hi5.
And I dig into the response, it's because of 401 status code returned from Hi5 
with
no response body.
Don't know why this happen

Original comment by wennn...@gmail.com on 17 May 2010 at 1:06