[ 
https://issues.apache.org/jira/browse/MUSE-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12482837
 ] 

Andrew Eberbach commented on MUSE-214:
--------------------------------------

One approach could be to define a standard utility method that will take a 
proposed name and perform a check and mapping. Some names shouldn't be allowed 
(such as names that are the same as names in the Capability or Client super 
classes) in which case this method would return null or throw an exception. For 
the other names, there would be a consistent way to remove or replace offending 
characters so that we conform to the Java syntax.  Finally there should be some 
logic that keeps track of unintentional collisions such as my-function and 
my?function being both mapped ot my_function.

This utility method would wrap the existing Method object creation code in 
wsdl2java and the code that does the translation in the runtime. 

> XML element name could lead to invalid operation generation.
> ------------------------------------------------------------
>
>                 Key: MUSE-214
>                 URL: https://issues.apache.org/jira/browse/MUSE-214
>             Project: Muse
>          Issue Type: Bug
>          Components: Tooling - Code Generation
>    Affects Versions: 2.2.0
>         Environment: Ubuntu Edgy 6.10, JDK 1.5.0
>            Reporter: Jose Antonio
>         Assigned To: Dan Jemiolo
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> Some valid elements named as <element name="this-is-valid"> could lead to the 
> generation of invalid function names like
> public void this-is-valid() throws Exception
> Which is not a valid java function name. When dealing with such names, upper 
> dashes should be substituted with lower dashes so it generates a valid name:
> public void this_is_valid()
> I've found this while dealing with a wsdl that I have no control over it, so 
> I cannot change the element's format because it's from a server that's 
> deployed and is going to invoke me with that message.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to