You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Florian Vielhauer (JIRA)" <ji...@apache.org> on 2013/06/26 17:14:20 UTC

[jira] [Updated] (CXF-5094) wsdl2js generates invalid js names when wsdl contains hyphens

     [ https://issues.apache.org/jira/browse/CXF-5094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Vielhauer updated CXF-5094:
-----------------------------------

    Attachment: ExampleService.wsdl
    
> wsdl2js generates invalid js names when wsdl contains hyphens
> -------------------------------------------------------------
>
>                 Key: CXF-5094
>                 URL: https://issues.apache.org/jira/browse/CXF-5094
>             Project: CXF
>          Issue Type: Bug
>          Components: WS-* Components
>    Affects Versions: 2.7.5
>            Reporter: Florian Vielhauer
>              Labels: hyphen, patch, wsdl2js
>         Attachments: ExampleService.wsdl, my.patch
>
>
> Invalid JS code is generated by wsdl2js if WSDL contains hyphens.
> Reproduction:
> {code} 
> wsdl2js.bat ExampleService.wsdl
> {code} 
> generates invalid ExampleService.js:
> {code}
> //..
> function X1_RequestParam () {
>     this.typeMarker = 'X1_RequestParam';
>     this._input-parameter = '';
> }
> //..
> {code}
> 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. :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira