【问题标题】:Web Service with Eclipse for WebSphere 8.0用于 WebSphere 8.0 的带有 Eclipse 的 Web 服务
【发布时间】:2014-06-13 20:00:45
【问题描述】:

我正在尝试使用 Eclipse 创建 Web 服务以托管在 WebSphere 8.0 上。

package peter.td.com;

import javax.jws.*;

@WebService
public class First01 {
    @WebMethod
    public int Addition(int a, int b, int c)
    {
        return a+b+c;
    }
}

我执行了 export(.ear) 并获取了 EAR 文件并将其部署到 WAS 8.0。
当我做http://localhost:9080/WebService01: 它给了我一个找不到页面的错误。

我环顾四周,找不到任何好的示例来创建 Web 服务以托管在 WebSphere 上。我正在使用 Eclipse IDE。

请分享或显示我可以使用 Eclipse IDE 为 WAS 8.0 创建 WebService 的任何教程链接。

【问题讨论】:

    标签: java eclipse web-services websphere


    【解决方案1】:

    您的网址不正确。应该是http://localhost:9080/context-root/First01Service 默认情况下,context-root 是您的 Web 项目名称。 在 Eclipse 中获取正确 url 和测试服务的最简单方法是将项目添加到服务器,然后展开项目中的“服务”文件夹,右键单击您的 Web 服务并选择使用 Web 服务资源管理器进行测试。

    【讨论】:

      猜你喜欢
      • 2020-03-20
      • 2017-09-05
      • 2017-05-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多