【问题标题】:Publishing Web Service on WebSphere在 WebSphere 上发布 Web 服务
【发布时间】:2015-06-05 11:29:25
【问题描述】:

我是网络服务的新手。我按照 this 教程使用 JAX-WS(RPC 样式)创建了一个简单的 SOAP Web 服务,并且我想在 WebSphere 上发布我的端点。我知道我的应用在哪里:

[AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/belediye-liberty/

我分配了我的发布网址,例如:

import javax.xml.ws.Endpoint;
import com.ibm.cloudoe.services.HelloImp;

//Endpoint publisher
public class HelloPub{

    public static void main(String[] args) {
       Endpoint.publish("http://localhost:9080/belediye-liberty/ws/hello", new HelloImp());
    }     
}

但我无法访问 wsdl 并收到如下错误:

[WARNING ] SRVE8093W: The servlet class name is null for the servlet named [javax.ws.rs.core.Application] so the request cannot be handled.
[WARNING ] SRVE0190E: File not found: /ws/hello

我想我以错误的方式分配 url。我该怎么做? 感谢您的帮助。

【问题讨论】:

    标签: web-services jakarta-ee wsdl websphere jax-ws


    【解决方案1】:

    使用this 教程代替。

    请参阅上述文章的构建和部署服务部分。

    基本上,您需要在 websphere 服务器上的正确目录/文件夹结构中构建和部署您的代码。

    根据您的实施,websphere 正在 belediye-liberty/ws/hello 文件夹中寻找您的 web 服务,该文件夹尚不存在。这就是错误的原因。

    不过,如果您将在 Eclipse、Net beans 等中运行此代码,它将会工作。

    【讨论】:

    • 谢谢,但我不明白我应该做什么。指示不明确。我没有使用 Maven。你能解释一下我应该在 Eclipse 中为我的项目运行什么吗?
    【解决方案2】:

    在 Step1 页面部署时,您必须选择 Deploy Webservice 选项

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-11
      • 1970-01-01
      • 1970-01-01
      • 2020-09-07
      相关资源
      最近更新 更多