Package org.apache.camel.dataformat.xmljson

Examples of org.apache.camel.dataformat.xmljson.XmlJsonDataFormat


        from("direct:unmarshal")
            .unmarshal().xmljson()
            .to("mock:unmarshalResult");

        XmlJsonDataFormat xmlJsonFormat = new XmlJsonDataFormat();
        xmlJsonFormat.setRootName("bookstore");
        xmlJsonFormat.setElementName("book");
        xmlJsonFormat.setExpandableProperties(Arrays.asList("author", "author"));

        from("direct:unmarshalBookstore")
            .unmarshal(xmlJsonFormat)
            .to("mock:unmarshalBookstoreResult");
    }
View Full Code Here


    @Override
    public void configure() throws Exception {
        final DataFormat bindy = new BindyCsvDataFormat("org.camelcookbook.transformation.csv.model");
        final DataFormat jaxb = new JaxbDataFormat("org.camelcookbook.transformation.myschema");

        final XmlJsonDataFormat xmlJsonFormat = new XmlJsonDataFormat();
        xmlJsonFormat.setRootName("bookstore");
        xmlJsonFormat.setElementName("book");
        xmlJsonFormat.setExpandableProperties(Arrays.asList("author", "author"));

        from("direct:start")
            .choice()
            .when(header(Exchange.FILE_NAME).endsWith(".csv"))
                .unmarshal(bindy)
View Full Code Here

TOP

Related Classes of org.apache.camel.dataformat.xmljson.XmlJsonDataFormat

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.