Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 22694 invoked from network); 3 Aug 2005 22:08:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Aug 2005 22:08:54 -0000 Received: (qmail 44426 invoked by uid 500); 3 Aug 2005 22:08:50 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 44398 invoked by uid 500); 3 Aug 2005 22:08:50 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 44384 invoked by uid 99); 3 Aug 2005 22:08:50 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Aug 2005 15:08:38 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 7DF5FE1 for ; Thu, 4 Aug 2005 00:08:35 +0200 (CEST) Message-ID: <802113002.1123106915442.JavaMail.jira@ajax.apache.org> Date: Thu, 4 Aug 2005 00:08:35 +0200 (CEST) From: "Davanum Srinivas (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS-2163) Horrendous implementation of DOM APIs, especially those dealing with Attribute Nodes, in org.apache.axis.message In-Reply-To: <1119870211.1123098336070.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/AXIS-2163?page=comments#action_12317545 ] Davanum Srinivas commented on AXIS-2163: ---------------------------------------- Prasad, Thanks for the patch. Can i please ask you to run "ant clean all-tests" after applying your patch to Axis CVS version? Yes, it's broken. Yes, we need help. thanks, dims > Horrendous implementation of DOM APIs, especially those dealing with Attribute Nodes, in org.apache.axis.message > ---------------------------------------------------------------------------------------------------------------- > > Key: AXIS-2163 > URL: http://issues.apache.org/jira/browse/AXIS-2163 > Project: Apache Axis > Type: Bug > Versions: 1.2 > Environment: Sun JDK 1.5.0-b64 > Reporter: Prasad A. Chodavarapu > Priority: Blocker > Attachments: axis-dom.patch > > There are two classes of problems in the implementation of > W3C DOM APIs in org.apache.axis.message. > 1) Easy one first: Tons of bugs in code dealing with > attribute creation and retrieval using W3C DOM APIs. Two > sub-classes of problems here. > a) Mistakes easy to spot by simple visual inspection of > the code. Mistakes like: > if(namespaceURI.equals(attr.getNamespaceURI()) && > namespaceURI.equals(attr.getLocalName())){ > b) Terrible confusion over how to represent the absence > of a namespace. Mix up of three different values: > null, "" and "intentionalNullURI". > 2) Real problem: SAAJ mandates that implementations > concurrently provide two different DOM APIs - a SOAP > specific one and the general purpose W3C DOM API. > > W3C DOM APIs are awful in quite a few respects and > definitely, it's a lot of work to implement all the W3C > mandated methods. But implementing them correctly is > important because generic XML infrastructure such as > XPath interpreters and (Apache) XML Security assume > W3C DOM. > The problem is that Axis takes a bad shortcut that really > hurts anyone depending on other generic XML libs that > assume a W3C DOM. Instead of implementing all of the W3C DOM > APIs, org.apache.axis.message.SOAPDocumentImpl uses a > second dummy W3C DOM Document, to "delegate" some (but > not all) of the W3C DOM API calls. > While ELEMENT nodes seem to be implemented using the > MessageElement class (tying them into the SOAP specific > DOM), attribute nodes are created in a dummy W3C DOM > Document. > This does not work because, when some one > invokes a method like getAttributes() (defined in > NodeImpl, a super class of MessageElement - an > implementation of SAAJ SOAPElement), the Attribute nodes > found in the returned NamedNodeMap are not from the > same DOM in which the element nodes are defined! > This plays havoc with XPath interpreters and XML Security > libraries. > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira