You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Phani Madgula <ph...@gmail.com> on 2006/12/07 08:56:29 UTC

Axis Implementation of XML DOM

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

Re: Axis Implementation of XML DOM

Posted by Donald Woods <dr...@yahoo.com>.
Have you opened a bug report in the AXIS v1.x JIRA?
	https://issues.apache.org/jira/browse/AXIS

-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
> 

Re: Axis Implementation of XML DOM

Posted by Donald Woods <dr...@yahoo.com>.
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
>