public SOAPElement addAttribute(Name name, String value) throws SOAPException { addAttributeBare(name, value); if (!"".equals(name.getURI())) { ensureNamespaceIsDeclared(name.getPrefix(), name.getURI()); } return this; }
protected SOAPElement circumventBug5034339(SOAPElement element) { Name elementName = element.getElementName(); if (!isNamespaceQualified(elementName)) { String prefix = elementName.getPrefix(); String defaultNamespace = getNamespaceURI(prefix); if (defaultNamespace != null) { Name newElementName = NameImpl.create(elementName.getLocalName(), elementName.getPrefix(), defaultNamespace); SOAPElement newElement = createElement(newElementName); replaceChild(newElement, element); return newElement; } } return element; }
public Iterator getAllAttributes() { Iterator i = getAllAttributesFrom(this); ArrayList list = new ArrayList(); while (i.hasNext()) { Name name = (Name) i.next(); if (!"xmlns".equalsIgnoreCase(name.getPrefix())) list.add(name); } return list.iterator(); }
protected static String getAttributeValueFrom(Element element, Name name) { return getAttributeValueFrom( element, name.getURI(), name.getLocalName(), name.getPrefix(), name.getQualifiedName()); }
private void addAttributeBare(Name name, String value) { addAttributeBare(name.getURI(), name.getPrefix(), name.getQualifiedName(), value); }