please open a new JIRA bug *WITH* a test case and a "diff -u" patch
against latest CVS.

thanks,
dims


On Wed, 29 Dec 2004 11:29:23 +0530, Devang Mehta <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> This is further to the issue that SAAJ 1.2. is not yet implemented properly.
> 
> The MessageElement Class file has two methods
> 1. public Attr getAttributeNode(String attrName)
> 2. public Attr getAttributeNodeNS(String namespace, String localName)
> 
> Both of the above methods are returning null. and also have comments that
> SAAJ1.2 not yet implemented.
> 
> The above two methods could be replaced by the following code
> 
> public Attr getAttributeNode(String name) {
>     int Index = attributes.getIndex(name);
>     if(Index < 0){ // not found
>         return null;
>     }
>     NamedNodeMapImpl l_objAttributes =
> (NamedNodeMapImpl)this.getAttributes();
>     Attr l_objAttr = (Attr)l_objAttributes.getNamedItem(name);
>     return l_objAttr;
> }
> 
> public Attr getAttributeNodeNS(String namespaceURI, String localName) {
>     int Index = attributes.getIndex(namespaceURI,localName);
>     if(Index < 0){ // not found
>         return null;
>     }
>     NamedNodeMapImpl l_objAttributes =
> (NamedNodeMapImpl)this.getAttributes();
>     Attr l_objAttr =
> (Attr)l_objAttributes.getNamedItemNS(namespaceURI,localName);
>     return l_objAttr;
> }
> 
> May be Mark could verify my implementation and do the necessary changes in
> the Source or atleast verify the same and reply back.
> 
> Any Comments are welcome.
> 
> Regards
> Devang
> P.S. Do i need to open a new JIRA bug for the same. I was thinking if this
> could be accomodated with the existing Bug???
> 
> 
> -----Original Message-----
> From: Mark D. Hansen [mailto:[EMAIL PROTECTED]
> Sent: Saturday, December 04, 2004 1:05 AM
> To: [email protected]; [EMAIL PROTECTED]
> Subject: RE: SAAJ 1.2 not implemented yet ?!?!
> 
> OK - I am working on this and will post to JIRA when I have something.
> It seems to be non-trivial and involves changes to several classes in
> the org.apache.axis.message package.
> 
> If any developers are working on major changes to classes in the
> org.apache.axis.message package, please let me know.
> 
> If any of you developers can give me a quick rundown of problems you are
> aware of with the SAAJ implementation (specifically DOM interfaces
> inherited via NodeImpl and MessageElement) please let me know.
> 
> What is the best way to test this package to make sure my changes don't
> break anything?
> 
> -- Mark
> 
> > -----Original Message-----
> > From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 01, 2004 3:48 PM
> > To: [email protected]
> > Subject: Re: SAAJ 1.2 not implemented yet ?!?!
> >
> >
> > I can tell u where to start...Start with a junit test case (say
> > http://cvs.apache.org/viewcvs.cgi/*checkout*/ws-axis/java/test
> > /saaj/TestText.java),
> > then make changes to it which are similar to what you want to do (run
> > a xsl on the dom Element? and/or exercise the getAttributeNode method
> > itself) then see if you can come up with a patch (or) just open a jira
> > bug report with just the test case itself.
> >
> > thanks,
> > dims
> >
> >
> > On Wed, 1 Dec 2004 14:12:58 -0500, Mark D. Hansen
> > <[EMAIL PROTECTED]> wrote:
> > > I just wasted a day trying to figure out what was causing a
> > Xalan NPE deep inside my Axis application.  Since I'm casting
> > MessageElements to org.w3c.dom.Element all the time, I am
> > supposing the SAAJ 1.2 is implemented.
> > >
> > > After posting for help to the Xalan mail list (and wasting
> > the time of some good people who tried to help me), I decided
> > to take a closer look at what was going on with
> > MessageElement.  Digging into the source code, I find this:
> > >
> > >     /**
> > >      * This unimplemented operation is meand to return an
> > attribute as a node
> > >      * @see org.w3c.dom.Element#getAttributeNode(String)
> > >      * @param attrName
> > >      * @return null, always.
> > >      * @todo Fix this for SAAJ 1.2 Implementation. marked
> > as deprecated to warn people
> > >      * it is broken
> > >      * @deprecated this is not implemented
> > >      */
> > >     public Attr getAttributeNode(String attrName) {
> > >         return null;
> > >     }
> > >
> > > So SAAJ 1.2 is no longer working!?!  I see that the method
> > is marked as deprecated, but to have saved myself the lost
> > day of work and aggrevation, I would have had to compile the
> > src and actually pay attention to the deprecation warnings.
> > >
> > > Of course, I should have read the release-notes.html for
> > RC2, so I go there afterward to see what else I missed.  The
> > only thing about SAAJ that I find is this:
> > >
> > > (in bold) "This version has passed the JAX-RPC 1.1 and SAAJ
> > 1.2 TCKs"
> > >
> > > I'm sure that is true, but kind of misleading given the
> > state of the getAttributeNode(...) methods in MessageElement.
> > >
> > > I hate to flame like this, because I appreciate what a huge
> > amount of work it is to keep Axis moving forward.  Also, I'd
> > like to submit a patch to fix this stuff - but I don't
> > understand the MessageElement class well enough to do that.
> > So, I guess that I am just frustrated.  I'd like to keep
> > using Axis, but stuff like this is really getting me down.
> > >
> >
> >
> > --
> > Davanum Srinivas - http://webservices.apache.org/~dims/
> >
> 
> http://www.patni.com
> World-Wide Partnerships. World-Class Solutions.
> _____________________________________________________________________
> 
> This e-mail message may contain proprietary, confidential or legally
> privileged information for the sole use of the person or entity to
> whom this message was originally addressed. Any review, e-transmission
> dissemination or other use of or taking of any action in reliance upon
> this information by persons or entities other than the intended
> recipient is prohibited. If you have received this e-mail in error
> kindly delete  this e-mail from your records. If it appears that this
> mail has been forwarded to you without proper authority, please notify
> us immediately at [EMAIL PROTECTED] and delete this mail.
> _____________________________________________________________________
> 
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

Reply via email to