Hi

camel-spring and camel-cdi are two different things and you cannot use
them together as one Camel.

Only the wildfly-camel project has special support for Camel on CDI /
Wildfly / EAP that allows to use spring xml files.
https://github.com/wildfly-extras/wildfly-camel

But yeah you can use CXF with CDI. CXF and camel-cxf can also be
configured from Java code, but since CXF is an old library then it was
tied to spring from its beginning and many of the examples are cxf
configuration with spring xml files.

On Fri, Feb 7, 2020 at 2:36 PM Sjef Hoeks <sjefho...@hotmail.com> wrote:
>
> Hi,
>
> I deployed the example camel-example-cxf-tomcat on Glassfish and eveything 
> works as expected (i.e. if I request the WSDL, the WSDL is shown). But I want 
> to use camel-cdi, so I remove the definition from the XML file and I add the 
> Camel CDI dependency. Now when I request the WSDL, the message "No service 
> found" is displayed.
>
> I see the route is created. I guess it has to do with the fact that the Camel 
> CDI is using a DefaultCamelContext. If the route is added using the XML, a 
> SpringCamelContext is used.
>
> I tried this with version 2.24.0, 3.0.1 and the latest snapshots.
>
> Is it possible to define CXF endpoints using CDI beans?
> Is it possible to make Camel-CDI and Camel-Spring use the same CamelContext?
> Is it possible to retrieve the CamelContext from Camel-Spring, so I can use 
> this in my CDI beans?
>
> Thanks,
> JPH



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to