camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Flow stops at cxf call
Date Wed, 06 Aug 2008 06:26:45 GMT
Hi ,
I just committed a test[1][2] to show how to do the routing like yours 
in camel.
I used to("cxf:bean:serviceEndpoint") instead of 
pipeline("cxf:bean:serviceEndpoint") for the routing rule.

TestCode 
[1]https://svn.apache.org/repos/asf/activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterTest.java

Configuration  file 
[2]https://svn.apache.org/repos/asf/activemq/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterTest-context.xml

Willem

Genadii Ganebnyi wrote:
> Hi All,
> I have the following flow:
>         from("activemq:vasea")
>         .process(new Processor() {
> 		
> 			public void process(Exchange ex) throws Exception {
> 				
> 				System.out.println(">>>>>>"+ex.getIn().getBody().getClass());
> 				//ex.getIn().setBody(ex.getIn().getBody(String.class));
> 				JAXBContext ctx = JAXBContext.newInstance(new Class[]
> {InputReportIncident.class});
> 		        Unmarshaller um = ctx.createUnmarshaller();
> 		        InputReportIncident report = (InputReportIncident)
> um.unmarshal(new StringReader(ex.getIn().getBody(String.class)));
> 		
> 		        ArrayList<InputReportIncident> list = new
> ArrayList<InputReportIncident>();
> 		        list.add(report);
> 		        ex.getIn().setBody(list);
> 				ex.getIn().setHeader(CxfConstants.OPERATION_NAME, "ReportIncident");
> 		
> 			}
> 		})
>         .pipeline("cxf:bean:serviceEndpoint")
>         .to("activemq:petea")
>         ;
> It stops at the point where cxf is called. Can anybody help with this issue?
>
>   


Mime
View raw message