Hi Evgeny,

Yes , you need to return a list or a array object as a result to the cxf consumer in Camel 1.3. If you look for CXF Invoker interface's[1] implementation, you will find out all the result are wrapped with a MessageContentsList object in the implementations. Current CXF outgoing interceptor chains just handles the message with List object.

I can add a check point in the CamelInvoker[2], to make sure the CamelInvoker will return a List object even the out message body is not a list or array object. So you could just set the out message's body with the result directly in your processor.

[1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/invoker/Invoker.java
[2]https://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java


Willem

pevgen wrote:
Hi.

I solve my problem, but i think this is a strange decision.

in the method "process"


      public void process(Exchange exchange) throws Exception {
        MessageContentsList mcl = new MessageContentsList();
        mcl.add(0,"my response 2");
        exchange.getOut().setBody(mcl);


Can anybody tell me other decision ?

Thanks

Evgeny

Reply via email to