You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by WAJSBERG Julien RD-BIZZ <ju...@francetelecom.com> on 2004/11/15 19:03:00 UTC

"invalid QName local part" using Message-style client, with DOM1 Document

Hi,

I'm trying to use the message-style interface as a client to an existing 
web service.
I created a simple Document using DOM1 functions like :

            Element stringElement = doc.createElement("string");

(doc is a Document)

The Element created by DOM1's createElement has a null local part.
Thus, the QName constructor throws an exception.

Maybe a fix could be in MessageElement.java, replacing line 2046 :

child.getLocalName()

with :

(child.getLocalName() == null) ? (child.getTagName()) : 
(child.getLocalName())

(getTagName or getNodeName, I'm not sure)

A workaround is to use createElementNS.
BTW, I'm not sure that elements without namespaces are legal in XML.

Kind regards,
-- 
Julien