【问题标题】:https protocol based address is not supported - javax.xml.ws.Endpoint不支持基于 https 协议的地址 - javax.xml.ws.Endpoint
【发布时间】:2015-02-19 23:03:25
【问题描述】:

我正在尝试创建一个独立于任何其他应用程序服务器的 Web 服务或 Tomcat,它适用于 http,但使用 https 我得到以下错误。似乎所有文档都与客户端示例或应用程序服务器示例有关。 一个好的教程的链接会很棒。

谢谢!

Exception in thread "main" java.lang.IllegalArgumentException: https protocol based address is not supported   
     at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:149)           
     at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:107)            

     at javax.xml.ws.Endpoint.publish(Endpoint.java:181)    

【问题讨论】:

    标签: java web-services https


    【解决方案1】:

    如果你使用类似的东西

    Endpoint.publish("https://localhost:9999/abc", new YourEndpoint());
    

    发布您的网络服务端点,并得到指定的异常 - 内部 JDK 网络服务器似乎不支持 HTTPS。

    请参阅此处了解更多信息:JAX-WS2 and HTTPS.
    此页面有 Jetty 相关信息,但也很有用:Jetty Webservice - https protocol based address is not supported

    如果你不想弄乱“沉重”的 Tomcat 服务器,你可以使用一些轻量级的东西。
    这些页面有很好的例子:Java Webservice using HTTPS part 1How to develop a standalone SSL web service

    它没有回答根本不使用任何应用程序服务器的问题,但希望它有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-12-20
      • 1970-01-01
      • 1970-01-01
      • 2018-09-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-23
      相关资源
      最近更新 更多