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
I solved this by adapting Vivek Pandey's method to Maven, while updating to the jaxws-maven-plugin 2.2. I'll reiterate it here for posterity:
Put this XJB customization file (see below) in your default binding files directory, and set wsimport to bind it and http://www.w3.org/2001/XMLSchema.xsd .
The contents of the aforementioned XML file, xsd.xjb, that should go in your default binding files directory, is as follows (credit goes to Kohsuke):
Here's the relevant part of my POM file, with changes noted:
org.jvnet.jax-ws-commons
jaxws-maven-plugin
2.2
wsimport
-b http://www.w3.org/2001/XMLSchema.xsd
erp-app-devel.srv.mycompany.ca/EgTestReportEngine/Service.asmx.wsdl
http://erp-app-devel.srv.mycompany.ca/EgTestReportEngine/Service.asmx.wsdl
${project.build.directory}/jaxws/stale/Service.asmx.stale
xsd.xjb
wsimport-generate-egtestreportengine
generate-sources
javax.xml
webservices-api
1.4
${project.build.directory}/generated-sources/jaxws-wsimport
true
true
true
${basedir}/src/jax-ws-catalog.xml
2.0