I am new to camel and I am migrating camel 2.x app to camel 3.x. I see that cxfbean scheme is deprecated and removed in version 3. I searched migration docs but I haven't seen anything related.
What is the best way to migrate where HelloService is just rest endpoint.
<bean id="helloService" class="com.acme.HelloService"/>
<camel:camelContext>
<camel:route>
<camel:from uri="jetty:http://localhost:9000?matchOnUriPrefix=true"></camel:from>
<camel:to uri="cxfbean://helloService"></camel:to>
</camel:route>
</camel:camelContext>
I have the same problem, and I ended up with following steps
use "bean:youServiceBeanName" instead,
if your service has limited method, you can add ?methodname=xxx in the end if you want, like
to( "bean:youServiceBeanName?methodname=xxx")
or if you have too many methods to map, you could set "CamelBeanMethodName" by processor of
then camel will invoke the bean's method for you
about methods parameters, if camel can not map it correctly, you need to put @Header or @Body annotation on the rs service bean or interface method parameters,
if you want to have your own json mapper, in spring simply create a @bean of type ObjectMapper, camel will use that for marshal and unmarshal
make reference to Bean::Apache camel 3