Now that Google Cloud Endpoints have been opened up to all developers, I have created a Google Cloud Endpoint which works run a run locally in Eclipse debugging. But when I deploy, the live endpoint just returns an HTTP 404. My project's JSP pages run both locally and deployed. It's just the endpoints the don't work once deployed.
现在Google Cloud Endpoints已经向所有开发人员开放,我创建了一个Google Cloud Endpoint,可以在Eclipse调试中运行本地运行。但是当我部署时,实时端点只返回HTTP 404.我的项目的JSP页面在本地运行并部署。它只是部署后不起作用的端点。
Anybody got any idea what I need to do to deploy cloud endpoints?
任何人都知道我需要做什么来部署云端点?
7 个解决方案
#1
12
I discovered that even though I only have one version (v1) deployed and that version was indicated as the "default" version in the app engine management console, I still had to "set" v1 as default before the API was accessible.
我发现即使我只部署了一个版本(v1)并且该版本在app引擎管理控制台中被指示为“默认”版本,我仍然必须在可访问API之前将v1“设置”为默认值。
#2
2
Endpoints only supports APIs on the default app version right now.
端点目前仅支持默认应用版本上的API。
#3
1
I have noticed that you have to access your endpoint by making the version you deployed the default version. For example https://yourappid.appspot.com/_ah/api/path/v2/methodname. If you use https://someappversion.yourappid.appspot.com/_ah/api/path/v2/methodnamel, it will not work based on my experience
我注意到您必须通过使部署的版本为默认版本来访问您的端点。例如https://yourappid.appspot.com/_ah/api/path/v2/methodname。如果您使用https://someappversion.yourappid.appspot.com/_ah/api/path/v2/methodnamel,根据我的经验它将无法正常工作
#4
0
It is the V2 that is wrong. The API version does not increase with the Appengine version! These are two different versions. Try with version 1.
这是V2错了。 API版本不会随着Appengine版本而增加!这是两个不同的版本。尝试使用版本1。
#5
0
I got this issue and my problem was I didnt generate the "Cloud Endpoint Cloud Library" in eclipse.
我遇到了这个问题,我的问题是我没有在eclipse中生成“Cloud Endpoint Cloud Library”。
Once I did it, everything worked perfectly.
一旦我做到了,一切都很完美。
#6
0
As of App Engine 1.7.7 and earlier, this could also have been caused by forgetting to add your Endpoint class to web.xml like so:
从App Engine 1.7.7及更早版本开始,这也可能是因为忘记将您的Endpoint类添加到web.xml,如下所示:
<servlet>
<servlet-name>SystemServiceServlet</servlet-name>
<servlet-class>com.google.api.server.spi.SystemServiceServlet</servlet-class>
<init-param>
<param-name>services</param-name>
<!-- Careful! No whitespace but commas between class names. -->
<param-value>ditto.api.CategoryEndpoint,ditto.api.PostEndpoint</param-value>
</init-param>
</servlet>
#7
-1
Have you tried to access them through the API explorer?
您是否尝试通过API资源管理器访问它们?
I had the same issue yesterday... Just happened to be using the wrong address.
昨天我遇到了同样的问题......恰好是使用了错误的地址。
#1
12
I discovered that even though I only have one version (v1) deployed and that version was indicated as the "default" version in the app engine management console, I still had to "set" v1 as default before the API was accessible.
我发现即使我只部署了一个版本(v1)并且该版本在app引擎管理控制台中被指示为“默认”版本,我仍然必须在可访问API之前将v1“设置”为默认值。
#2
2
Endpoints only supports APIs on the default app version right now.
端点目前仅支持默认应用版本上的API。
#3
1
I have noticed that you have to access your endpoint by making the version you deployed the default version. For example https://yourappid.appspot.com/_ah/api/path/v2/methodname. If you use https://someappversion.yourappid.appspot.com/_ah/api/path/v2/methodnamel, it will not work based on my experience
我注意到您必须通过使部署的版本为默认版本来访问您的端点。例如https://yourappid.appspot.com/_ah/api/path/v2/methodname。如果您使用https://someappversion.yourappid.appspot.com/_ah/api/path/v2/methodnamel,根据我的经验它将无法正常工作
#4
0
It is the V2 that is wrong. The API version does not increase with the Appengine version! These are two different versions. Try with version 1.
这是V2错了。 API版本不会随着Appengine版本而增加!这是两个不同的版本。尝试使用版本1。
#5
0
I got this issue and my problem was I didnt generate the "Cloud Endpoint Cloud Library" in eclipse.
我遇到了这个问题,我的问题是我没有在eclipse中生成“Cloud Endpoint Cloud Library”。
Once I did it, everything worked perfectly.
一旦我做到了,一切都很完美。
#6
0
As of App Engine 1.7.7 and earlier, this could also have been caused by forgetting to add your Endpoint class to web.xml like so:
从App Engine 1.7.7及更早版本开始,这也可能是因为忘记将您的Endpoint类添加到web.xml,如下所示:
<servlet>
<servlet-name>SystemServiceServlet</servlet-name>
<servlet-class>com.google.api.server.spi.SystemServiceServlet</servlet-class>
<init-param>
<param-name>services</param-name>
<!-- Careful! No whitespace but commas between class names. -->
<param-value>ditto.api.CategoryEndpoint,ditto.api.PostEndpoint</param-value>
</init-param>
</servlet>
#7
-1
Have you tried to access them through the API explorer?
您是否尝试通过API资源管理器访问它们?
I had the same issue yesterday... Just happened to be using the wrong address.
昨天我遇到了同样的问题......恰好是使用了错误的地址。