JAX-WS error on WSDL file: “Error resolving component 's:schema'”

前端 未结 5 943
我寻月下人不归
我寻月下人不归 2020-12-28 15:25

The Error

I am using wsimport in a Java project to generate sources for three SOAP web services. The first two work fine: I use the JAX-WS Maven plugin to grab the

5条回答
  •  庸人自扰
    2020-12-28 15:48

    For Nick's solution to work you may have to add these two jvm arguments to your pom.xml So when encountering those errors:

    org.xml.sax.SAXParseException; systemId: http://www.w3.org/2001/XMLSchema.xsd; lineNumber: 67; columnNumber: 11; External DTD: Failed to read external DTD 'XMLSchema.dtd', because 'http' access is not allowed due to restriction set by the accessExternalDTD property.

    [WARNING] schema_reference: Failed to read schema document 'xml.xsd', because 'http' access is not allowed due to restriction set by the accessExternalSchema property. line 91 of http://www.w3.org/2001/XMLSchema.xsd

    Just add those to your pom.xml

    -Djavax.xml.accessExternalDTD=all
    -Djavax.xml.accessExternalSchema=all
    
    
        -Djavax.xml.accessExternalDTD=all
        -Djavax.xml.accessExternalSchema=all
    
    

提交回复
热议问题