Package org.apache.synapse.util

Examples of org.apache.synapse.util.TextFileDataSource


        if (traceOn && trace.isTraceEnabled()) {
            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


        if (traceOn && trace.isTraceEnabled()) {
            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

public class TextFileDataSourceTest extends TestCase {

    public void testWithXMLChars() throws Exception {
        String testString = "Test string with ampersand (&)";
        OMDataSource dataSource
            = new TextFileDataSource(new ByteArrayDataSource(testString.getBytes("UTF-8")));
        OMFactory omFactory = OMAbstractFactory.getOMFactory();
        OMSourcedElementImpl element
            = new OMSourcedElementImpl(BaseConstants.DEFAULT_TEXT_WRAPPER, omFactory, dataSource);
        assertEquals(testString, element.getText());
    }
View Full Code Here

TOP

Related Classes of org.apache.synapse.util.TextFileDataSource

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.