Пример #1
0
  public SOAPElement addChildElement(String localName, String prefix, String uri)
      throws SOAPException {

    SOAPElement newElement = createElement(NameImpl.create(localName, prefix, uri));
    addNode(newElement);
    return convertToSoapElement(newElement);
  }
Пример #2
0
 protected SOAPElement convertToSoapElement(Element element) {
   if (element instanceof SOAPElement) {
     return (SOAPElement) element;
   } else {
     return replaceElementWithSOAPElement(
         element, (ElementImpl) createElement(NameImpl.copyElementName(element)));
   }
 }
Пример #3
0
 protected static org.w3c.dom.Attr getNamespaceAttrFrom(Element element, String prefix) {
   NamespaceContextIterator eachNamespace = new NamespaceContextIterator(element);
   while (eachNamespace.hasNext()) {
     org.w3c.dom.Attr namespaceDecl = eachNamespace.nextNamespaceAttr();
     String declaredPrefix = NameImpl.getLocalNameFromTagName(namespaceDecl.getNodeName());
     if (declaredPrefix.equals(prefix)) {
       return namespaceDecl;
     }
   }
   return null;
 }
Пример #4
0
 public Iterator getAllAttributesAsQNames() {
   Iterator i = getAllAttributesFrom(this);
   ArrayList list = new ArrayList();
   while (i.hasNext()) {
     Name name = (Name) i.next();
     if (!"xmlns".equalsIgnoreCase(name.getPrefix())) {
       list.add(NameImpl.convertToQName(name));
     }
   }
   return list.iterator();
 }
Пример #5
0
  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;
  }
Пример #6
0
 public FaultElement1_2Impl(SOAPDocumentImpl ownerDoc, String localName) {
   super(ownerDoc, NameImpl.createSOAP12Name(localName));
 }
Пример #7
0
 public ElementImpl(SOAPDocumentImpl ownerDoc, Name name) {
   super(ownerDoc, name.getURI(), name.getQualifiedName(), name.getLocalName());
   elementQName = NameImpl.convertToQName(name);
 }
Пример #8
0
 protected void setEncodingStyleNamespace(String soapNamespace, String soapNamespacePrefix)
     throws SOAPException {
   Name encodingStyleAttributeName =
       NameImpl.create("encodingStyle", soapNamespacePrefix, soapNamespace);
   encodingStyleAttribute.setName(encodingStyleAttributeName);
 }
Пример #9
0
 public Name getElementName() {
   return NameImpl.convertToName(elementQName);
 }
Пример #10
0
 public SOAPElement addChildElement(String localName) throws SOAPException {
   return (SOAPElement) addChildElement(NameImpl.createFromUnqualifiedName(localName));
 }