axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Changshin Lee <iasan...@gmail.com>
Subject Re: [Axis2] Question about Axis 2 SAAJ implementation
Date Tue, 14 Feb 2006 03:10:59 GMT

2006. 02. 14, 오전 8:15, R J Scheuerle Jr 작성:

>
> Consider the following code from the SOAPElementTest:
>
> final String value = "foo";
> soapElem.addTextNode(value);
>
> I should be able to get the javax.xml.soap.Node using several  
> different accessors (getChildElements(), getChildNodes(),  
> getFirstChild()), etc.
>
> ------------------------------
> Problem 1:
> Object x = soapElem.getChildElements().next();
> Object y = soapElem.getChildElements().next();
>
> In this case, x and y are both javax.xml.soap.Node objects (good);  
> however they are not the same object. The iterator is constructing  
> new objects each time it is invoked. This is not efficient and  
> incorrect.
soapElem.getChildElements() returns an Iterator, therefore its first  
next() and second next() should return different objects. Please make  
sure that Iterator.next() is not a plain accessor but designed to use  
traversing over collections.

>
> -------------------------------
> Problem 2
> Object z1 = soapElem.getChildNodes().item(0);
> Object z2 = soapElem.getFirstChild();
>
> In both cases, the returned object is not an SAAJ  
> javax.xml.soap.Node. This also seems to be a violation of the  
> specification.
Could you tell us exactly what type is z1 and z2? I also guess  those  
returned objects belong to OM package, not DOOM package.

Thanks,

Ias
>
> ===========================
> The proposed solution is to clearly separate the SAAJ  
> implementation from the "backing" axis2.om.impl.dom tree.
> The SAAJ layer is a semantic view of the underlying DOM model. Thus  
> it should always return SAAJ objects when its methods are invoked.
>
>
> Comments ?
>
> Rich Scheuerle
> Senior Developer
> IBM WebSphere Web Services Engine & Tooling
> 512-838-5115 (IBM TL 678-5115)


Mime
View raw message