You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Donald Woods <dr...@yahoo.com> on 2007/01/04 18:13:13 UTC

Re: Axis Implementation of XML DOM

Geronimo or Axis version being used?


-Donald


Phani Madgula wrote:
> Hi
> There is a problem in Axis implementation of Comment.getNodeType(). I 
> have the following code that recreates the issue.
>  
> *
> 
> import
> 
> * javax.xml.namespace.QName;*
> **import* javax.xml.soap.Node ;*
> **import* org.apache.axis.message.SOAPBodyElement;*
> **import * org.w3c.dom.Comment;*
> 
> **public* *class* AxisXMLCommentTest {*
> **public* *static* *void * main(String args[]) {*
> *SOAPBodyElement sb = *new* SOAPBodyElement(* new* 
> QName("http://www.phanibalaji.com","test"))*;
> * Comment c = sb.getOwnerDocument().createComment("TEST");*
> *sb.appendChild(c);*
> ** if* (c.getNodeType() != Node./COMMENT_NODE/) {*
> *System./ err/.println("Node is of diffe*rent type*"); *
> *} *else* {*
>    *System./err/.println("Success"); *
> * }
> 
> }
> 
> }
> 
> I am getting the condition *if* (c.getNodeType() != Node./COMMENT_NODE/) 
> as "true". But, it must be false.
> Can anybody comment?
> 
> Regards
> Phani
>