Package org.apache.axiom.om.impl.llom

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


    }
   
    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


     * @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

     *
     * @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

    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

     * @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

     *
     * @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

        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

            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

    @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

    @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

Related Classes of org.apache.axiom.om.impl.llom.OMSourcedElementImpl$DeferredNamespace

Copyright © 2018 www.massapicom. 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.