Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4202

Maven-codegin-plugin ignores option "frontend" if there is more than one wsdl file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 2.5.2
    • None
    • None
    • Ubuntu 11.10, Eclipse 3.6.2 (classic), m2e plugin version 0.12.1.20110112-1712, maven-codegen-plugin version 2.5.2

    • Unknown

    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)

      { super(wsdlLocation, SERVICE); }

      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)

      { super(WSDL_LOCATION, SERVICE, 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)

      { super(wsdlLocation, SERVICE, 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)

      { super(wsdlLocation, serviceName, 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.

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            duslompo Jose Eduardo Slompo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: