You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by David Meiklejohn <dm...@iseek.com.au> on 2010/04/07 07:46:35 UTC
Invalid elements in choice causing infinite loop
Hi,
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?
Has anyone encountered this before? Should I lodge a ticket somewhere regarding this problem?
I can't really post our WSDL but I could attempt to replicate it with a dummy service.
Thanks
Re: Invalid elements in choice causing infinite loop
Posted by Andreas Veithen <an...@gmail.com>.
On Wed, Apr 7, 2010 at 07:46, David Meiklejohn <dm...@iseek.com.au> wrote:
> Hi,
>
>
>
> 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?
>
>
>
> Has anyone encountered this before? Should I lodge a ticket somewhere
> regarding this problem?
>
Yes. JIRA [1] is your friend.
[1] https://issues.apache.org/jira/browse/AXIS2
>
> I can't really post our WSDL but I could attempt to replicate it with a
> dummy service.
>
>
>
> Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org