在 wsdl 中将 http 转换为 https

convert http to https in wsdl

我正在访问网络服务。我已经在 tomcat 中部署了 war 文件,并且生成的 wsdl 文件具有 http link。我需要将其更改为 https(或将其路由到 https)。

the link is somewhat like this:
http://sdkfjk/services/abcService?wsdl

and I need to have it somewhat like this:
https://sdkfjk/services/abcService?wsdl

我需要更改 java 代码吗?或 tomcat/conf/server.xml ?

中的一些更改

您无需更改代码。您应该在 Tomcat 中配置 HTTPS。该程序可以在这里找到:

https://tomcat.apache.org/tomcat-8.0-doc/ssl-howto.html

您可以通过在应用程序的 web.xml:

中创建安全约束来进一步锁定应用程序以要求 HTTPS 连接
<web-app>
    <security-constraint>
      <web-resource-collection>
        <web-resource-name>Secure URLs</web-resource-name>
        <url-pattern>/*</url-pattern>
      </web-resource-collection>
      <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
      </user-data-constraint>
    </security-constraint>
</web-app>