Google App Engine的Java运行时环境不支持eclipse javax.jws.WebMethod中的GWT

时间:2023-01-17 22:42:58

I created a GWT application in eclipse using the GWT eclipse plugin. By default it created GreetingServiceAsync.java and GreetingService.java in client package. GreetingServiceImpl.java in server package.

我使用GWT eclipse插件在eclipse中创建了一个GWT应用程序。默认情况下,它在客户端软件包中创建了GreetingServiceAsync.java和GreetingService.java。服务器包中的GreetingServiceImpl.java。

Now I want to call a CXF webservice from GreetingServiceImpl.java. I used wsdl2java to generate java classes for my wsdl. I imported these generated class in my GWT project in eclipse and the package is "service". But it complains "javax.jws.WebMethod is not supported by Google App Engine's Java runtime environment", many more errors.

现在我想从GreetingServiceImpl.java调用CXF Web服务。我使用wsdl2java为我的wsdl生成java类。我在eclipse的GWT项目中导入了这些生成的类,包是“服务”。但它抱怨“Google App Engine的Java运行时环境不支持javax.jws.WebMethod”,还有更多错误。

How do I get rid of this?

我怎么摆脱这个?

Only error is the problem otherwise application is running fine.

只有错误是问题,否则应用程序运行正常。

1 个解决方案

#1


Is javax.jws.WebMethod in the GAE whitelist? If you're sure that this class is really supported in the App Engine, then in Eclipse try:

是GAE白名单中的javax.jws.WebMethod吗?如果你确定App Engine中真的支持这个类,那么在Eclipse中尝试:

  • Right click your project in the Project Explorer.
  • 在Project Explorer中右键单击您的项目。

  • Google -> App Engine Settings
  • Google - > App Engine设置

  • Make sure Use Google App Engine is checked
  • 确保选中使用Google App Engine

  • Try changing the App Engine SDK to the latest rev, if the dialog shows multiple ones
  • 如果对话框显示多个,请尝试将App Engine SDK更改为最新版本

I had this problem after doing Software Update; a new GAE SDK was installed and for some reason it confused the plugin. It was telling me that java.lang.String was unsupported. :-)

我做了软件更新后遇到了这个问题;安装了新的GAE SDK,由于某种原因,它混淆了插件。它告诉我java.lang.String不受支持。 :-)

#1


Is javax.jws.WebMethod in the GAE whitelist? If you're sure that this class is really supported in the App Engine, then in Eclipse try:

是GAE白名单中的javax.jws.WebMethod吗?如果你确定App Engine中真的支持这个类,那么在Eclipse中尝试:

  • Right click your project in the Project Explorer.
  • 在Project Explorer中右键单击您的项目。

  • Google -> App Engine Settings
  • Google - > App Engine设置

  • Make sure Use Google App Engine is checked
  • 确保选中使用Google App Engine

  • Try changing the App Engine SDK to the latest rev, if the dialog shows multiple ones
  • 如果对话框显示多个,请尝试将App Engine SDK更改为最新版本

I had this problem after doing Software Update; a new GAE SDK was installed and for some reason it confused the plugin. It was telling me that java.lang.String was unsupported. :-)

我做了软件更新后遇到了这个问题;安装了新的GAE SDK,由于某种原因,它混淆了插件。它告诉我java.lang.String不受支持。 :-)