我使用的是直接从 CXF 网站复制的 CXF 配置文件,网址为: cxf.apache.org/docs/client-http-transport-including-ssl-support.html
然而,当我运行我的程序时,XML 没有验证。给出的错误是: 属性“disableCNcheck”不允许出现在元素“http-conf:tlsClientParameters”中
我们在测试环境中使用自签名证书,只需要一个快速解决方法即可使用这些服务!
这是我正在尝试使用的 cxf.xml 文件,如有任何帮助,我们将不胜感激!
<http-conf:conduit
name="{https://hostname/service}MyService.http-conduit">
<!-- deactivate HTTPS url hostname verification (localhost, etc)
WARNING ! disableCNcheck=true should NOT be used in production-->
<http-conf:tlsClientParameters disableCNcheck="true" />
</http-conf:conduit>
最佳答案
该属性应为 disableCNCheck(Check 上的大写 C)。我相信只要解决这个问题就可以解决问题。
关于java - CXF xml 配置未使用 disableCNcheck ="true"进行验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5875716/