Eclipse 中的 WebSphere Liberty JAX-WS Web 服务生成
WebSphere Liberty JAX-WS Web Service Generation in Eclipse
我有
- WebSphere Liberty 17.0.0.1 "BASE_ILAN" x86_64 Windows Server 2012 R2
- Eclipse Neon.3 on Windows 10 x86_64(同一 LAN 上的独立服务器)
- 甲骨文JavaJDK1.8.0_121运行自由
- IBM JDK 8(来自 Eclipse 包)运行 Eclipse(Windows 远程服务器 start/stop 支持需要它)
在bin
目录下,productInfo featureInfo
returns很多东西,但是其中:
- jaxws-2.2 [1.0.0]
- javaee-7.0 [7.0.0](因为这是一个带来大量其他东西的便利功能,你可能可以推断出我还有多少其他东西)
在我的 server.xml 中,在 <featureManager>
下,我有一个 <feature>...</feature>
用于:
- javaee-7.0
- localConnector-1.0
- jsf-2.2
- restConnector-2.0
- jaxws-2.2
- jaxrs-2.0
在 Eclipse 中,我右键单击我的 WAR 项目,转到新建 -> 其他...,然后选择 Web 服务 -> Web 服务。单击下一步。
现在我有一个包含以下字段的对话框:
- 网络服务类型:"Bottom up Java bean Web Service"
- 服务实现:
some.package.SomeWebService
(来自我的代码;它包含适当的 @WebService
注释等)
- 服务的滑块设置为 "Start service",底部的滑块设置为 "No client"
- 配置:
- 服务器运行时:WebSphere Application Server Liberty
- Web 服务运行时:IBM WebSphere JAX-WS
- 服务项目:
<my WAR project>
- 服务 EAR 项目:
<my EAR project>
- "Publish the Web service" 复选框未选中
- "Monitor the Web service" 复选框未选中
- "Overwrite files without warning" 复选框已选中
单击“下一步”时,出现以下警告:
The project is targeted against a server without IBM WebSphere JAX-WS support. Continuing code generation will result in compilation errors.
如果单击“确定”,我将转到另一个对话框 "WebSphere JAX-WS Bottom Up Web Service Configuration",其中包含各种选项。不管我在这里 select 什么,当点击 Next 或 Finish 时,我得到以下错误:
Tools for the targeted server must be installed in order to generate Web services code.
我如何克服这个问题并将 JAX-WS 与 Liberty 结合使用?我有完整的 EE 配置文件,所以它应该可以工作,对吗?
我已经尝试在服务器 -> 运行时环境 -> 编辑 -> 高级下刷新缓存。我什至删除并重新创建了我的服务器,以及擦除 Liberty 目录并从头开始再次解压缩,从一开始就嵌入了 jaxws 和 Java EE 完整配置文件支持。
尝试设置目标运行时。右键单击 WAR 项目,然后单击 select Properties,然后单击 Targeted Runtimes。 Select 您创建的 Runtime Environment 旁边的复选框,可以在 Runtime Explorer 视图中看到。
我有
- WebSphere Liberty 17.0.0.1 "BASE_ILAN" x86_64 Windows Server 2012 R2
- Eclipse Neon.3 on Windows 10 x86_64(同一 LAN 上的独立服务器)
- 甲骨文JavaJDK1.8.0_121运行自由
- IBM JDK 8(来自 Eclipse 包)运行 Eclipse(Windows 远程服务器 start/stop 支持需要它)
在bin
目录下,productInfo featureInfo
returns很多东西,但是其中:
- jaxws-2.2 [1.0.0]
- javaee-7.0 [7.0.0](因为这是一个带来大量其他东西的便利功能,你可能可以推断出我还有多少其他东西)
在我的 server.xml 中,在 <featureManager>
下,我有一个 <feature>...</feature>
用于:
- javaee-7.0
- localConnector-1.0
- jsf-2.2
- restConnector-2.0
- jaxws-2.2
- jaxrs-2.0
在 Eclipse 中,我右键单击我的 WAR 项目,转到新建 -> 其他...,然后选择 Web 服务 -> Web 服务。单击下一步。
现在我有一个包含以下字段的对话框:
- 网络服务类型:"Bottom up Java bean Web Service"
- 服务实现:
some.package.SomeWebService
(来自我的代码;它包含适当的@WebService
注释等) - 服务的滑块设置为 "Start service",底部的滑块设置为 "No client"
- 配置:
- 服务器运行时:WebSphere Application Server Liberty
- Web 服务运行时:IBM WebSphere JAX-WS
- 服务项目:
<my WAR project>
- 服务 EAR 项目:
<my EAR project>
- "Publish the Web service" 复选框未选中
- "Monitor the Web service" 复选框未选中
- "Overwrite files without warning" 复选框已选中
单击“下一步”时,出现以下警告:
The project is targeted against a server without IBM WebSphere JAX-WS support. Continuing code generation will result in compilation errors.
如果单击“确定”,我将转到另一个对话框 "WebSphere JAX-WS Bottom Up Web Service Configuration",其中包含各种选项。不管我在这里 select 什么,当点击 Next 或 Finish 时,我得到以下错误:
Tools for the targeted server must be installed in order to generate Web services code.
我如何克服这个问题并将 JAX-WS 与 Liberty 结合使用?我有完整的 EE 配置文件,所以它应该可以工作,对吗?
我已经尝试在服务器 -> 运行时环境 -> 编辑 -> 高级下刷新缓存。我什至删除并重新创建了我的服务器,以及擦除 Liberty 目录并从头开始再次解压缩,从一开始就嵌入了 jaxws 和 Java EE 完整配置文件支持。
尝试设置目标运行时。右键单击 WAR 项目,然后单击 select Properties,然后单击 Targeted Runtimes。 Select 您创建的 Runtime Environment 旁边的复选框,可以在 Runtime Explorer 视图中看到。