Java WebService-WebSphere Application Server

丹尼尔·索萨(Daniel Sousa)

我需要在WebSphere Application Server(Liberty Profile)上运行Web服务,以便获得wsdl并将其用于在SoapUI上进行测试。我正在Eclipse Luna上使用WebSphere Developer Tools。

我有此Web服务的代码,如下所示:

Communicate.java

package xpto;

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService
public interface Communicate {
        @WebMethod String initiate(String var);
}

CommunicateImpl.java

package xpto;

import javax.jws.WebService;

@WebService(endpointInterface = "xpto.Communicate")
public class CommunicateImpl implements Communicate {
    @Override
    public String initiate(String var){
        System.out.println("Communicating");
        return "S";
    }
}

现在,我应该怎么做才能运行Web服务并获取wsdl文件?

气体

您可以在Eclipse中检查您的Web服务名称。然后展开您的Web项目JAX-WS Web Services > Web Services您的服务可能被称为CommunicateImplService,因此wsdl应该可以通过以下方式访问:http://host:port/context/serviceName?wsdl在您的情况下,可能是CommunicateImplService?wsdl另外,请确保您的项目已添加到服务器。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

WebSphere Application Server 6.1对Java 1.6的支持?

Websphere Application Server导入设置

在 WebSphere Application Server (WAS) 上运行 ChromeDrive

Websphere application server start access denied

有没有办法在 Websphere Application Server 8.5 中激活早期的 Java 版本?

WebSphere Application Server 8:错误404:java.io.FileNotFoundException:SRVE0190E:找不到文件:

Websphere Application Server-快速启动需要什么?

删除或删除现有Websphere Application Server的配置文件

如何为Websphere Application Server启用CORS支持

从适配器访问WebSphere Application Server资源

IBM WebSphere Application Server运行时的清单

getServletContext()。getRealPath(“”)在WebSphere Application Server Liberty中返回null

Websphere Application Server 9 Tomahawk20中的Popupcalendar

IBM Websphere Application Server中单元级别的JVM args

在 WebSphere Application Server 上设置 HSTS 标头

如何将Websphere Application Server 8.0添加到IBM Rational Application Developer 8.5.5

如何在 WebSphere Application Server v9 上将 URL http 重定向到 https

eclipse + WDT +自由:如何配置eclipse以不创建“ WebSphere Application Server Liberty”项目?

如何在Bluemix上垂直和水平扩展WebSphere Application Server?

使用IBM WebSphere Application Server Liberty概要文件配置Mysql数据源

尝试命中WebSphere Application Server上部署的应用程序时缺少资源异常

有没有办法从IBM Websphere Application Server管理控制台检索EAR?

如何在Eclipse中增加WebSphere Application Server V8.5 Liberty Profile的堆大小?

更改WebSphere Application Server传统ND V9的根目录

WebSphere Application Server for Liberty找不到上下文根

Websphere Application Server中上下文路径中的双斜杠

IBM WebSphere Application Server(V9)如何处理HTTP基本认证中的领域

“ IBM WebSphere Application Server V9.0的Web服务器插件”而不是IM的存档安装

在 WebSphere Application Server 8.5 中禁用 JAX-WS 客户端的分块传输编码