【问题标题】:Make CXF Web Service work when there is no internet connection在没有 Internet 连接时使 CXF Web Service 工作
【发布时间】:2022-01-28 09:40:39
【问题描述】:

我有一个 SOAP CXF Web 服务,它在没有互联网连接时无法启动。

完成一项测试时的错误如下

caused by: javax.wsdl.WSDLException: WSDLException (at /definitions/types/xs:schema/xsd:schema/schema): faultCode=PARSER_ERROR: Problem parsing 'file:/C:/<tomcat_instance>/webapps/cxfws/xsd/xmldsig-core-schema.xsd'.: java.net.SocketException: Permission denied: connect
    at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2198) ~[wsdl4j-1.6.3.jar:1.6.3]

找到一个链接 https://users.cxf.apache.narkive.com/z0jMuziG/running-cxf-on-a-server-that-don-t-have-an-internet-connection 但是其中的建议并没有帮助我解决问题 试图定义 META-INF 下的 spring.schemas 与行 http://www.w3.org/2000/09/xmldsig#/xmldsig-core-schema.xsd=xsd/xmldsig-core-schema.xsd 但这无助于解决问题。

有什么建议吗? spring.handlers 的目的是什么?这也需要吗?

【问题讨论】:

    标签: java spring soap xsd cxf


    【解决方案1】:

    能够通过从 cxf-beans.xml 以及 SOAP 服务实现类中的 @javax.jws.WebService 注释中删除 wsdlLocation 来解决产品启动时的解析错误

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多