Jakarta ee 在wsdl中将http转换为https

Jakarta ee 在wsdl中将http转换为https,jakarta-ee,https,tomcat7,Jakarta Ee,Https,Tomcat7,我正在访问一个web服务。我在tomcat中部署了war文件,生成的wsdl文件具有http链接。我需要将其更改为https(或将其路由到https) 我需要更改java代码吗?或者tomcat/conf/server.xml中的一些更改?您不需要更改代码。您应该在Tomcat中配置HTTPS。可在此处找到程序: 通过在应用程序的web.xml中创建安全约束,可以进一步锁定应用程序以请求HTTPS连接: <web-app> <security-constraint&g

我正在访问一个web服务。我在tomcat中部署了war文件,生成的wsdl文件具有http链接。我需要将其更改为https(或将其路由到https)


我需要更改java代码吗?或者tomcat/conf/server.xml中的一些更改?

您不需要更改代码。您应该在Tomcat中配置HTTPS。可在此处找到程序:

通过在应用程序的
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>

安全URL
/*
保密的
<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>