Examples of OMSourcedElementImpl


Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

    }
   
    public static OMSourcedElement createOMSourcedElement(OverflowBlob overflowBlob, Charset charset) {
        OMFactory fac = OMAbstractFactory.getOMFactory();
        TextFileDataSource txtFileDS = new TextFileDataSource(overflowBlob, charset);
        return new OMSourcedElementImpl(BaseConstants.DEFAULT_TEXT_WRAPPER, fac, txtFileDS);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

     * @param source
     * @param localName
     * @param ns
     */
    public OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns) {
        return new OMSourcedElementImpl(localName, ns, this, source);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

     *
     * @param source the data source
     * @param qname the name of the element produced by the data source
     */
    public OMSourcedElement createOMElement(OMDataSource source, QName qname) {
        return new OMSourcedElementImpl(qname, this, source);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

    public OMElement createOMElement(QName qname) throws OMException {
        return new OMElementImpl(qname, null, this);
    }

    public OMSourcedElement createOMElement(OMDataSource source) {
        return new OMSourcedElementImpl(this, source);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

     * @param source
     * @param localName
     * @param ns
     */
    public OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns) {
        return new OMSourcedElementImpl(localName, ns, this, source);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

     *
     * @param source the data source
     * @param qname the name of the element produced by the data source
     */
    public OMSourcedElement createOMElement(OMDataSource source, QName qname) {
        return new OMSourcedElementImpl(qname, this, source);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

        TextFileDataSource textFileDataSource = new TextFileDataSource(
            //    new File("/tmp/test.txt"));
            new FileDataSource("/home/asankha/code/synapse/repository/conf/sample/resources/transform/message.xml"));

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMSourcedElementImpl element =
            new OMSourcedElementImpl(
                BaseConstants.DEFAULT_TEXT_WRAPPER, fac, textFileDataSource);
        element.serializeAndConsume(new FileOutputStream("/tmp/out.txt"));
        element.serialize(System.out);
        //element.serializeAndConsume(System.out);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

            trace.trace("Wrapping text transformation result from : " + file);
        }

        if (file != null) {
            TextFileDataSource txtFileDS = new TextFileDataSource(new FileDataSource(file));
            wrapper = new OMSourcedElementImpl(BaseConstants.DEFAULT_TEXT_WRAPPER, fac, txtFileDS);
        }

        return wrapper;
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

    @Override
    public void testWriteToTransportOutputStream() throws Exception {
        super.testWriteToTransportOutputStream();

        SoapBody body = soapMessage.getSoapBody();
        OMSourcedElementImpl axiomPayloadEle =
                (OMSourcedElementImpl) ((AxiomSoapBody) body).getAxiomElement().getFirstElement();
        assertFalse("Non-cached body should not be expanded now", axiomPayloadEle.isExpanded());
        axiomPayloadEle.getFirstElement();
        assertTrue("Non-cached body should now be expanded", axiomPayloadEle.isExpanded());
        assertEquals("Invalid payload", "payload", axiomPayloadEle.getLocalName());
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

    @Override
    public void testWriteToTransportOutputStream() throws Exception {
        super.testWriteToTransportOutputStream();

        SoapBody body = soapMessage.getSoapBody();
        OMSourcedElementImpl axiomPayloadEle =
                (OMSourcedElementImpl) ((AxiomSoapBody) body).getAxiomElement().getFirstElement();
        assertFalse("Non-cached body should not be expanded now", axiomPayloadEle.isExpanded());
        axiomPayloadEle.getFirstElement();
        assertTrue("Non-cached body should now be expanded", axiomPayloadEle.isExpanded());
        assertEquals("Invalid payload", "payload", axiomPayloadEle.getLocalName());
    }
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.