wadl
  1. wadl
  2. WADL-49

Fail building java classes if the "base" attribute of a resources element in the wadl file starts with a number

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.1
    • Fix Version/s: current
    • Component/s: None
    • Labels:
      None
    • Environment:

      Linux Debian (2.6.30)
      Java version "1.6.0_22"

      Description

      When trying to compile the services of OPS wadl (http://www.epo.org/searching/free/ops.html), wadl2java fails with the following errors (I tried both 1.1.1 and 1.1.2 versions)

      Version 1.1.1:
      Exception in thread "main" java.lang.IllegalArgumentException: JClass name 262RestServicesPublishedData contains illegal character for beginning of identifier: 2
      Version 1.1.2:
      Exception in thread "main" java.lang.NullPointerException

      I think this happens because the base attribute of the resources element of the wadl starts with a number. It follows the related excerpt of the wadl file:

      <resources base="/2.6.2/rest-services/published-data/">
      <!-- GET -->
      <resource path="

      {ref-type}

      /

      {ref-format}

      /

      {number}

      /

      {constituents}

      " id="publishedDataRetrievalGET">
      <doc xml:lang="en" title="Published document retrieval GET interface"/>
      <param href="#ref-type"/>
      <param href="#ref-format"/>
      <param href="#number"/>
      <param name="constituents" href="#published-data-constituents"/>

      <method name="GET" href="#wpdGETPOST"/>
      </resource>
      ......

        Activity

        Hide
        gdavison added a comment -

        The root of the problem is that the original WADL was invalid, but the tool wasn't able to correctly communicate this.

        I have put in place a bunch of validation and committed this as version 329, in generation missing method names, id properties on top level elements and anything other than href on reference nodes will all be flagged up to the user. The missing will result in an exception, the others a warning. I guess we should consider upgrading some of these to warning.s

        Show
        gdavison added a comment - The root of the problem is that the original WADL was invalid, but the tool wasn't able to correctly communicate this. I have put in place a bunch of validation and committed this as version 329, in generation missing method names, id properties on top level elements and anything other than href on reference nodes will all be flagged up to the user. The missing will result in an exception, the others a warning. I guess we should consider upgrading some of these to warning.s

          People

          • Assignee:
            gdavison
            Reporter:
            ihasan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: