【问题标题】:Using Java SE Endpoint with Embedded Tomcat将 Java SE 端点与嵌入式 Tomcat 结合使用
【发布时间】:2012-09-14 11:44:58
【问题描述】:

我有一个通过简单 Endpoint 接口 (example) 公开的 JAX-WS Web 服务

如果我正确理解 API,作为直接调用 Endpoint.publish(使用 Sun 的 HTTP 服务器)的替代方法,我们可以:

  1. 创建端点 --> Endpoint e = Endpoint.create(impl);
  2. 发布端点 ---> e.publish(context);

我可以使用这个e.publish(..) API 发布到嵌入式 tomcat 服务器吗? (example)

javadoc of the Publish method 让我很困惑。

【问题讨论】:

    标签: java tomcat jax-ws


    【解决方案1】:

    虽然已有两年多的历史,但this answer 的相关问题仍然适用。如果要部署到tomcat,不管是嵌入式运行还是正常运行,都需要打包一个war,放在webapps目录下。

    要以您问题中描述的方式与publish() 方法一起使用,tomcat 必须提供Sun HTTP Server Service Provider Implementation,但它没有。例如,Sun 的 HTTP 服务器的替代方案是 Jetty

    【讨论】:

    • 谢谢。我按照您在 Jetty 上的提示,发现 Apache CXF(在内部使用 Jetty)运行良好。我在我的blog 上发布了我在这个主题上找到的其他一些有用的链接
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-05
    • 1970-01-01
    相关资源
    最近更新 更多