Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 35768 invoked from network); 16 May 2005 16:54:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 May 2005 16:54:03 -0000 Received: (qmail 61527 invoked by uid 500); 16 May 2005 14:25:17 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 61411 invoked by uid 500); 16 May 2005 14:25:14 -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 61228 invoked by uid 99); 16 May 2005 14:25:12 -0000 X-ASF-Spam-Status: No, hits=3.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,FORGED_YAHOO_RCVD X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from web31711.mail.mud.yahoo.com (HELO web31711.mail.mud.yahoo.com) (68.142.201.191) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 16 May 2005 07:25:09 -0700 Received: (qmail 26410 invoked by uid 60001); 16 May 2005 14:24:44 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=s6JEtl3d+bZZfxP1zUHHxY7LiyYtU0cdOSnnf+otpIL9lW3/StvgLDCc9VJ4mqJLDaVi6a65vaPh+zY6ITE+zNpubPqYcjZ5+k8m0UeldtBbk6iLhDos9W327s3Bx2RCF6Aacv4CX7/ux4P6tKhnnqoIpwXR0tmovBQeBV+z1nY= ; Message-ID: <20050516142444.26408.qmail@web31711.mail.mud.yahoo.com> Received: from [203.94.95.53] by web31711.mail.mud.yahoo.com via HTTP; Mon, 16 May 2005 07:24:44 PDT Date: Mon, 16 May 2005 07:24:44 -0700 (PDT) From: Dasarath Weeratunge Subject: Re: [Axis2] Proposal - DOM Implementation for Axis2 To: axis-dev@ws.apache.org, Ruchith Fernando In-Reply-To: 6667 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --- Ruchith Fernando wrote: > Hi All, > > In implementing WS-Security capabilities on Axis 2.0 > we will have to > convert the OM to DOM and provide the complete > SOAPEnvelope as a DOM > implementation. > The following changes and additions are proposed to > the OM > implementation to support this. > > 1.) The org.w3c.dom.* interfaces will be implemented > extending the OM > Impls. (org.apache.axis.dom.*) > Also there will be an implementation of > org.apache.axis.soap.* > interfaces extending from the DOMImpls. > (org.apache.axis.dom.soap.*) > In this situation we will have to change some of the > method names in > the OM interfaces. E.g.: getNextSibling, > getPreviousSibling in OMNode Please reconsider this decision. I thought we had decided to write a shim-DOM impl on *top* of OM. If we keep on changing things here an there we are again going soon find our selves in a mess- worst still we just concluded a review of that part of the OM API. eek! no thanks please. --dasarath > > 2.) A DOMSOAPFactory implementing the SOAPFactory > will be introduced > to provide the DOM_SOAP impls. to the > StAXSOAPModelBuilder > > 3.) How to switch the builder when the security > related handlers takes over: > > Since the security handlers depend on the DOM > interfaces, they cannot > work with pure OM instances. They expect DOM impls. > So now there's a > need to switch from normal OM factory to DOM > factory. Therefore > following method is proposed to to handle this. > > There will be some processing of the SOAPEnvelope > before it reaches > the security handlers. > And there will be a reference to this partially > built SOAPEnvelope in > the MessageContext object. This SOAPEnvelope > consists only of pure OM > based elements (org.apache.axis.soap.*). Now we get > the pull parser > from the SOAPEvelope we have through the > OMStAXWrapper (This is used > to get the pull events from OMElements, > irrespectiveof their build > state) > > PullParser pp = > messageContext.getSOAPEnvelope().getPullParser() > //Returns a pp pointing to the start of the document > > Then we create a new StAXSOAPModelBuilder passing > the DOMSOAPFactory > together with the pull parser returned from the > SOAPEnvelope. > > StAXSOAPModelBuilder builder = new > StAXSOAPModelBuilder(pp, new DOMFactory()) > > At this point the SOAPEnvelope reference in the > message context is > pointing to the older pure OM based SOAPEnvelope. > This will have to reassigned to the new OM+DOM based > SOAPEnvelope, as > shown below: > > messageContext.setEnvelope(builder.getDocumentElement()); > // This will > set the reference to the new DOMSOAPEnvelopeImpl > > Therefore to achieve this we need to have remember > the following point > as a best practise : DON'T POINT TO THE SOAP > ENVELOPE OF A MESSAGE, > JUST POINT TO THE MESSAGE_CONTEXT ONLY. > > I think this is one of the best use cases which > shows the beauty of > the Factory and Builder concept used in Axis2 - OM > design :) > > Thanks, > Ruchith > Discover Yahoo! Use Yahoo! to plan a weekend, have fun online and more. Check it out! http://discover.yahoo.com/