axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From R J Scheuerle Jr <>
Subject [Axis2] Question about Axis 2 SAAJ implementation
Date Mon, 13 Feb 2006 23:15:33 GMT

Consider the following code from the SOAPElementTest:

 final String value = "foo";

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" 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)
View raw message