Eclipse doesn't generate google cloud endpoint client library

寵の児 提交于 2020-01-04 12:48:10

问题


I'm trying to create my first GAE Endpoint app, and instead of generating an endpoint from a class, I'd like to create my own personalised Endpoint... is this possible?

I've written this class:

@Api(name="my_endpoint", path="my_endpoint")
public class MyFirstEndpoint {

  @ApiMethod (name="my_method", path="my_method", httpMehod=HttpMethod.GET)
  public Response myMethod(@Named("param1") String param1) {
    ...
  }

}

But when I try to generate the Endpoint Client Library in Eclipse, it says that there was an error... and the worst thing is that it doesn't say what error it is!


回答1:


Yes it's possible to create custom Endpoints.

I had the same error. I think you can't use "_" in the name of the Api nor the ApiMethod...

Try using "myEndpoint" and "myMethod" as the names and keep the "_" in the paths.




回答2:


A bit unrelated to this particular case, but it's the first thing that popped up on Google when searching for the error: you can't have overloaded methods in your Endpoints classes. Found this by looking in the Error console as described above in a comment.



来源:https://stackoverflow.com/questions/15684837/eclipse-doesnt-generate-google-cloud-endpoint-client-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!