camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edhansen42 <>
Subject cxfrs, jaxrs and camel-boot
Date Thu, 02 Jul 2015 21:29:27 GMT
I'm trying to get cxfrs and jaxrs to work in a camel-boot app.  I'm using
camel 2.15.2, cxf 3.1.0, and spring boot 1.2.5.RELEASE. 

Here's my spring boot router code:
public class SpringBootRouter extends FatJarRouter {
	@Bean(name="jaxRsServer") @DependsOn("cxf")
	public JAXRSServerFactoryBean jaxRsServer() {
		JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean();
		factory.setAddress( "/" );
		List resources = new ArrayList<>();
		return factory;

	@Bean( destroyMethod = "shutdown" )
	public Bus cxf() {
		return new SpringBus();

	public void configure() {
			.routeId("My Route")
			.bean(new MyServiceBean(), "myGet(${})");
	public  static <T> T createResource(Class<T> resourceInterface) {
		InvocationHandler h = new InvocationHandler() {
			public Object invoke(Object proxy, Method method, Object[] args)
					throws Throwable {
				return null;
		return (T) Proxy.newProxyInstance(resourceInterface.getClassLoader(), new
Class[] {resourceInterface}, h);

Here is my resource:
public interface MyResource {
	public abstract Response doGet(@PathParam("id") String id);

Spring reports that the route starts fine:
Route: My Route started and consuming from:

When I hit the endpoint (, I get the
following response:
    "timestamp": 1435871466024,
    "status": 404,
    "error": "Not Found",
    "message": "No message available",
    "path": "/mypath/123"

And in the log from Spring, the only result of hitting the endpoint is:
o.s.web.servlet.DispatcherServlet        : FrameworkServlet
'dispatcherServlet': initialization started
o.s.web.servlet.DispatcherServlet        : FrameworkServlet
'dispatcherServlet': initialization completed in 13 ms

Seems like the DispatcherServlet is not passing through the request to my
jaxrs server.  

Am I missing some configuration for the DispatcherServlet?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message