This question is related to Google Marketplace App's billing API. I am trying to get the customer license following the steps mentioned at the following place: http://code.google.com/googleapps/marketplace/v2/developers_guide.html#customer_license
My code is:
AppsMarketService service = new AppsMarketService();
service.appId = myAppID;
service.appName = "MyApp";
service.endpoint = "https://www.googleapis.com/appsmarket/v2/";
service.consumerKey = service.appId + ".apps.googleusercontent.com";
service.consumerSecret = MyAppSecretKey;
service.authorize();
CustomerLicense customerLicense = service.getCustomerLicense("example.com", true);
But I am getting the following exception:
java.lang.NullPointerException
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:31)
at com.google.api.client.appengine.UrlFetchRequest.execute(UrlFetchRequest.java:80)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:207)
at com.google.api.client.sample.appsmarket.AppsMarketService.getCustomerLicense(AppsMarketService.java:117)
...
I am using the following APIs:
appsmarket-2010_12_08.jar, google-api-client-1.2.1-alpha.jar, google-api-client-googleapis-1.2.1-alpha
Please help.