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

wsdl2js generates invalid js names when wsdl contains hyphens

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.7.5
    • None
    • WS-* Components
    • Unknown

    Description

      Invalid JS code is generated by wsdl2js if WSDL contains hyphens.

      Reproduction:

       
      wsdl2js.bat ExampleService.wsdl
      

      generates invalid ExampleService.js:

      //..
      function X1_RequestParam () {
          this.typeMarker = 'X1_RequestParam';
          this._input-parameter = '';
      }
      //..
      

      Resolution:

      Please see attached patch.

      The patch only fixes hyphens, which should be the most common problematic case. However, there are other characters and combinations which can also lead to invalid JS names! So it is probably a good idea to look at that in more detail to improve compatibility... at least for my WSDL the hyphen patch fixes the problems.

      Attachments

        1. ExampleService.wsdl
          2 kB
          Florian Vielhauer
        2. my.patch
          2 kB
          Florian Vielhauer

        Activity

          People

            Unassigned Unassigned
            fvielhauer Florian Vielhauer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: