You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Davanum Srinivas (JIRA)" <ji...@apache.org> on 2007/06/07 05:30:28 UTC

[jira] Updated: (AXIS2-2468) Handling of names with '-' symbol

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

Davanum Srinivas updated AXIS2-2468:
------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

> 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.2
>         Environment: Ubuntu 6.10, Jdk 1.4.2
>            Reporter: Jose Antonio
>            Assignee: Amila Chinthaka Suriarachchi
>         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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org