【问题标题】:CXF - Wsdl2Java enable to access to xml.xsdCXF - Wsdl2Java 允许访问 xml.xsd
【发布时间】:2016-01-04 18:34:22
【问题描述】:

我正在尝试使用合同优先的方法使用 Eclipse 和 CXF 设置 SOAP Web 服务。我已经生成了 wsdl 文件,它是正确的。当我使用 CXF Wsdl2Java 生成 SOAP Web 服务时,出现以下错误:

org.xml.sax.SAXParseException; schema_reference: 
            Failed to read schema document 'xml.xsd', because 'file' access is not allowed 
            due to restriction set by the accessExternalSchema property.

有什么帮助吗?非常感谢您。

【问题讨论】:

    标签: eclipse cxf wsdl2java


    【解决方案1】:

    好的,伙计们。我找到了解决方案。 如果不存在,则在%JRE_HOME%/lib下创建一个名为jaxp.properties的文件,然后在其中写入以下行:

    javax.xml.accessExternalSchema = all
    

    【讨论】:

    • 如果可能的话,将其添加为 VM 参数通常更容易接受 -Djavax.xml.accessExternalSchema=ALL
    猜你喜欢
    • 1970-01-01
    • 2015-11-30
    • 1970-01-01
    • 2018-03-22
    • 2012-12-24
    • 2019-04-26
    • 2013-05-31
    • 1970-01-01
    • 2011-01-13
    相关资源
    最近更新 更多