Examples of cloneOMElement()


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

                        sourceNodeList.add(soapEnvelope);
                    } else {
                        synLog.error("Inline Source is not a valid SOAPEnvelope.");
                    }
                } else {
                    sourceNodeList.add(inlineOMElement.cloneOMElement());
                }
            } else if (inlineOMNode instanceof OMText) {
                sourceNodeList.add(inlineOMNode);
            } else if (inlineKey != null) {
                Object inlineObj = synCtx.getEntry(inlineKey);
View Full Code Here

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

    public void testEntrySerializationScenarioOne() throws Exception {
        String inputXml = "<localEntry xmlns=\"http://ws.apache.org/ns/synapse\" key=\"key\" " +
            "><description>description</description><foo/></localEntry>";
        OMElement inputOM = createOMElement(inputXml);
        Entry entry = EntryFactory.createEntry(inputOM.cloneOMElement(), new Properties());
        OMElement resultOM = EntrySerializer.serializeEntry(entry, null);
        assertTrue(compare(resultOM, inputOM));
    }

    public void testEntrySerializationScenarioTwo() throws Exception {
View Full Code Here

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

    public void testEntrySerializationScenarioTwo() throws Exception {
        String inputXml = "<localEntry xmlns=\"http://ws.apache.org/ns/synapse\" key=\"key\"" +
            "><description>description</description></localEntry>";
        OMElement inputOM = createOMElement(inputXml);
        Entry entry = EntryFactory.createEntry(inputOM.cloneOMElement(), new Properties());
        OMElement resultOM = EntrySerializer.serializeEntry(entry, null);
        assertTrue(compare(resultOM, inputOM));
    }
   
    public void testEntrySerializationScenarioThree() throws Exception {
View Full Code Here

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

   
    public void testEntrySerializationScenarioThree() throws Exception {
        String inputXml = "<localEntry xmlns=\"http://ws.apache.org/ns/synapse\" key=\"key\" " +
            "/>";
        OMElement inputOM = createOMElement(inputXml);
        Entry entry = EntryFactory.createEntry(inputOM.cloneOMElement(), new Properties());
        OMElement resultOM = EntrySerializer.serializeEntry(entry, null);
        assertTrue(compare(resultOM, inputOM));
    }
}
View Full Code Here

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

        for (Object o : taskDescription.getProperties()) {
            OMElement prop = (OMElement) o;
            if (prop != null) {
                prop.setNamespace(targetNamespace);
                task.addChild(prop.cloneOMElement());
            }
        }

        return task;
    }
View Full Code Here

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

    @Override
    public Object copy(Object source) {
        if ( OMElement.class.isAssignableFrom(source.getClass()) ) {
            try {
                OMElement sourceElement = (OMElement)source;
                return sourceElement.cloneOMElement();
            } catch ( Exception e ) {
                throw new IllegalArgumentException(e);
            }
        }
        return super.copy(source);
View Full Code Here

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

    FOMSource source = (FOMSource) ((FOMFactory)factory).newSource(null);
    OMElement _source = source;
    for (Iterator i = this.getChildElements(); i.hasNext();) {
      OMElement _child = (OMElement) i.next();
      if (!_child.getQName().equals(ENTRY)) {
        _source.addChild(_child.cloneOMElement());
      }
    }
    return source;
  }
View Full Code Here

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

            }
        }
       
        for (Object o : sq.getProperties()) {
            OMElement prop = (OMElement) o;
            task.addChild(prop.cloneOMElement());
        }

        return task;
    }
View Full Code Here

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

    FOMSource source = (FOMSource) ((FOMFactory)factory).newSource(null);
    OMElement _source = source;
    for (Iterator i = this.getChildElements(); i.hasNext();) {
      OMElement _child = (OMElement) i.next();
      if (!_child.getQName().equals(ENTRY)) {
        _source.addChild(_child.cloneOMElement());
      }
    }
    return source;
  }
View Full Code Here

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

    private static OMElement stripNamespace(SOAPFactory soapFactory, OMElement element) {
        OMElement parent = soapFactory.createOMElement(new QName("", element.getLocalName()));
        Iterator<OMElement> iter = element.getChildElements();
        while (iter.hasNext()) {
            OMElement child = iter.next();
            child = child.cloneOMElement();
            parent.addChild(child);
        }
        return parent;
    }
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.