应用引擎RPC发现文档 [英] App engine RPC discovery doc

查看:91
本文介绍了应用引擎RPC发现文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用具有云端点的Java应用引擎来创建一个REST api,并且突然遇到这个错误:

警告:没有以rpc格式发现API hylytit v1版本的文档



我试图将Javascript客户端库加载到网页中一个 GET 调用。在Web控制台中,我看到了这一点:

GET http:// localhost:8888 / _ah / api / discovery / v1 / apis / hylytit / v1 / rpc?fields = methods%2F *%2Fid& pp = 0 [HTTP / 1.1 404 Not Found 5ms]



' m不熟悉RPC发现文档,并且无法在网上找到与App引擎和RPC有关的更多内容。这就是我称之为客户端库的方式:

 < script type =text / javascript> 
函数start(){
console.log(test.html onLoad函数调用。);
var ROOT =http:// localhost:8888 / _ah / api;
gapi.client.load(hylytit,'v1',function(){
var req = gapi.client.hylytit.listUrl();
req.execute(function(data ){
//对数据做一些事情
});
},ROOT);
}
< / script>
< script type =text / javascriptsrc =https://apis.google.com/js/client.js?onload=start>
< / script>

似乎Eclipse的App Engine插件没有生成正确的RPC发现文档。任何想法如何解决这个问题?



编辑
我已更新到最新版本的Google Eclipse插件和应用程序引擎SDK建议为@Jenny。我也检查过所有的云终端方法都是按照@Ashish的建议返回有效的类型,但是当我将它作为本地服务器运行时,它仍然会出现相同的错误。



有趣的是,我没有任何问题,当我部署到应用程序引擎,只有本地。

解决方案

Willma,是否更新App Engine Eclipse Plugin或SDK最近?如果你这样做,请尝试更新Google Plugin for Eclipse。这些插件需要同步才能使Google Cloud Endpoint Client库生成在Eclipse上正常工作。一旦你更新了两个插件,客户端库的生成工作。再次将应用程序部署到App Engine,然后您应该能够根据上面显示的网址再次验证。


I've been using app engine for Java with cloud endpoints to create a REST api and have suddenly run into this error:

WARNING: No discovery doc for API hylytit version v1 in rpc format

I'm trying to load the Javascript client library into a web page to do a GET call. In the web console, I see this:

GET http://localhost:8888/_ah/api/discovery/v1/apis/hylytit/v1/rpc?fields=methods%2F*%2Fid&pp=0 [HTTP/1.1 404 Not Found 5ms]

I'm unfamiliar with what RPC discovery docs are and can't find much online relating to App engine and RPC specifically. This is how I call the client library:

<script type="text/javascript">
function start() {
    console.log("test.html onLoad function called.");
    var ROOT = "http://localhost:8888/_ah/api";
    gapi.client.load("hylytit", 'v1', function() {
        var req = gapi.client.hylytit.listUrl();
        req.execute(function(data) {
            //Do something with the data.
        });
    }, ROOT);
}
</script>
<script type="text/javascript" src ="https://apis.google.com/js/client.js?onload=start">
</script>

It seems that the App Engine plugin for Eclipse isn't generating the right RPC discovery docs. Any idea how to fix this?

Edit: I have updated to the latest version of the Google Eclipse Plugin and the App Engine SDK as @Jenny suggested. I have also checked that all the cloud endpoint methods return valid types as @Ashish suggested, but continue to get the same error when I run it as a local server.

Interestingly, I have no issues when I deploy to app engine, only locally.

解决方案

Willma, did you update your App Engine Eclipse Plugin or SDK recently? If you did, try also update the Google Plugin for Eclipse. Those plugins need to be in-sync for Google Cloud Endpoint Client library generation to work properly on Eclipse. Once you update both plugins, the client library generation should work. Deploy the application to App Engine again, then you should be able to verify again based on the URL you showed above.

这篇关于应用引擎RPC发现文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆