Tag: remoteapi

远程api gae祖先查询

当我用祖先执行查询时,我尝试使用远程api并获得exception。 例外: 查询必须具有与包含的祖先密钥相同的应用程序ID(app):query.app:’firtsAppId’!= query.ancestor.app:’secondAppId’ 其中firtsAppId,secondAppId – 它是我的应用程序ID在’remote’和’client’上的appengine-web.xml AppEngine SDK 1.7.4 Windows 8 x64 jdk1.6.0_38 x64 代码如下: RemoteApiOptions options = new RemoteApiOptions().server(appId, 443).credentials(username, password); installer = new RemoteApiInstaller(); installer.install(options); DatastoreService service = DatastoreServiceFactory.getDatastoreService(); Entity parentEntity = new Entity(“ParentEntity”, 1); parentEntity.setProperty(“name”, “parent”); Key parentKey = service.put(parentEntity); Entity childEntity = new Entity(“ChildEntity”, 1, parentKey); childEntity.setProperty(“name”, “child”); service.put(childEntity); Query […]

如何在部署的appengine数据库中调试eclipse中的服务器代码?

我在Eclipse中有一个Google AppEngine(Java)项目。 我想在Eclipse中调试我的本地代码,但是在AppEngine上使用已部署的数据库。 到目前为止,我使用远程API与用户名/密码(旧方式) 这个方法将被弃用,我想使用OAuth,但是当我尝试使用它时,它会引发exception: java.lang.IllegalStateException: OAuth-based authorization not supported for clients running on App Engine at com.google.appengine.tools.remoteapi.RemoteApiOptions.getOrCreateHttpTransportForOAuth(RemoteApiOptions.java:359) at com.google.appengine.tools.remoteapi.RemoteApiOptions.useApplicationDefaultCredential(RemoteApiOptions.java:162) 当我运行在Eclipse中使用远程api的简单Java客户端应用程序时,可以使用Everthing。 但是如果客户端是Eclipse中的AppEngine开发环境,它就不起作用。 如何使用appengine数据库在eclipse中调试服务器代码? 错误报告: https : //code.google.com/p/googleappengine/issues/detail? id = 12556