axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Viens, Stephen" <>
Subject Empty default namespace attributes (xmlns="") appear when using: SOAPBody.addDocument
Date Mon, 07 Feb 2005 22:07:05 GMT
I believe I've discovered a bug in the
"addDocument(org.w3c.dom.Document)" method of the javax.xml.SOAPBody
class.  It seems that empty default namespace attributes (xmlns="") are
added to any elements that do not specify a default namespace of their

Before I submit something to JIRA I'd like to make sure that I'm not
just missing something basic. To see the problem yourself all you have
to do is create an "org.w3c.Document" that when written to System.out
looks as follows:

<find_business generic="2.0" xmlns="urn:uddi-org:api_v2"

Then add this "org.w3c.Document" to a "javax.xml.soap.SOAPBody" using
the "addDocument(org.w3c.dom.Document)" method.  When this new SOAP
message is written to System.out the resulting XML looks as follows: 

  <find_business generic="2.0" xmlns="urn:uddi-org:api_v2"
   <businessInfos xmlns="">
	businessKey="4FFA64E0-71A6-11D9-A4E0-CA68EE9CC1F6" xmlns=""/>

Notice the empty default namespace attributes (xmlns="") in the
"businessInfos" and "businessInfo" elements?  This empty default
namespace attribute will appear for every child element of
"find_business" element that does not have an xmlns attribute already.

I've attached some sample code (FindBusiness) that will demonstrate
this.  I'm using Axis 1.2rc2 and I didn't see anything related to this
in JIRA already. Is it possible that I'm building the source
"org.w3c.dom.Document" object incorrectly?


View raw message