Axis2
  1. Axis2
  2. AXIS2-3585

axis2-wsdl2code ignores packageName in execution group

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Component/s: Tools
    • Labels:
      None

      Description

      <plugin>
      <groupId>org.apache.axis2</groupId>
      <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
      <version>1.3</version>
      <executions>
      <execution>
      <id>test1</id>
      <goals>
      <goal>wsdl2code</goal>
      </goals>
      <configuration>
      <packageName>foo.bar</packageName>
      <wsdlFile>src/main/axis2/myservice.wsdl</wsdlFile>
      </configuration>
      </execution>
      </executions>
      </plugin>

      gives

      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] One or more required plugin parameters are invalid/missing for 'axis2-wsdl2code:wsdl2code'

      [0] inside the definition for plugin: 'axis2-wsdl2code-maven-plugin'specify the following:

      <configuration>
      ...
      <packageName>VALUE</packageName>
      </configuration>

      OR

      on the command line, specify: '-Daxis2.wsdl2code.package=VALUE'

        Activity

        Hide
        Michael Dürig added a comment -

        This only occurres when invoked as mvn axis2-wsdl2code:wsdl2code.

        mvn generate-sources works as expected.

        Show
        Michael Dürig added a comment - This only occurres when invoked as mvn axis2-wsdl2code:wsdl2code. mvn generate-sources works as expected.
        Hide
        Marius Scurtescu added a comment -

        Same thing happens in 1.4.1.

        Not sure what's up with axis2-wsdl2code:wsdl2code, but the maven plugin page at:
        http://ws.apache.org/axis2/tools/1_4_1/maven-plugins/maven-wsdl2code-plugin.html
        should be updated and mention generate-sources instead.

        Either that, or axis2-wsdl2code:wsdl2code should be fixed.

        Show
        Marius Scurtescu added a comment - Same thing happens in 1.4.1. Not sure what's up with axis2-wsdl2code:wsdl2code, but the maven plugin page at: http://ws.apache.org/axis2/tools/1_4_1/maven-plugins/maven-wsdl2code-plugin.html should be updated and mention generate-sources instead. Either that, or axis2-wsdl2code:wsdl2code should be fixed.
        Hide
        David Webb added a comment -

        Spent a long time on this today b/c docs dont mention to run generate-sources instead of wsdl2code. Please update docs to save someone else a day.

        Also, would be great to show an example of how to use the <executions> to build multiple WSDL files to Code with one pom.xml.

        Show
        David Webb added a comment - Spent a long time on this today b/c docs dont mention to run generate-sources instead of wsdl2code. Please update docs to save someone else a day. Also, would be great to show an example of how to use the <executions> to build multiple WSDL files to Code with one pom.xml.
        Hide
        David Webb added a comment -

        Also, in the spirit of being part of the solution, I feel like an expert on this plugin (after 8 hours of trying to figure it out using bad docs). I would be happy to update the Docs, or contribute a Wiki Page on this. Thanks.

        Show
        David Webb added a comment - Also, in the spirit of being part of the solution, I feel like an expert on this plugin (after 8 hours of trying to figure it out using bad docs). I would be happy to update the Docs, or contribute a Wiki Page on this. Thanks.
        Hide
        Tomaž Majerhold added a comment -

        @Michael No it is not true, that generate-sources, because this is not a goal, but the phase, so please be more exact

        And by the way, the doc's are relay misleading and totally wrong approach:

        --------------------------------------------------------------------------------
        <plugin>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
        <version>1.5.4</version>
        <executions>
        <execution>
        <phase>generate-sources</phase>
        <goals>
        <goal>wsdl2code</goal>
        </goals>
        <configuration>
        <packageName>com.foo.myservice</packageName>
        <wsdlFile>src/main/wsdl/myservice.wsdl</wsdlFile>
        <databindingName>jibx</databindingName>
        </configuration>
        </execution>
        </executions>
        </plugin>
        --------------------------------------------------------------------------------

        But the biggest problem remain, how to specifies another binding parameters, like in ANT:

        <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
        <classpath refid="axis2.lib.dir"/>
        <arg value="-uri"/>
        <arg file="axis2/wsdl/OZWIZARD_LU.wsdl"/>
        <arg value="-p"/>
        <arg value="si.arnes.ozwizardlu.soap"/>
        <arg value="-Ebindingfile"/>
        <arg value="jibx/binding.xml"/>
        <arg value="-d"/>
        <arg value="jibx"/>
        <arg value="-s"/>
        <arg value="-uw"/>
        <arg value="-S"/>
        <arg value="./src"/>
        </java>

        Show
        Tomaž Majerhold added a comment - @Michael No it is not true, that generate-sources, because this is not a goal, but the phase, so please be more exact And by the way, the doc's are relay misleading and totally wrong approach: -------------------------------------------------------------------------------- <plugin> <groupId>org.apache.axis2</groupId> <artifactId>axis2-wsdl2code-maven-plugin</artifactId> <version>1.5.4</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>wsdl2code</goal> </goals> <configuration> <packageName>com.foo.myservice</packageName> <wsdlFile>src/main/wsdl/myservice.wsdl</wsdlFile> <databindingName>jibx</databindingName> </configuration> </execution> </executions> </plugin> -------------------------------------------------------------------------------- But the biggest problem remain, how to specifies another binding parameters, like in ANT: <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true"> <classpath refid="axis2.lib.dir"/> <arg value="-uri"/> <arg file="axis2/wsdl/OZWIZARD_LU.wsdl"/> <arg value="-p"/> <arg value="si.arnes.ozwizardlu.soap"/> <arg value="-Ebindingfile"/> <arg value="jibx/binding.xml"/> <arg value="-d"/> <arg value="jibx"/> <arg value="-s"/> <arg value="-uw"/> <arg value="-S"/> <arg value="./src"/> </java>
        Hide
        Sagara Gunathunga added a comment -

        Can't reproduce originally reported issue with recent releases.

        Show
        Sagara Gunathunga added a comment - Can't reproduce originally reported issue with recent releases.
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Axis2 #3230 (See https://builds.apache.org/job/Axis2/3230/)
        Don't advertise the possibility to run the axis2-wsdl2code-maven-plugin from the command line. It should generally be run as part of the normal build (except maybe to generate test cases), and the instructions given in the documentation only cause confusion; see e.g. AXIS2-3585, AXIS2-2675 and AXIS2-3255. (veithen: rev 1727177)

        • axis2/modules/tool/axis2-wsdl2code-maven-plugin/src/site/markdown/usage.md
        Show
        Hudson added a comment - SUCCESS: Integrated in Axis2 #3230 (See https://builds.apache.org/job/Axis2/3230/ ) Don't advertise the possibility to run the axis2-wsdl2code-maven-plugin from the command line. It should generally be run as part of the normal build (except maybe to generate test cases), and the instructions given in the documentation only cause confusion; see e.g. AXIS2-3585 , AXIS2-2675 and AXIS2-3255 . (veithen: rev 1727177) axis2/modules/tool/axis2-wsdl2code-maven-plugin/src/site/markdown/usage.md

          People

          • Assignee:
            Unassigned
            Reporter:
            Michael Dürig
          • Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development