I'm using org.jvnet.jax-ws-commons:jaxws-maven-plugin to generate client stubs for Soap services. Upgrading to JDK8 made this fail with following error:
Failed to read schema document 'xxx.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.
and something like
Failed to read DTD 'XMLSchema.dtd', because 'file' access is not allowed due to restriction set by the accessExternalDTD property.
Why is this and how can I fix this?
Seems restriction default have changed in JDK8.
Found this: http://wiki.netbeans.org/FaqWSDLExternalSchema
It was however hard for me to find out how to apply this to the Maven plugin, but passing jvm arguments worked:
<plugin>
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>${jaxws.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<verbose>true</verbose>
<xdebug>true</xdebug>
<wsdlDirectory>${basedir}/src/main/wsdl/</wsdlDirectory>
<wsdlFiles>
<wsdlFile>foo.wsdl</wsdlFile>
</wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
</configuration>
</execution>
</executions>
</plugin>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With