Package org.milyn.smooks.edi.unedifact.model

Examples of org.milyn.smooks.edi.unedifact.model.UNEdifactInterchange


        InputSource ediSource = new InputSource();

        ediSource.setByteStream(new ByteArrayInputStream(inputMessage.getBytes()));
        ediSource.setCharacterStream(new StringReader(inputMessage));

        UNEdifactInterchange interchange = fromUNEdifact(ediSource);
        StringWriter writer = new StringWriter();
        interchange.write(writer);

        String normalizedInput = StreamUtils.normalizeLines(inputMessage, true);
        String normalizedOutput = StreamUtils.normalizeLines(writer.toString(), true);

        if (!normalizedOutput.equals(normalizedInput)) {
View Full Code Here


        if (ediStream == null) {
            throw new IOException("EDI input file '" + messageInFile + "' not on classpath.");
        }

        UNEdifactInterchange interchange = factory.fromUNEdifact(ediStream);

        // Serialize it back to EDI....
        StringWriter writer = new StringWriter();
        factory.toUNEdifact(interchange, writer);
View Full Code Here

TOP

Related Classes of org.milyn.smooks.edi.unedifact.model.UNEdifactInterchange

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.