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

WadlGenerator generates invalid xml for QueryParameters with a default value containing " characters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.7
    • 2.6.8, 2.7.5, 3.0.0-milestone1
    • JAX-RS
    • None
    • tomee-1.6.0-SNAPSHOT

    • Unknown

    Description

      When defining a service with an @DefaultValue those value contains some double quotes, for instance:

      @GET
        public List<Task> tasks(
         @DefaultValue("-\"Created\" -\"Done\"") @QueryParam("states") String states) {
        ...
      }
      

      The wadl description generated by the WadlGenerator class is not valid xml: the value should be xml encoded. It seems there are a lot of cases where the inputs are not correctly xml encoded in the generator, @DefaultValue being the one that will most probably contain offending values.

      As a side note, WadlGenerator is really painful to extend. For instance, in order to support custom "doc" annotations, one cannot override the handledocs method, but has to redefine all its callers.

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            areilles Antoine Reilles
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: