Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMElement.insertSiblingBefore()


  protected void _setChild(QName qname, OMElement element) {
    OMElement e = getFirstChildWithName(qname);
    if (e == null && element != null) {
      addChild(element);
    } else if (e != null && element != null) {
      e.insertSiblingBefore(element);
      e.discard();
    } else if (e != null && element == null) {
      e.discard();
    }
  }
View Full Code Here


    T element = (T)getFactory().newElement(qname);
    if (el == null) {
      addExtension(element);
    } else {
      element.setParentElement(this);
      el.insertSiblingBefore((OMElement)getInternal(element));
    }
    return (T)element;
  }
}
View Full Code Here

        OMElement firstChildElem = descriptionElement.getFirstElement();

        if (firstChildElem == null) {
          descriptionElement.addChild(child);
        } else {
          firstChildElem.insertSiblingBefore(child);
        }

        String key = ((PolicyReference) policyElement).getURI();
        if (key.startsWith("#")) {
          key = key.substring(key.indexOf("#") + 1);
View Full Code Here

            if (root.getHeader() == null) {
                soapFactory.createSOAPHeader(root);
            }
            root.getHeader().addChild(newOM);
        } else {
            om.insertSiblingBefore(newOM);
            om.detach();
        }
    }
   
    public void appendHeaderBlock(String namespace, String localPart, Block block)
View Full Code Here

        OMElement firstChildElem = descriptionElement.getFirstElement();

        if (firstChildElem == null) {
          descriptionElement.addChild(child);
        } else {
          firstChildElem.insertSiblingBefore(child);
        }

        String key = ((PolicyReference) policyElement).getURI();
        if (key.startsWith("#")) {
          key = key.substring(key.indexOf("#") + 1);
View Full Code Here

                OMElement firstChildElem = parentElement.getFirstElement();

                if (firstChildElem == null) {
                    parentElement.addChild(child);
                } else {
                    firstChildElem.insertSiblingBefore(child);
                }

                PolicyRegistry reg = new PolicyRegistryImpl();
                String key = ((PolicyReference)policyElement).getURI();
View Full Code Here

                    }
          OMElement binding = generateSoap11Binding(fac, axisEndpoint
              .getBinding());
          OMElement serviceElement = definition.getFirstChildWithName(new QName(
                      wsdl.getNamespaceURI(), SERVICE_LOCAL_NAME));         
              serviceElement.insertSiblingBefore(modifyBinding(binding));
         
        }
      }
    }
  }
View Full Code Here

                OMElement firstChildElem = wsdlElement.getFirstElement();

                if (firstChildElem == null) {
                    wsdlElement.addChild(child);
                } else {
                    firstChildElem.insertSiblingBefore(child);
                }

                String key = ((PolicyReference)policyElement).getURI();
                if (key.startsWith("#")) {
                    key = key.substring(key.indexOf("#") + 1);
View Full Code Here

      return;
    }
    OMElement binding = fac.createOMElement(BINDING_LOCAL_NAME, wsdl);
    OMElement serviceElement = defintions.getFirstChildWithName(new QName(
        wsdl.getNamespaceURI(), SERVICE_LOCAL_NAME));
    serviceElement.insertSiblingBefore(binding);

    QName qname = axisBinding.getName();
    binding.addAttribute(ATTRIBUTE_NAME, qname.getLocalPart(), null);
    binding.addAttribute("type", tns.getPrefix() + ":" + serviceName
        + PORT_TYPE_SUFFIX, null);
View Full Code Here

      return;
    }
    OMElement binding = fac.createOMElement(BINDING_LOCAL_NAME, wsdl);
    OMElement serviceElement = definitions.getFirstChildWithName(new QName(
        wsdl.getNamespaceURI(), SERVICE_LOCAL_NAME));
    serviceElement.insertSiblingBefore(binding);

    QName qname = axisBinding.getName();
    binding.addAttribute(ATTRIBUTE_NAME, qname.getLocalPart(), null);
    binding.addAttribute("type", tns.getPrefix() + ":" + serviceName
        + PORT_TYPE_SUFFIX, null);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.