Hi all, > I am not sure whether it is possible to remove the declaration > altogether... Anybody else on this list know?
Since I ran into the same issue I patched axis so it does not send any empty xmlns declarations anymore. Do not know if this is perfectly legal but at least it looks better... Any expert judgement would be greatly appreciated. Cheers, Dan --- SerializationContextImpl.java.orig 2003-07-23 11:13:15.000000000 +0200 +++ SerializationContextImpl.java 2003-07-15 23:16:08.000000000 +0200 @@ -965,18 +965,20 @@ nsStack.push(); } else { for (Mapping map=nsStack.topOfFrame(); map!=null; map=nsStack.next()) { - StringBuffer sb = new StringBuffer("xmlns"); - if (map.getPrefix().length() > 0) { - sb.append(':'); - sb.append(map.getPrefix()); - } - if ((vecQNames==null) || (vecQNames.indexOf(sb.toString())==-1)) { - writer.write(' '); - sb.append("=\""); - sb.append(map.getNamespaceURI()); - sb.append('"'); - writer.write(sb.toString()); - } + if (map.getNamespaceURI().length() > 0) { + StringBuffer sb = new StringBuffer("xmlns"); + if (map.getPrefix().length() > 0) { + sb.append(':'); + sb.append(map.getPrefix()); + } + if ((vecQNames==null) || (vecQNames.indexOf(sb.toString())==-1)) { + writer.write(' '); + sb.append("=\""); + sb.append(map.getNamespaceURI()); + sb.append('"'); + writer.write(sb.toString()); + } + } } noNamespaceMappings = true;