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 "Full Name (JIRA)" <ji...@apache.org> on 2007/03/22 09:57:32 UTC

[jira] Created: (AXIS2-2366) Endless loop during serialization

Endless loop during serialization
---------------------------------

                 Key: AXIS2-2366
                 URL: https://issues.apache.org/jira/browse/AXIS2-2366
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: adb
    Affects Versions: nightly
            Reporter: Full Name
            Priority: Blocker


During SOAP transmission, ADB's beans are serialized. If a namespace prefix is already used, a new one is generated with this method:

private java.lang.String registerPrefix(..) {
..

while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
   prefix = createPrefix();
} 
...
}


private java.lang.String createPrefix() {
                return "ns" + (int)Math.random();
}
 
It will always return "ns0", because Math.random return a value betwen 0.0and < 1. Should be fixed IMHO. 

-- 
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] Assigned: (AXIS2-2366) Endless loop during serialization

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

Deepal Jayasinghe reassigned AXIS2-2366:
----------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

> Endless loop during serialization
> ---------------------------------
>
>                 Key: AXIS2-2366
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2366
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: nightly
>            Reporter: Full Name
>         Assigned To: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> During SOAP transmission, ADB's beans are serialized. If a namespace prefix is already used, a new one is generated with this method:
> private java.lang.String registerPrefix(..) {
> ..
> while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
>    prefix = createPrefix();
> } 
> ...
> }
> private java.lang.String createPrefix() {
>                 return "ns" + (int)Math.random();
> }
>  
> It will always return "ns0", because Math.random return a value betwen 0.0and < 1. Should be fixed IMHO. 

-- 
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-2366) Endless loop during serialization

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

Full Name commented on AXIS2-2366:
----------------------------------

Just tested latest nightly builds. Works smoothly now. :-) 

Thank you for your fast response! Keep up the good work!


Cheers!

Christoph

> Endless loop during serialization
> ---------------------------------
>
>                 Key: AXIS2-2366
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2366
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: nightly
>            Reporter: Full Name
>         Assigned To: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> During SOAP transmission, ADB's beans are serialized. If a namespace prefix is already used, a new one is generated with this method:
> private java.lang.String registerPrefix(..) {
> ..
> while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
>    prefix = createPrefix();
> } 
> ...
> }
> private java.lang.String createPrefix() {
>                 return "ns" + (int)Math.random();
> }
>  
> It will always return "ns0", because Math.random return a value betwen 0.0and < 1. Should be fixed IMHO. 

-- 
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-2366) Endless loop during serialization

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483110 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-2366:
-----------------------------------------------------

Can you have a look at with the nightly builds? 

> Endless loop during serialization
> ---------------------------------
>
>                 Key: AXIS2-2366
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2366
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: nightly
>            Reporter: Full Name
>            Priority: Blocker
>
> During SOAP transmission, ADB's beans are serialized. If a namespace prefix is already used, a new one is generated with this method:
> private java.lang.String registerPrefix(..) {
> ..
> while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
>    prefix = createPrefix();
> } 
> ...
> }
> private java.lang.String createPrefix() {
>                 return "ns" + (int)Math.random();
> }
>  
> It will always return "ns0", because Math.random return a value betwen 0.0and < 1. Should be fixed IMHO. 

-- 
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-2366) Endless loop during serialization

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

Amila Chinthaka Suriarachchi resolved AXIS2-2366.
-------------------------------------------------

    Resolution: Fixed

use a util class to genere the prefixes

> Endless loop during serialization
> ---------------------------------
>
>                 Key: AXIS2-2366
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2366
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: nightly
>            Reporter: Full Name
>         Assigned To: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> During SOAP transmission, ADB's beans are serialized. If a namespace prefix is already used, a new one is generated with this method:
> private java.lang.String registerPrefix(..) {
> ..
> while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
>    prefix = createPrefix();
> } 
> ...
> }
> private java.lang.String createPrefix() {
>                 return "ns" + (int)Math.random();
> }
>  
> It will always return "ns0", because Math.random return a value betwen 0.0and < 1. Should be fixed IMHO. 

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