-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
jbossws-jaxws-tools-maven.plugin-1.3.0.Final
-
None
I need to use two binding files, one for JAX-WS and one for JAXB, so I configured the plugin with the two binding files
<plugin> <groupId>org.jboss.ws.plugins</groupId> <artifactId>jaxws-tools-maven-plugin</artifactId> <version>${maven.jaxws.plugin.version}</version> <executions> <execution> <id>wsconsume.main</id> <goals> <goal>wsconsume</goal> </goals> <configuration> <wsdls> <wsdl>${project.basedir}/src/main/resources/my.wsdl</wsdl> </wsdls> <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory> <bindingFiles> <bindingFile>${project.basedir}/src/main/resources-local/binding.jaxws.xml</bindingFile> <bindingFile>${project.basedir}/src/main/resources-local/binding.jaxb.xml</bindingFile> </bindingFiles> <additionalHeaders>true</additionalHeaders> <fork>true</fork> <extension>true</extension> <verbose>true</verbose> </configuration> </execution>
The command line generated for wsdl2java has the second binding file instead of the wsdl
[WARNING] Running command line: [/usr/lib/jvm/java-17-openjdk-17.0.8.0.7-1.fc38.x86_64/bin/java, --add-modules=java.compiler, -classpath, ~/mypath/target/jaxws-tools/jaxws-tools-maven-plugin-classpath-534036919302382902.jar, org.jboss.ws.tools.cmd.WSConsume, -b, ~/mypath/src/main/resources-local/binding.jaxws.xml, ~/mypath/src/main/resources-local/binding.jaxb.xml, -k, -o, ~/mypath/target/classes, -s, ~/mypath/src/main/java, -e, -n, -a, ~/mypath/src/main/resources/my.wsdl] [INFO] consumer output: Could not find log4j.properties or log4j.xml configuration, logging to console. [INFO] consumer output: [INFO] consumer output: TODO! Cheek SOAP 1.2 extension [INFO] consumer output: Loading FrontEnd jaxws ... [INFO] consumer output: Loading DataBinding jaxb ... [INFO] consumer output: wsdl2java -b ~/mypath/src/main/resources-local/binding.jaxws.xml -exsh true -d ~/mypath/src/main/java -verbose -allowElementReferences file:~/mypath/src/main/resources-local/binding.jaxb.xml [INFO] consumer output: wsdl2java - Apache CXF 3.4.10 [INFO] consumer output: [INFO] consumer output: JBWS024002: Failed to invoke org.apache.cxf.tools.wsdlto.WSDLToJava [INFO] consumer output: org.apache.cxf.tools.common.ToolException: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition file:~/mypath/src/main/resources-local/binding.jaxb.xml: WSDLException (at /jxb:bindings): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'.