use of org.apache.camel.builder.NoErrorHandlerBuilder in project camel by apache.
the class CxfRsSpringConsumerTest method createRouteBuilder.
protected RouteBuilder createRouteBuilder() throws Exception {
final Processor testProcessor = new Processor() {
public void process(Exchange exchange) throws Exception {
// just throw the CustomException here
throw new CustomException("Here is the exception");
}
};
final Processor responseProcessor = new Processor() {
public void process(Exchange exchange) throws Exception {
// do something else with the request properties as usual
// do something else with the response
exchange.getOut().getBody(Customer.class).setId(246);
}
};
return new RouteBuilder() {
public void configure() {
errorHandler(new NoErrorHandlerBuilder());
from("cxfrs://bean://rsServer").process(testProcessor);
from("cxfrs://bean://rsServer2").process(testProcessor);
from("cxfrs://bean://rsServerInvoke?performInvocation=true").process(responseProcessor);
}
};
}
use of org.apache.camel.builder.NoErrorHandlerBuilder in project camel by apache.
the class CxfRsConsumerTest method createRouteBuilder.
protected RouteBuilder createRouteBuilder() throws Exception {
final Processor testProcessor = new TestProcessor();
final Processor testProcessor2 = new TestProcessor2();
final Processor testProcessor3 = new TestProcessor3();
return new RouteBuilder() {
public void configure() {
errorHandler(new NoErrorHandlerBuilder());
from(CXF_RS_ENDPOINT_URI).process(testProcessor);
from(CXF_RS_ENDPOINT_URI2).process(testProcessor);
from(CXF_RS_ENDPOINT_URI3).process(testProcessor);
from(CXF_RS_ENDPOINT_URI4).process(testProcessor2);
from(CXF_RS_ENDPOINT_URI5).process(testProcessor3);
}
};
}
use of org.apache.camel.builder.NoErrorHandlerBuilder in project camel by apache.
the class CxfGreeterCXFMessageRouterTest method createRouteBuilder.
@Override
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
context.setErrorHandlerBuilder(new NoErrorHandlerBuilder());
from("cxf:bean:routerEndpoint?dataFormat=CXF_MESSAGE&publishedEndpointUrl=http://www.simple.com/services/test").to("cxf:bean:serviceEndpoint?dataFormat=CXF_MESSAGE");
}
};
}
Aggregations