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

Deepal Jayasinghe updated AXIS2-2468:
-------------------------------------

        Fix Version/s: 1.3
    Affects Version/s:     (was: 1.2)
                       1.3

> Handling of names with '-' symbol
> ---------------------------------
>
>                 Key: AXIS2-2468
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2468
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3
>         Environment: Ubuntu 6.10, Jdk 1.4.2
>            Reporter: Jose Antonio
>            Assignee: Amila Chinthaka Suriarachchi
>             Fix For: 1.3
>
>         Attachments: oasis-200401-wss-wssecurity-utility-1.0.xsd, 
> reference-1.1.xsd, wsctx.wsdl, wsctx.xsd
>
>
> I have a schema with an attribute named 'reference-scheme' and I need to use 
> it in my code. When I try to generate code using ADB I get the following:
> ..............................
>  // handle attribute "reference-scheme"
>                     java.lang.String tempAttribreference-scheme =
>                       reader.getAttributeValue("","reference-scheme");
>                    if (tempAttribreference-scheme!=null){
>                          java.lang.String content = 
> tempAttribreference-scheme;
>                         
>                                                  object.setReferenceScheme(
>                                                     
> org.apache.axis2.databinding.utils.ConverterUtil.convertToAnyURI(tempAttribreference-scheme));
>                                             
>                     } else {
>                        
>                     }
>                     handledAttributes.add("reference-scheme");
>                     
>                     
>                     reader.next();
> .........................
> And that doesn't compile, so when an attribute or element name contains a '-' 
> character, the generated variables should replace it by _ so it generates the 
> following code:
> ......................................
>  // handle attribute "reference-scheme"
>                     java.lang.String tempAttribreference_scheme =
>                       reader.getAttributeValue("","reference-scheme");
>                    if (tempAttribreference_scheme!=null){
>                          java.lang.String content = 
> tempAttribreference_scheme;
>                         
>                                                  object.setReferenceScheme(
>                                                     
> org.apache.axis2.databinding.utils.ConverterUtil.convertToAnyURI(tempAttribreference_scheme));
>                                             
>                     } else {
>                        
>                     }
>                     handledAttributes.add("reference-scheme");
>                     
>                     
>                     reader.next();
> .............................
> That compiles or something similar.

-- 
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