在WebSphere上发布Web服务

时间:2015-06-05 11:29:25

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

我是Web服务的新手。我通过遵循 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

我想我正以错误的方式分配网址。我该怎么做? 谢谢你的帮助。

2 个答案:

答案 0 :(得分:0)

请使用this教程。

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

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

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

虽然,如果您将在Eclipse,Net beans等中运行此代码,它将起作用。

答案 1 :(得分:0)

在Step1页面中部署时,您必须选择部署Web服务选项

相关问题