axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shantanu Sen <>
Subject question on a change in org.apache.axis.message.SOAPBody.getFirstBody
Date Sat, 06 Nov 2004 04:54:29 GMT
I have the following issue with the current (Axis1.2
RC1) version of this method.

If the SOAP body looks like this:


the call.invoke throws the following exception

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

This is because there of the following change in rev
Revision 1.51 - (view) (download) (annotate) - [select
for diffs]
Tue Jun 22 17:42:50 2004 UTC (4 months, 2 weeks ago)
by gawor
Branch: MAIN
Changes since 1.50: +105 -87 lines
Diff to previous 1.50 (colored)

SAAJ API updates, makes SOAPBody/SOAPHeader impl more
consistent, setParent() removes a child from previous
parent, and setDirty() propagates the flag to the

In version 1.50, the method looks like this:

 SOAPBodyElement getFirstBody() throws AxisFault
        if (bodyElements.isEmpty())
            return null;

In version 1.51 it looks like this:

SOAPBodyElement getFirstBody() throws AxisFault
        List bodyElements = getChildren();
        return (bodyElements == null) ? 
            null :

Basically it does not check for a empty bodyElements
and return null.

Looks like a bug to me. Does anyone know of any
specific reason why this is not a bug?

Shantanu Sen

View raw message