【发布时间】:2015-03-25 01:00:13
【问题描述】:
我需要在 WebSphere Application Server(Liberty Profile)上运行 Web 服务,这样我才能获取 wsdl 并使用它在 SoapUI 上进行测试。 我在 Eclipse Luna 上使用 WebSphere Developer Tools。
我有这个webservice的代码,如下:
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 文件?
【问题讨论】:
-
@vincent 是的,我做到了。我明白了:错误 404:java.io.FileNotFoundException:SRVE0190E:找不到文件:/Communicate
-
用 CommunicateImpl 代替 Communicate 怎么样?
-
是的,也试过了。实际上是要在之前的评论中这么说但忘记了。
标签: java web-services wsdl websphere