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 "Chris Gibbs (JIRA)" <ji...@apache.org> on 2007/05/30 16:12:15 UTC

[jira] Created: (AXIS2-2733) java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang

java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang
--------------------------------------------------------------------------------------------------

                 Key: AXIS2-2733
                 URL: https://issues.apache.org/jira/browse/AXIS2-2733
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: adb
    Affects Versions: 1.2
         Environment: Win XP SP2, Java 6 U1
            Reporter: Chris Gibbs


I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:

<runners xsi:type="n2:ArrayOfRunner" /> 

I'm pretty sure this violates the WSDL spec -  instead it should be the following:

<runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>

In case you are wondering, the relevant bit from the Betfair WSDL is this:

<xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 

I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.

The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 

Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)

-- 
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-2733) java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang

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

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

As I saw this is not a bug with ADB. the problem is you getting an invalid xml according to the wsdl.  But I agree with you throwing Runtime Exception always is not a good idea as well. The reason for this is we donot have to add any thing to method signature when throwing runtime exceptins. There is a jira for this and i'll work on it. ADB supports both 1,0 for boolean values.

> java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2733
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2733
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.2
>         Environment: Win XP SP2, Java 6 U1
>            Reporter: Chris Gibbs
>
> I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:
> <runners xsi:type="n2:ArrayOfRunner" /> 
> I'm pretty sure this violates the WSDL spec -  instead it should be the following:
> <runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>
> The relevant bit from the Betfair WSDL is this:
> <xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 
> I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.
> The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 
> Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)

-- 
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-2733) java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang

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

Chris Gibbs commented on AXIS2-2733:
------------------------------------

https://api.betfair.com/global/v3/BFGlobalService.wsdl

> java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2733
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2733
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.2
>         Environment: Win XP SP2, Java 6 U1
>            Reporter: Chris Gibbs
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:
> <runners xsi:type="n2:ArrayOfRunner" /> 
> I'm pretty sure this violates the WSDL spec -  instead it should be the following:
> <runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>
> The relevant bit from the Betfair WSDL is this:
> <xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 
> I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.
> The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 
> Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)

-- 
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-2733) java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang

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

Srinath Perera updated AXIS2-2733:
----------------------------------

    Priority: Blocker  (was: Major)

> java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2733
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2733
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.2
>         Environment: Win XP SP2, Java 6 U1
>            Reporter: Chris Gibbs
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:
> <runners xsi:type="n2:ArrayOfRunner" /> 
> I'm pretty sure this violates the WSDL spec -  instead it should be the following:
> <runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>
> The relevant bit from the Betfair WSDL is this:
> <xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 
> I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.
> The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 
> Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)

-- 
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-2733) java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang

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

Chris Gibbs updated AXIS2-2733:
-------------------------------

    Description: 
I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:

<runners xsi:type="n2:ArrayOfRunner" /> 

I'm pretty sure this violates the WSDL spec -  instead it should be the following:

<runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>

The relevant bit from the Betfair WSDL is this:

<xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 

I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.

The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 

Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)

  was:
I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:

<runners xsi:type="n2:ArrayOfRunner" /> 

I'm pretty sure this violates the WSDL spec -  instead it should be the following:

<runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>

In case you are wondering, the relevant bit from the Betfair WSDL is this:

<xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 

I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.

The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 

Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)


> java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2733
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2733
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.2
>         Environment: Win XP SP2, Java 6 U1
>            Reporter: Chris Gibbs
>
> I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:
> <runners xsi:type="n2:ArrayOfRunner" /> 
> I'm pretty sure this violates the WSDL spec -  instead it should be the following:
> <runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>
> The relevant bit from the Betfair WSDL is this:
> <xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 
> I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.
> The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 
> Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)

-- 
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-2733) java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang

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

Amila Chinthaka Suriarachchi resolved AXIS2-2733.
-------------------------------------------------

    Resolution: Fixed

already fixed with 1.2

> java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2733
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2733
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.2
>         Environment: Win XP SP2, Java 6 U1
>            Reporter: Chris Gibbs
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:
> <runners xsi:type="n2:ArrayOfRunner" /> 
> I'm pretty sure this violates the WSDL spec -  instead it should be the following:
> <runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>
> The relevant bit from the Betfair WSDL is this:
> <xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 
> I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.
> The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 
> Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)

-- 
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-2733) java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang

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

Chris Gibbs commented on AXIS2-2733:
------------------------------------

Apologies - I just tried again with Axis2 1.2 and the generated code appears to be correct for all classes. I think I ran a "diff" on the code generated with Axis2 1.2 and Axis2 1.1.1 and didn't look close enough at the results :S 

Axis2 1.1.1 was definitely generating just the 'if("true".equals ...' case, so I guess it must have been fixed in Axis2 1.2

> java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2733
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2733
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.2
>         Environment: Win XP SP2, Java 6 U1
>            Reporter: Chris Gibbs
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:
> <runners xsi:type="n2:ArrayOfRunner" /> 
> I'm pretty sure this violates the WSDL spec -  instead it should be the following:
> <runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>
> The relevant bit from the Betfair WSDL is this:
> <xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 
> I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.
> The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 
> Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)

-- 
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-2733) java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang

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

Davanum Srinivas updated AXIS2-2733:
------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

> java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2733
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2733
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.2
>         Environment: Win XP SP2, Java 6 U1
>            Reporter: Chris Gibbs
>            Assignee: Amila Chinthaka Suriarachchi
>
> I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:
> <runners xsi:type="n2:ArrayOfRunner" /> 
> I'm pretty sure this violates the WSDL spec -  instead it should be the following:
> <runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>
> The relevant bit from the Betfair WSDL is this:
> <xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 
> I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.
> The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 
> Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)

-- 
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-2733) java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang

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

Chris Gibbs commented on AXIS2-2733:
------------------------------------

I'm afraid ADB for Axis 1.2 does not seem to support 1,0 for boolean values - the Betfair API returns 1/0 instead of true/false and I had to a find & replace across all the generated ADB code to get it to work:

if("true".equals ... -> if ("1".equals ...
if(!"true".equals ...  -> if(!"1".equals ...

By default, ADB only looks for "true".

> java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2733
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2733
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.2
>         Environment: Win XP SP2, Java 6 U1
>            Reporter: Chris Gibbs
>
> I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:
> <runners xsi:type="n2:ArrayOfRunner" /> 
> I'm pretty sure this violates the WSDL spec -  instead it should be the following:
> <runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>
> The relevant bit from the Betfair WSDL is this:
> <xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 
> I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.
> The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 
> Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)

-- 
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-2733) java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang

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

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

did you try with Axis2 1.2? I tried with the current code base in the trunk (i.e you will get it if you get a nightly build) and here is the pice of code for RetrievePersonalLIMBMessage.

if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){
                                    
                                    java.lang.String content = reader.getElementText();
                                    
                                              object.setMessageId(
                                                    org.apache.axis2.databinding.utils.ConverterUtil.convertToInt(content));
                                            
                                       }

what is the class you not getting this correctly?

> java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2733
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2733
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.2
>         Environment: Win XP SP2, Java 6 U1
>            Reporter: Chris Gibbs
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:
> <runners xsi:type="n2:ArrayOfRunner" /> 
> I'm pretty sure this violates the WSDL spec -  instead it should be the following:
> <runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>
> The relevant bit from the Betfair WSDL is this:
> <xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 
> I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.
> The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 
> Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)

-- 
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-2733) java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang

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

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

can you attach your wsdl, adb infact supports 1/0 values for the boolean. So I think we missed some point. 

> java.lang.RuntimeException thrown from parsing incorrect XML causes the entire Axis thread to hang
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2733
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2733
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.2
>         Environment: Win XP SP2, Java 6 U1
>            Reporter: Chris Gibbs
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> I'm using the Betfair API and Axis 2 in ADB mode, and have discovered that RuntimeExceptions are being thrown when perhaps they shouldn't. The offending XML is:
> <runners xsi:type="n2:ArrayOfRunner" /> 
> I'm pretty sure this violates the WSDL spec -  instead it should be the following:
> <runners xsi:type="n2:ArrayOfRunner" xsi:nil="1"/>
> The relevant bit from the Betfair WSDL is this:
> <xsd:element name="runners" nillable="true" type="types:ArrayOfRunner" /> 
> I've traced through the ADB-generated code and it leads to a RuntimeException if the tag is empty but xsi:nil="1" is not present. Is this against the design spec for Axis? I was previously using Axis in XMLBeans mode, which I believe is more lenient in handling issues like this. XMLBeans also does not mind if boolean values are set to "true" or "1", whereas ADB only works when boolean values are set to "true" - this also might be against the spec.
> The main issue is that whenever a RuntimeException is thrown, it basically causes some part of Axis to completely hang, meaning that no further calls to the Betfair API from the same thread can be made, even though I am catching the RuntimeException. This surely isn't intended in the Axis 2 design? 
> Betfair will probably issue a fix for this eventually, but it's a very serious issue and I can't think of an easy workaround at the moment (apart from going back to XMLBeans code!)

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