Invalid elements in choice causing infinite loop
------------------------------------------------

                 Key: AXIS2-4677
                 URL: https://issues.apache.org/jira/browse/AXIS2-4677
             Project: Axis2
          Issue Type: Bug
          Components: codegen
    Affects Versions: 1.5.1
            Reporter: David Meiklejohn


I've encountered a problem in Axis2 1.5.1 that seems to cause an infinite loop. 
We have various choice elements defined in our WSDL's and it seems that if an 
element that is not expected is supplied to a choice it just hangs indefinitely 
and CPU usage goes up by about 100%.

For example, we have a choice defined as below (simplified):

      <complexType name="ModifyDetails">
            <choice>
                  <element name="status" type="string" />
                  <element name="email" type="string" />
                  <element name="address" type="string " />
                  <element name="reference" type="string " />
            </choice>
      </complexType>

And if we were to send a message containing an extra unexpected element, 
'comment' in this case, the example I described above occurs. The call never 
returns, the client times out, and CPU usage rises to 100% and stays there. 
Subsequent calls make the CPU usage increase further.

    <modifyDetails>
     <status>cancelled</status>
     <comment>Cancelled</comment>
    </modifyDetails>

If I put just plain text in instead of the comment element it just seems to 
silently ignore it but that extra element kills it. Shouldn't it return an 
error of unexpected element or something along those lines?


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to