davsclaus opened a new pull request, #30606:
URL: https://github.com/apache/camel/pull/30606

   _Claude Code on behalf of Claus Ibsen (davsclaus)_
   
   [CAMEL-27391](https://issues.apache.org/jira/browse/CAMEL-27391), a 
follow-up to #30603 (CAMEL-27389, cxf consumers on the platform-http server).
   
   ## What
   
   Until now, `camel export` to Camel Main added `camel-cxf-platform-http` and 
`camel-platform-http-main` (and turned on the HTTP server) for any integration 
with `camel-cxf-soap`, also when it only has cxf producers (SOAP clients). Now 
they come only with a cxf consumer.
   
   Camel JBang (camel-kamelet-main) now decides from the routes:
   
   - **`DependencyDownloaderCxf`**: a `ModelLifecycleStrategy`, the same hook 
as `DependencyDownloaderKamelet`. When the first route with a `cxf:` consumer 
is added, it downloads `camel-cxf-platform-http` as a dependency of the 
integration (not hidden as before), binds its transport and sets the starter of 
the platform-http server. It covers the routes of the integration (Java, XML, 
YAML) and those created from a template or a Kamelet; routes added before the 
service is built are checked too. A `{{placeholder}}` uri is resolved; `cxfrs` 
is not cxf.
   - The auto-configure script `camel-cxf-soap.java` is removed, so no script 
is compiled at startup.
   - The export's silent run (stubs, routes not started) passes the same hook, 
so the module is in the run settings only with a cxf consumer:
     - **Camel Main**: adds `camel-platform-http-main` when the module is there 
(and drops the module for a `--camel-version` before 4.24).
     - **Spring Boot / Quarkus**: drop the module; they serve the consumer with 
their CXF starter / extension, as before.
   - Upgrade guide: the 4.24 entry of CAMEL-27389 now says Camel Main export 
adds the module for a cxf consumer only.
   
   Why not a hook in CXF (its `HttpDestinationFactory` bus extension, which 
only a server asks for): the export's silent run stubs every component and does 
not start the routes, so no CXF server is created there. The route model is 
seen by both `camel run` and the export.
   
   ## Tests
   
   - `DependencyDownloaderCxfTest`: cxf consumer (module downloaded once, 
starter set), producers and `cxfrs` only (nothing), routes added before the 
service, a route from a template, uri detection incl. placeholders.
   - `ProjectExporterTest`: the consumer test now has the module in the run 
dependencies (Main has it + platform-http-main; Spring Boot and Quarkus drop 
it); new `cxfProducersOnlyNeedNoHttpServer`.
   - End to end with the launcher of this branch:
     - `camel run` of a `cxf:/hello` consumer serves `/services/hello` (WSDL 
200, SOAP call answered);
     - a producer-only run downloads no module and starts no HTTP server;
     - exports in fresh dirs: Main consumer = `camel-cxf-soap` + 
`camel-cxf-platform-http` + `camel-platform-http-main` + 
`camel.server.enabled=true`; Main producer-only = `camel-cxf-soap` only; Spring 
Boot = `camel-cxf-soap-starter` only; Quarkus = `camel-quarkus-cxf-soap` only.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to