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

JAX-RS demo not working with return type String

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.1
    • None
    • None

    Description

      JAX-RS demo does not work when a resouce method returns String, See below:

      @javax.ws.rs.HttpMethod("GET")
      @javax.ws.rs.UriTemplate("

      {section}

      /

      {id}

      ")
      public String findBySectionAndId(@javax.ws.rs.UriParam("section")
      String section, @javax.ws.rs.UriParam("id")
      String id)

      { return "Hello World - section is " + section + ", id is " + id + "\n"; }

      FWIW I had to change type of the "Id" parameter from an int to a String not to throw a IllegalArgumentException

      Attachments

        Activity

          People

            jliu Jervis Liu
            jliu Jervis Liu
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: