axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Chinthaka Suriarachchi (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2-2468) Handling of names with '-' symbol
Date Fri, 15 Jun 2007 02:31:26 GMT

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

Amila Chinthaka Suriarachchi resolved AXIS2-2468.
-------------------------------------------------

    Resolution: Fixed

fixed the issue. used the javaName generating the variable name

> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message