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

WADL2JAVA Tools Generated Source has Duplicate Method Name

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.7, 3.1.4
    • Fix Version/s: 3.1.5, 3.0.8, 3.2.0
    • Component/s: JAX-RS, Tooling
    • Labels:
      None
    • Environment:

      Windows

    • Estimated Complexity:
      Unknown

      Description

      Generate source using below wadl file contains duplicate method name:
      command: wadl2java.bat -p cxf -d . -impl hello.wadl

      <application xmlns="http://wadl.dev.java.net/2009/02" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <grammars/>
      <resources base="http://localhost:9088/Pojo/hello/">
      <resource path="/BasicResource">
      <resource path="/echo">
      <method name="GET">
      <response>
      <representation mediaType="application/json">
      <param name="result" style="plain" type="xs:string"/>
      </representation>
      </response>
      </method>
      <method name="GET">
      <response>
      <representation mediaType="text/plain">
      <param name="result" style="plain" type="xs:string"/>
      </representation>
      </response>
      </method>
      </resource>
      </resource>
      </resources>
      </application>

      /**

      • Created by Apache CXF WadlToJava code generator
        **/
        package cxf;

      import javax.ws.rs.GET;
      import javax.ws.rs.Path;
      import javax.ws.rs.Produces;

      @Path("/BasicResource")
      public class BasicResourceResource {

      @GET
      @Produces("application/json")
      @Path("/echo")
      public String getEcho()

      { //TODO: implement return null; }

      @GET
      @Produces("text/plain")
      @Path("/echo")
      public String getEcho()

      { //TODO: implement return null; }

      }

        Attachments

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              nbqyqx@163.com Neal Hu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: