Skip to content

fix(#755): split http-whiteboard out of the camel-cxf feature - #757

Open
jbonofre wants to merge 2 commits into
apache:mainfrom
jbonofre:fix/755-cxf-http-whiteboard-feature
Open

jbonofre wants to merge 2 commits into
apache:mainfrom
jbonofre:fix/755-cxf-http-whiteboard-feature

Conversation

@jbonofre

@jbonofre jbonofre commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Summary

camel-cxf unconditionally required http-whiteboard (and therefore a
running pax-web/Jetty instance), even though that's only needed for the OSGi
Servlet Whiteboard-based CXF servlet registration added in #687 (the
"Available SOAP Services" listing page). Producer-only usage and consumer
usage via another transport never needed it - CamelCxfITest already proves
camel-cxf works fine with a manually installed Undertow transport instead,
and camel-cxf-jetty provides its own embedded-Jetty transport, so both were
paying for a Jetty-backed OSGi HTTP Service they don't use.

This follows the same pattern already used for camel-cxf-jetty and
camel-cxf-spring: pull the extra dependency out of the base feature into
its own feature, camel-cxf-whiteboard (camel-cxf + http-whiteboard),
for anyone who wants the whiteboard-registered servlet.

Does this regress a bare-camel-cxf consumer that relied on the default transport?

No. Verified directly while building the test for this PR: publishing a
cxf:// consumer with no explicit transport engine (no Jetty, no Undertow)
fails identically before and after this change, with
HTTPTransportFactory: Cannot find any registered HttpDestinationFactory from the Bus. The whiteboard-registered servlet from HTTPTransportActivator
was never sufficient on its own to publish a CXF endpoint - CXF's default
HTTPTransportFactory still needs a real HttpDestinationFactory (the
JettyDestinationFactory/UndertowDestinationFactory SPI beans that
camel-cxf-jetty/an Undertow transport bundle provide) regardless of
http-whiteboard. So removing http-whiteboard from the base feature
doesn't take away any working capability; it only stops forcing a Jetty
instance that a bare camel-cxf install couldn't actually make use of
either way.

Changes

  • Remove http-whiteboard from the base camel-cxf feature.
  • Add a new camel-cxf-whiteboard feature (camel-cxf + http-whiteboard).
  • Add a Pax Exam integration test (camel-cxf-whiteboard-test) that installs
    the new feature alongside a CXF endpoint served over another transport
    (Undertow, same approach as CamelCxfITest) and verifies there's no
    conflict.

Test plan

  • CamelCxfWhiteboardITest (new) passes.
  • CamelCxfITest and CamelCxfJettyITest (existing) still pass
    unchanged, confirming the split doesn't break either.

Fixes #755

camel-cxf forced http-whiteboard (and therefore pax-web/Jetty) on every
install, even though it's only needed for the OSGi Servlet Whiteboard-based
CXF servlet registration (the "Available SOAP Services" listing page added
in apache#687). Producer-only usage and consumer usage via another transport
(camel-cxf-jetty, or a manually installed Undertow transport as already
exercised by CamelCxfITest) never needed it.

Move it into a new camel-cxf-whiteboard feature (camel-cxf + http-whiteboard),
following the same pattern already used for camel-cxf-jetty and
camel-cxf-spring, and add a Pax Exam integration test that installs the new
feature and verifies it doesn't conflict with a CXF endpoint served over
another transport.
HelloService only needs the echo operation this test invokes; the other
members were copy-pasted from the camel-cxf/camel-cxf-jetty test HelloService
and never called here. Also reference the already-declared port-property
constant instead of re-hardcoding its string value in the same class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Karaf feature 'camel-cxf' should not force loading of 'http-whiteboard'

1 participant