我正在尝试在 GAE 云中托管的 GAE 应用程序中调用 Google 服务:
private String doPost(String URL) throws ClientProtocolException, IOException {
// Params:
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("accountType", "HOSTED_OR_GOOGLE"));
params.add(new BasicNameValuePair("Email", _DEFAULT_USER));
params.add(new BasicNameValuePair("Passwd", _DEFAULT_PASS));
params.add(new BasicNameValuePair("service", "ah"));
// Call
HttpClient httpClient = new DefaultHttpClient();
HttpPost post = new HttpPost(URL); // URL:
// https://www.google.com/accounts/ClientLogin
post.setEntity(new UrlEncodedFormEntity(p_params, HTTP.UTF_8));
post.getParams().setBooleanParameter(
CoreProtocolPNames.USE_EXPECT_CONTINUE, false);
HttpResponse response = httpClient.execute(post);
return _ProcessResponse(response); // Process...
}
执行抛出: com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'remote_socket' or call 'Resolve()' was not found
.
有任何想法吗?我完全迷路了...