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.
-------------------------------
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.
===========================
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)
- [Axis2] Question about Axis 2 SAAJ implementation R J Scheuerle Jr
- Re: [Axis2] Question about Axis 2 SAAJ implementa... Changshin Lee
- Re: [Axis2] Question about Axis 2 SAAJ implementa... Davanum Srinivas
- Re: [Axis2] Question about Axis 2 SAAJ implementa... Afkham Azeez
- Re: [Axis2] Question about Axis 2 SAAJ implem... Afkham Azeez
- Re: [Axis2] Question about Axis 2 SAAJ implem... R J Scheuerle Jr
- Re: [Axis2] Question about Axis 2 SAAJ im... Davanum Srinivas
- Re: [Axis2] Question about Axis 2 SAAJ im... Afkham Azeez
- Re: [Axis2] Question about Axis 2 SAA... R J Scheuerle Jr
- Re: [Axis2] Question about Axis ... Ruchith Fernando
- Re: [Axis2] Question about Axis ... Sanjiva Weerawarana
