Details
Description
If we have more than one WSDL file for the execution of maven-codegen-plugin and we specify the extraargs "frontend" and "jaxws21", only one of the WSDL generates JAXWS21 compliant Java files.
POM.XML:
--------
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.5.2.</version>
<executions>
<execution>
<id>generate-wsdl-stubs</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/ServiceONE.wsdl</wsdl>
<wsdl>${basedir}/src/main/resources/wsdl/ServiceTWO.wsdl</wsdl>
<extraargs>
<extraarg>-frontend</extraarg>
<extraarg>jaxws21</extraarg>
<extraarg>-xjc-Xts</extraarg>
<extraarg>-xjc-Xdv</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.cxf.xjcplugins</groupId>
<artifactId>cxf-xjc-ts</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.apache.cxf.xjcplugins</groupId>
<artifactId>cxf-xjc-dv</artifactId>
<version>2.5.2</version>
</dependency>
</dependencies>
</plugin>
--> WSDL "ServiceONE" generates, in its correspondent XXXX_Service.java, the following method calls, JAXWS21 compliant:
public XXXX_Service(URL wsdlLocation)
public XXXX_Service(URL wsdlLocation, QName serviceName)
{ super(wsdlLocation, serviceName); }public XXXX_Service()
{ super(WSDL_LOCATION, SERVICE); }.........BUT........
--> WSDL "ServiceTWO" generates, in its correspondent XXXX_Service.java, the following method calls, NON-JAXWS21 compliant:
//This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
//API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
//compliant code instead.
public XXXX_Service(WebServiceFeature ... features)
//This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
//API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
//compliant code instead.
public XXXX_Service(URL wsdlLocation, WebServiceFeature ... features)
//This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
//API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
//compliant code instead.
public XXXX_Service(URL wsdlLocation, QName serviceName, WebServiceFeature ... features)
If I use only one WSDL file, everything works fine, but when I use two, the second one doesn't work. I also tried to use to separate executions but had no success.