Package org.apache.camel.processor

Examples of org.apache.camel.processor.UnmarshalProcessor


    }

    @Override
    public Processor createProcessor(RouteContext routeContext) {
        DataFormat dataFormat = DataFormatType.getDataFormat(routeContext, getDataFormatType(), ref);
        return new UnmarshalProcessor(dataFormat);
    }
View Full Code Here


    }

    @Override
    public Processor createConsumeProcessor() {
        ObjectHelper.notNull(consumerDataFormat, "consumerDataFormat");
        return new UnmarshalProcessor(consumerDataFormat);
    }
View Full Code Here

    public RestBindingProcessor(DataFormat jsonDataFormat, DataFormat xmlDataFormat,
                                DataFormat outJsonDataFormat, DataFormat outXmlDataFormat,
                                String consumes, String produces, String bindingMode) {

        if (jsonDataFormat != null) {
            this.jsonUnmarshal = new UnmarshalProcessor(jsonDataFormat);
        } else {
            this.jsonUnmarshal = null;
        }
        if (outJsonDataFormat != null) {
            this.jsonMarshal = new MarshalProcessor(outJsonDataFormat);
        } else if (jsonDataFormat != null) {
            this.jsonMarshal = new MarshalProcessor(jsonDataFormat);
        } else {
            this.jsonMarshal = null;
        }

        if (xmlDataFormat != null) {
            this.xmlUnmarshal = new UnmarshalProcessor(xmlDataFormat);
        } else {
            this.xmlUnmarshal = null;
        }
        if (outXmlDataFormat != null) {
            this.xmlMarshal = new MarshalProcessor(outXmlDataFormat);
View Full Code Here

    }

    @Override
    public Processor createProcessor(RouteContext routeContext) {
        DataFormat dataFormat = DataFormatDefinition.getDataFormat(routeContext, getDataFormatType(), ref);
        return new UnmarshalProcessor(dataFormat);
    }
View Full Code Here

    protected void doStart() throws Exception {
        if (operation.equals("marshal")) {
            marshal = new MarshalProcessor(dataFormat);
            marshal.setCamelContext(getCamelContext());
        } else {
            unmarshal = new UnmarshalProcessor(dataFormat);
            unmarshal.setCamelContext(getCamelContext());
        }

        ServiceHelper.startServices(dataFormat, marshal, unmarshal);
        super.doStart();
View Full Code Here

   
   
    @Test
    public void unmarshal() throws Exception
    {
        final UnmarshalProcessor unmarshalProcessor = new UnmarshalProcessor(dataFormatter);
        final DefaultExchange exchange = new DefaultExchange(camelContext);
        exchange.getIn().setBody(getCustomerInputStream(CUSTOMER_XML));
       
        unmarshalProcessor.process(exchange);
       
        assertEquals(Customer.class, exchange.getOut().getBody().getClass());
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.processor.UnmarshalProcessor

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.