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 Shantanu Sen <ss...@pacbell.net> on 2004/11/06 05:54:29 UTC
question on a change in org.apache.axis.message.SOAPBody.getFirstBody
I have the following issue with the current (Axis1.2
RC1) version of this method.
If the SOAP body looks like this:
<soapenv:Body
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>
the call.invoke throws the following exception
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
This is because there of the following change in rev
1.51:
------------
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
parent
-----------
In version 1.50, the method looks like this:
======
SOAPBodyElement getFirstBody() throws AxisFault
{
if (bodyElements.isEmpty())
return null;
return
(SOAPBodyElement)bodyElements.elementAt(0);
}
=========
In version 1.51 it looks like this:
=====
SOAPBodyElement getFirstBody() throws AxisFault
{
List bodyElements = getChildren();
return (bodyElements == null) ?
null :
(SOAPBodyElement)bodyElements.get(0);
}
======
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?
Thanks,
Shantanu Sen
Re: question on a change in org.apache.axis.message.SOAPBody.getFirstBody
Posted by Davanum Srinivas <da...@gmail.com>.
looks like this has been fixed in latest cvs.
thanks,
dims
On Fri, 5 Nov 2004 20:54:29 -0800 (PST), Shantanu Sen <ss...@pacbell.net> wrote:
> I have the following issue with the current (Axis1.2
> RC1) version of this method.
>
> If the SOAP body looks like this:
>
> <soapenv:Body
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>
>
> the call.invoke throws the following exception
>
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>
> This is because there of the following change in rev
> 1.51:
> ------------
> 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
> parent
>
> -----------
> In version 1.50, the method looks like this:
>
> ======
> SOAPBodyElement getFirstBody() throws AxisFault
> {
> if (bodyElements.isEmpty())
> return null;
>
> return
> (SOAPBodyElement)bodyElements.elementAt(0);
> }
> =========
>
> In version 1.51 it looks like this:
>
> =====
> SOAPBodyElement getFirstBody() throws AxisFault
> {
> List bodyElements = getChildren();
> return (bodyElements == null) ?
> null :
> (SOAPBodyElement)bodyElements.get(0);
> }
> ======
>
> 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?
>
> Thanks,
> Shantanu Sen
>
>
--
Davanum Srinivas - http://webservices.apache.org/~dims/