【发布时间】:2013-11-28 16:48:03
【问题描述】:
我在 Eclipse 中创建了一个 Web 服务,它可以工作。我是这样发布的:
public class MyPublisher{
public static void main(String[] args) {
Endpoint endpoint = Endpoint.publish("http://localhost:9900/ws/hi", new MyServiceImpl());
System.out.println(endpoint.isPublished());
}
}
事实上,我在控制台中将它作为“Java 应用程序”而不是“Web 应用程序”运行。
我的应用程序是使用 Maven 的普通控制台应用程序。
我想要的是一个可以部署在 Jboss 或任何其他应用程序服务器上并运行我的 Web 服务的 WAR。
我该怎么做?如何从我的控制台应用程序生成它?
【问题讨论】: