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 "Jose Antonio (JIRA)" <ji...@apache.org> on 2007/04/04 10:29:32 UTC

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

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


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


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

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Jose Antonio (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jose Antonio updated AXIS2-2468:
--------------------------------

    Attachment: reference-1.1.xsd

The file causing problems

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


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

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ 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


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

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ 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


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

Posted by "Swati Sinha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493562 ] 

Swati Sinha commented on AXIS2-2468:
------------------------------------

Jose, 
Could you please upload the wsdl/xsd in question?


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


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

Posted by "Jose Antonio (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jose Antonio updated AXIS2-2468:
--------------------------------

    Attachment: wsctx.xsd

Required schema

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


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

Posted by "Jose Antonio (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jose Antonio updated AXIS2-2468:
--------------------------------

    Attachment: wsctx.wsdl

Wsdl file

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


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

Posted by "Jose Antonio (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jose Antonio updated AXIS2-2468:
--------------------------------

    Attachment: oasis-200401-wss-wssecurity-utility-1.0.xsd

Also required to generate code

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