By examining the Maven debug output of the arguments being passed to the JAXB XJC (and a bit of trial and error) I found that I needed to supply 2 more configuration parameters to the plugin.
This stops the plugin scanning for XSD files and just uses the .wsdl
as the source. The XSD files are included in the WSDL as<xsd:include schemaLocation="datatypes.xsd" />
directives, for example, which are resolved locally resulting in all types from the WSDL and XSD being generated as Java classes.
The configuration section that worked for me is:
<configuration>
<packageName>com.x.y.model</packageName>
<wsdl>true</wsdl>
<xmlschema>false</xmlschema>
<schemaFiles>service.wsdl</schemaFiles>
</configuration>
Without the <xmlschema>false</xmlschema>
Maven errors with:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:1.5:xjc (default-cli) on project foo: Could not process schema: /c:/projects/foo/src/main/xsd/service.wsdl