Using embedded jetty with camel-cxf

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Using embedded jetty with camel-cxf



I have a couple of rest routes defined in my Camel project and now I'm trying to add a SOAP service to my project using the same jetty embedded server.



I have something like this:


restConfiguration()
.component("jetty")
.host("0.0.0.0")
.port(8080)
;

CxfEndpoint cxfEndpoint = new CxfEndpoint();
cxfEndpoint.setCamelContext(getContext());
cxfEndpoint.setServiceClass(TestService.class);
cxfEndpoint.setAddress("http://0.0.0.0:8080/test");

from(cxfEndpoint)
.log(LoggingLevel.INFO, log, "test");



When I try to run the application, I get this error message:



Web server failed to start. Port 8080 was already in use.



Look like it's trying to start 2 instances of Jetty using the same port and that's why it's failing.



I would really like to make the cxf endpoint work with the embedded Jetty used for my other services. Is there any way to do that?









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Visual Studio Code: How to configure includePath for better IntelliSense results

Spring cloud config client Could not locate PropertySource

Makefile test if variable is not empty