I'm attempting to set up a simple json test and have the following in my
RouteBuilder ( root is a jetty: prefix)

        from( root + "/test", "seda:test" )
                .marshal().json(JsonLibrary.XStream)
                .process(new Processor()
                {

            @Override
            public void process(Exchange exchange) throws Exception
            {
                System.err.println( "Got exchange:" + exchange );
                System.err.println( "Body type: " +
exchange.getIn().getBody().getClass().getName());
                System.err.println( "Body:" +
exchange.getIn().getBody(String.class));
            }
        });

        from( root+"/test2" )
                .setBody( constant( new TestClass( 1, "abc" ) ) )
                .unmarshal().json()
                .to( "seda:test" );


where TestClass is a simple pojo with public getters for numeric, string on
constructor.

I'm getting an exception thrown stating that
Caused by: java.lang.IllegalArgumentException: dataFormat must be specified

on the lines where the from( test, seda ).marshal( lines are.  I've tried it
both with and without the JsonLibrary.XStream and am getting the same
behavior.

Suggestions?

-- 
-------------------------------------------
Craig Taylor
[email protected]

Reply via email to