问题描述
我正在尝试为现有的Web应用程序生成Java客户端库,但每次选择生成云端点客户端库时,eclipse都会显示进度对话框并冻结。
是否有可用于生成客户端库的命令行工具(类似bin / endpoints.sh)?
感谢提前。
编辑
感谢Dan,我设法使用以下命令生成客户端库:
$ SDK / endpoints.sh get-client-lib com.test.MyEndpoint
503
错误。 这些类型的错误最常见的原因是您在实体类中使用了不兼容的类型。在这种情况下,使用命令行工具将无济于事。
但是,有些情况下,GPE失败时命令行工具已成功。要在没有GPE的情况下生成库,请从应用程序的根目录运行以下命令:
$ SDK / bin / endpoints.sh get- java-client-lib helloworld.endpoint.HelloWorldEndpoint
替换 helloworld.endpoint。 HelloWorldEndpoint
与您的Endpoint类的空格分隔名称。
I am trying to generate java client library for my existing web application, but each time a select "generate cloud endpoint client library" the eclipse shows progress dialog and freezes.
Is there a command line tool (something like bin/endpoints.sh) that can be used to generate client library?
thanks in advance.
EDITThanks Dan, I managed to generate client library by using this command:
$SDK/endpoints.sh get-client-lib com.test.MyEndpoint
You should be able to find out at least a little bit more information about the error in generating the library by looking at the Eclipse error log. However, I'm guessing the error is something generic like a 503
error from the service that generates the library.
The most common reason for those types of errors is that you're using an incompatible type in your entity class. Using the command line tool won't help in this case.
However, there are some cases where the command line tool has succeeded when GPE has failed. To generate the library without GPE run the following from the root of your application:
$SDK/bin/endpoints.sh get-java-client-lib helloworld.endpoint.HelloWorldEndpoint
Replace helloworld.endpoint.HelloWorldEndpoint
with the space-delimited name(s) of your Endpoint class(es).
这篇关于如何生成客户端库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!