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

wadl2java doesn't find types with underscore in their name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5
    • 2.4.5, 2.5.1
    • JAX-RS
    • None
    • Unknown

    Description

      wadl2java has problems when type names in XSD have underscores in them. The generated Java interface will be wrong.

      Example from the CXF SVN:
      The generated Java interface BooStore.java for systests/jaxrs/src/test/resources/wadl/bookstoreImport.xsd
      contains this line:
      public void addBook(@PathParam("bookid") int bookid, Book book) {

      In systests/jaxrs/src/test/resources/wadl/schemas/book.xsd, change the type name "book" to "bo_ok". After this change, the generated interface looks like this:
      public void addBook(@PathParam("bookid") int bookid) {

      If the underscore was used in a type that is used for parameters, then the parameter will be missing in the interface.
      If the type is used as a response, then it will be replaced by the generic class "Response".

      The problem is most likely that the class name for the type bo_ok is "BoOk" (as expected if you're familiar with JAXB), but wadl2java does not expect this kind of renaming.

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            odendahl Stefan Odendahl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: